Class CTPreferencesUtil

java.lang.Object
com.liferay.change.tracking.service.persistence.CTPreferencesUtil

public class CTPreferencesUtil extends Object
The persistence utility for the ct preferences service. This utility wraps com.liferay.change.tracking.service.persistence.impl.CTPreferencesPersistenceImpl and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.

Caching information and settings can be found in portal.properties

See Also:
Generated:
  • Constructor Details

    • CTPreferencesUtil

      public CTPreferencesUtil()
  • Method Details

    • clearCache

      public static void clearCache()
      See Also:
      • BasePersistence.clearCache()
    • clearCache

      public static void clearCache(CTPreferences ctPreferences)
      See Also:
      • BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)
    • countWithDynamicQuery

      public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      See Also:
      • BasePersistence.countWithDynamicQuery(DynamicQuery)
    • fetchByPrimaryKeys

      public static Map<Serializable,CTPreferences> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
      See Also:
      • BasePersistence.fetchByPrimaryKeys(Set)
    • findWithDynamicQuery

      public static List<CTPreferences> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery)
    • findWithDynamicQuery

      public static List<CTPreferences> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
    • findWithDynamicQuery

      public static List<CTPreferences> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
    • update

      public static CTPreferences update(CTPreferences ctPreferences)
      See Also:
      • BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
    • update

      public static CTPreferences update(CTPreferences ctPreferences, com.liferay.portal.kernel.service.ServiceContext serviceContext)
      See Also:
      • BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
    • findByCtCollectionId

      public static List<CTPreferences> findByCtCollectionId(long ctCollectionId)
      Returns all the ct preferenceses where ctCollectionId = ?.
      Parameters:
      ctCollectionId - the ct collection ID
      Returns:
      the matching ct preferenceses
    • findByCtCollectionId

      public static List<CTPreferences> findByCtCollectionId(long ctCollectionId, int start, int end)
      Returns a range of all the ct preferenceses where ctCollectionId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CTPreferencesModelImpl.

      Parameters:
      ctCollectionId - the ct collection ID
      start - the lower bound of the range of ct preferenceses
      end - the upper bound of the range of ct preferenceses (not inclusive)
      Returns:
      the range of matching ct preferenceses
    • findByCtCollectionId

      public static List<CTPreferences> findByCtCollectionId(long ctCollectionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
      Returns an ordered range of all the ct preferenceses where ctCollectionId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CTPreferencesModelImpl.

      Parameters:
      ctCollectionId - the ct collection ID
      start - the lower bound of the range of ct preferenceses
      end - the upper bound of the range of ct preferenceses (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching ct preferenceses
    • findByCtCollectionId

      public static List<CTPreferences> findByCtCollectionId(long ctCollectionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the ct preferenceses where ctCollectionId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CTPreferencesModelImpl.

      Parameters:
      ctCollectionId - the ct collection ID
      start - the lower bound of the range of ct preferenceses
      end - the upper bound of the range of ct preferenceses (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of matching ct preferenceses
    • findByCtCollectionId_First

      public static CTPreferences findByCtCollectionId_First(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) throws NoSuchPreferencesException
      Returns the first ct preferences in the ordered set where ctCollectionId = ?.
      Parameters:
      ctCollectionId - the ct collection ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching ct preferences
      Throws:
      NoSuchPreferencesException - if a matching ct preferences could not be found
      NoSuchPreferencesException
    • fetchByCtCollectionId_First

      public static CTPreferences fetchByCtCollectionId_First(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
      Returns the first ct preferences in the ordered set where ctCollectionId = ?.
      Parameters:
      ctCollectionId - the ct collection ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching ct preferences, or null if a matching ct preferences could not be found
    • findByCtCollectionId_Last

      public static CTPreferences findByCtCollectionId_Last(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) throws NoSuchPreferencesException
      Returns the last ct preferences in the ordered set where ctCollectionId = ?.
      Parameters:
      ctCollectionId - the ct collection ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching ct preferences
      Throws:
      NoSuchPreferencesException - if a matching ct preferences could not be found
      NoSuchPreferencesException
    • fetchByCtCollectionId_Last

      public static CTPreferences fetchByCtCollectionId_Last(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
      Returns the last ct preferences in the ordered set where ctCollectionId = ?.
      Parameters:
      ctCollectionId - the ct collection ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching ct preferences, or null if a matching ct preferences could not be found
    • findByCtCollectionId_PrevAndNext

      public static CTPreferences[] findByCtCollectionId_PrevAndNext(long ctPreferencesId, long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) throws NoSuchPreferencesException
      Returns the ct preferenceses before and after the current ct preferences in the ordered set where ctCollectionId = ?.
      Parameters:
      ctPreferencesId - the primary key of the current ct preferences
      ctCollectionId - the ct collection ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the previous, current, and next ct preferences
      Throws:
      NoSuchPreferencesException - if a ct preferences with the primary key could not be found
      NoSuchPreferencesException
    • removeByCtCollectionId

      public static void removeByCtCollectionId(long ctCollectionId)
      Removes all the ct preferenceses where ctCollectionId = ? from the database.
      Parameters:
      ctCollectionId - the ct collection ID
    • countByCtCollectionId

      public static int countByCtCollectionId(long ctCollectionId)
      Returns the number of ct preferenceses where ctCollectionId = ?.
      Parameters:
      ctCollectionId - the ct collection ID
      Returns:
      the number of matching ct preferenceses
    • findByPreviousCtCollectionId

      public static List<CTPreferences> findByPreviousCtCollectionId(long previousCtCollectionId)
      Returns all the ct preferenceses where previousCtCollectionId = ?.
      Parameters:
      previousCtCollectionId - the previous ct collection ID
      Returns:
      the matching ct preferenceses
    • findByPreviousCtCollectionId

      public static List<CTPreferences> findByPreviousCtCollectionId(long previousCtCollectionId, int start, int end)
      Returns a range of all the ct preferenceses where previousCtCollectionId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CTPreferencesModelImpl.

      Parameters:
      previousCtCollectionId - the previous ct collection ID
      start - the lower bound of the range of ct preferenceses
      end - the upper bound of the range of ct preferenceses (not inclusive)
      Returns:
      the range of matching ct preferenceses
    • findByPreviousCtCollectionId

      public static List<CTPreferences> findByPreviousCtCollectionId(long previousCtCollectionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
      Returns an ordered range of all the ct preferenceses where previousCtCollectionId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CTPreferencesModelImpl.

      Parameters:
      previousCtCollectionId - the previous ct collection ID
      start - the lower bound of the range of ct preferenceses
      end - the upper bound of the range of ct preferenceses (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching ct preferenceses
    • findByPreviousCtCollectionId

      public static List<CTPreferences> findByPreviousCtCollectionId(long previousCtCollectionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the ct preferenceses where previousCtCollectionId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CTPreferencesModelImpl.

      Parameters:
      previousCtCollectionId - the previous ct collection ID
      start - the lower bound of the range of ct preferenceses
      end - the upper bound of the range of ct preferenceses (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of matching ct preferenceses
    • findByPreviousCtCollectionId_First

      public static CTPreferences findByPreviousCtCollectionId_First(long previousCtCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) throws NoSuchPreferencesException
      Returns the first ct preferences in the ordered set where previousCtCollectionId = ?.
      Parameters:
      previousCtCollectionId - the previous ct collection ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching ct preferences
      Throws:
      NoSuchPreferencesException - if a matching ct preferences could not be found
      NoSuchPreferencesException
    • fetchByPreviousCtCollectionId_First

      public static CTPreferences fetchByPreviousCtCollectionId_First(long previousCtCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
      Returns the first ct preferences in the ordered set where previousCtCollectionId = ?.
      Parameters:
      previousCtCollectionId - the previous ct collection ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching ct preferences, or null if a matching ct preferences could not be found
    • findByPreviousCtCollectionId_Last

      public static CTPreferences findByPreviousCtCollectionId_Last(long previousCtCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) throws NoSuchPreferencesException
      Returns the last ct preferences in the ordered set where previousCtCollectionId = ?.
      Parameters:
      previousCtCollectionId - the previous ct collection ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching ct preferences
      Throws:
      NoSuchPreferencesException - if a matching ct preferences could not be found
      NoSuchPreferencesException
    • fetchByPreviousCtCollectionId_Last

      public static CTPreferences fetchByPreviousCtCollectionId_Last(long previousCtCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
      Returns the last ct preferences in the ordered set where previousCtCollectionId = ?.
      Parameters:
      previousCtCollectionId - the previous ct collection ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the last matching ct preferences, or null if a matching ct preferences could not be found
    • findByPreviousCtCollectionId_PrevAndNext

      public static CTPreferences[] findByPreviousCtCollectionId_PrevAndNext(long ctPreferencesId, long previousCtCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) throws NoSuchPreferencesException
      Returns the ct preferenceses before and after the current ct preferences in the ordered set where previousCtCollectionId = ?.
      Parameters:
      ctPreferencesId - the primary key of the current ct preferences
      previousCtCollectionId - the previous ct collection ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the previous, current, and next ct preferences
      Throws:
      NoSuchPreferencesException - if a ct preferences with the primary key could not be found
      NoSuchPreferencesException
    • removeByPreviousCtCollectionId

      public static void removeByPreviousCtCollectionId(long previousCtCollectionId)
      Removes all the ct preferenceses where previousCtCollectionId = ? from the database.
      Parameters:
      previousCtCollectionId - the previous ct collection ID
    • countByPreviousCtCollectionId

      public static int countByPreviousCtCollectionId(long previousCtCollectionId)
      Returns the number of ct preferenceses where previousCtCollectionId = ?.
      Parameters:
      previousCtCollectionId - the previous ct collection ID
      Returns:
      the number of matching ct preferenceses
    • findByC_U

      public static CTPreferences findByC_U(long companyId, long userId) throws NoSuchPreferencesException
      Returns the ct preferences where companyId = ? and userId = ? or throws a NoSuchPreferencesException if it could not be found.
      Parameters:
      companyId - the company ID
      userId - the user ID
      Returns:
      the matching ct preferences
      Throws:
      NoSuchPreferencesException - if a matching ct preferences could not be found
      NoSuchPreferencesException
    • fetchByC_U

      public static CTPreferences fetchByC_U(long companyId, long userId)
      Returns the ct preferences where companyId = ? and userId = ? or returns null if it could not be found. Uses the finder cache.
      Parameters:
      companyId - the company ID
      userId - the user ID
      Returns:
      the matching ct preferences, or null if a matching ct preferences could not be found
    • fetchByC_U

      public static CTPreferences fetchByC_U(long companyId, long userId, boolean useFinderCache)
      Returns the ct preferences where companyId = ? and userId = ? or returns null if it could not be found, optionally using the finder cache.
      Parameters:
      companyId - the company ID
      userId - the user ID
      useFinderCache - whether to use the finder cache
      Returns:
      the matching ct preferences, or null if a matching ct preferences could not be found
    • removeByC_U

      public static CTPreferences removeByC_U(long companyId, long userId) throws NoSuchPreferencesException
      Removes the ct preferences where companyId = ? and userId = ? from the database.
      Parameters:
      companyId - the company ID
      userId - the user ID
      Returns:
      the ct preferences that was removed
      Throws:
      NoSuchPreferencesException
    • countByC_U

      public static int countByC_U(long companyId, long userId)
      Returns the number of ct preferenceses where companyId = ? and userId = ?.
      Parameters:
      companyId - the company ID
      userId - the user ID
      Returns:
      the number of matching ct preferenceses
    • cacheResult

      public static void cacheResult(CTPreferences ctPreferences)
      Caches the ct preferences in the entity cache if it is enabled.
      Parameters:
      ctPreferences - the ct preferences
    • cacheResult

      public static void cacheResult(List<CTPreferences> ctPreferenceses)
      Caches the ct preferenceses in the entity cache if it is enabled.
      Parameters:
      ctPreferenceses - the ct preferenceses
    • create

      public static CTPreferences create(long ctPreferencesId)
      Creates a new ct preferences with the primary key. Does not add the ct preferences to the database.
      Parameters:
      ctPreferencesId - the primary key for the new ct preferences
      Returns:
      the new ct preferences
    • remove

      public static CTPreferences remove(long ctPreferencesId) throws NoSuchPreferencesException
      Removes the ct preferences with the primary key from the database. Also notifies the appropriate model listeners.
      Parameters:
      ctPreferencesId - the primary key of the ct preferences
      Returns:
      the ct preferences that was removed
      Throws:
      NoSuchPreferencesException - if a ct preferences with the primary key could not be found
      NoSuchPreferencesException
    • updateImpl

      public static CTPreferences updateImpl(CTPreferences ctPreferences)
    • findByPrimaryKey

      public static CTPreferences findByPrimaryKey(long ctPreferencesId) throws NoSuchPreferencesException
      Returns the ct preferences with the primary key or throws a NoSuchPreferencesException if it could not be found.
      Parameters:
      ctPreferencesId - the primary key of the ct preferences
      Returns:
      the ct preferences
      Throws:
      NoSuchPreferencesException - if a ct preferences with the primary key could not be found
      NoSuchPreferencesException
    • fetchByPrimaryKey

      public static CTPreferences fetchByPrimaryKey(long ctPreferencesId)
      Returns the ct preferences with the primary key or returns null if it could not be found.
      Parameters:
      ctPreferencesId - the primary key of the ct preferences
      Returns:
      the ct preferences, or null if a ct preferences with the primary key could not be found
    • findAll

      public static List<CTPreferences> findAll()
      Returns all the ct preferenceses.
      Returns:
      the ct preferenceses
    • findAll

      public static List<CTPreferences> findAll(int start, int end)
      Returns a range of all the ct preferenceses.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CTPreferencesModelImpl.

      Parameters:
      start - the lower bound of the range of ct preferenceses
      end - the upper bound of the range of ct preferenceses (not inclusive)
      Returns:
      the range of ct preferenceses
    • findAll

      public static List<CTPreferences> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
      Returns an ordered range of all the ct preferenceses.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CTPreferencesModelImpl.

      Parameters:
      start - the lower bound of the range of ct preferenceses
      end - the upper bound of the range of ct preferenceses (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of ct preferenceses
    • findAll

      public static List<CTPreferences> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the ct preferenceses.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from CTPreferencesModelImpl.

      Parameters:
      start - the lower bound of the range of ct preferenceses
      end - the upper bound of the range of ct preferenceses (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of ct preferenceses
    • removeAll

      public static void removeAll()
      Removes all the ct preferenceses from the database.
    • countAll

      public static int countAll()
      Returns the number of ct preferenceses.
      Returns:
      the number of ct preferenceses
    • getPersistence

      public static CTPreferencesPersistence getPersistence()
    • setPersistence

      public static void setPersistence(CTPreferencesPersistence persistence)