Class CTPreferencesUtil
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcacheResult(CTPreferences ctPreferences) static voidcacheResult(List<CTPreferences> ctPreferenceses) static voidstatic voidclearCache(CTPreferences ctPreferences) static intcountByC_U(long companyId, long userId) Returns the number of ct preferenceses where companyId = ? and userId = ?.static intcountByCtCollectionId(long ctCollectionId) Returns the number of ct preferenceses where ctCollectionId = ?.static intcountByPreviousCtCollectionId(long previousCtCollectionId) Returns the number of ct preferenceses where previousCtCollectionId = ?.static longcountWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) static CTPreferencescreate(long ctPreferencesId) Creates a new ct preferences with the primary key.static CTPreferencesfetchByC_U(long companyId, long userId) Returns the ct preferences where companyId = ? and userId = ? or returnsnullif it could not be found.static CTPreferencesfetchByC_U(long companyId, long userId, boolean useFinderCache) Returns the ct preferences where companyId = ? and userId = ? or returnsnullif it could not be found, optionally using the finder cache.static CTPreferencesfetchByCtCollectionId_First(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) Returns the first ct preferences in the ordered set where ctCollectionId = ?.static CTPreferencesfetchByPreviousCtCollectionId_First(long previousCtCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) Returns the first ct preferences in the ordered set where previousCtCollectionId = ?.static CTPreferencesfetchByPrimaryKey(long ctPreferencesId) Returns the ct preferences with the primary key or returnsnullif it could not be found.static Map<Serializable, CTPreferences> fetchByPrimaryKeys(Set<Serializable> primaryKeys) static CTPreferencesfindByC_U(long companyId, long userId) Returns the ct preferences where companyId = ? and userId = ? or throws aNoSuchPreferencesExceptionif it could not be found.static List<CTPreferences> findByCtCollectionId(long ctCollectionId) Returns all the ct preferenceses where ctCollectionId = ?.static List<CTPreferences> findByCtCollectionId(long ctCollectionId, int start, int end) Returns a range of all the ct preferenceses where ctCollectionId = ?.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 = ?.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 = ?.static CTPreferencesfindByCtCollectionId_First(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) Returns the first ct preferences in the ordered set where ctCollectionId = ?.static List<CTPreferences> findByPreviousCtCollectionId(long previousCtCollectionId) Returns all the ct preferenceses where previousCtCollectionId = ?.static List<CTPreferences> findByPreviousCtCollectionId(long previousCtCollectionId, int start, int end) Returns a range of all the ct preferenceses where previousCtCollectionId = ?.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 = ?.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 = ?.static CTPreferencesfindByPreviousCtCollectionId_First(long previousCtCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) Returns the first ct preferences in the ordered set where previousCtCollectionId = ?.static CTPreferencesfindByPrimaryKey(long ctPreferencesId) Returns the ct preferences with the primary key or throws aNoSuchPreferencesExceptionif it could not be found.static List<CTPreferences> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) static List<CTPreferences> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) static List<CTPreferences> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) static CTPreferencesPersistencestatic CTPreferencesremove(long ctPreferencesId) Removes the ct preferences with the primary key from the database.static CTPreferencesremoveByC_U(long companyId, long userId) Removes the ct preferences where companyId = ? and userId = ? from the database.static voidremoveByCtCollectionId(long ctCollectionId) Removes all the ct preferenceses where ctCollectionId = ? from the database.static voidremoveByPreviousCtCollectionId(long previousCtCollectionId) Removes all the ct preferenceses where previousCtCollectionId = ? from the database.static voidsetPersistence(CTPreferencesPersistence persistence) static CTPreferencesupdate(CTPreferences ctPreferences) static CTPreferencesupdate(CTPreferences ctPreferences, com.liferay.portal.kernel.service.ServiceContext serviceContext) static CTPreferencesupdateImpl(CTPreferences ctPreferences)
-
Constructor Details
-
CTPreferencesUtil
public CTPreferencesUtil()
-
-
Method Details
-
cacheResult
- See Also:
-
cacheResult
- See Also:
-
clearCache
public static void clearCache()- See Also:
-
clearCache
- See Also:
-
countWithDynamicQuery
public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - See Also:
-
fetchByPrimaryKeys
- See Also:
-
findWithDynamicQuery
public static List<CTPreferences> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - See Also:
-
findWithDynamicQuery
public static List<CTPreferences> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) - See Also:
-
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:
-
update
- See Also:
-
update
public static CTPreferences update(CTPreferences ctPreferences, com.liferay.portal.kernel.service.ServiceContext serviceContext) - See Also:
-
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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.change.tracking.model.impl.CTPreferencesModelImpl.- Parameters:
ctCollectionId- the ct collection IDstart- the lower bound of the range of ct preferencesesend- the upper bound of the range of ct preferenceses (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)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 IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching ct preferences
-
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 IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching ct preferences, or
nullif a matching ct preferences could not be found
-
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, 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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.change.tracking.model.impl.CTPreferencesModelImpl.- Parameters:
previousCtCollectionId- the previous ct collection IDstart- the lower bound of the range of ct preferencesesend- the upper bound of the range of ct preferenceses (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)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 IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching ct preferences
-
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 IDorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching ct preferences, or
nullif a matching ct preferences could not be found
-
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 aNoSuchPreferencesExceptionif it could not be found.- Parameters:
companyId- the company IDuserId- the user ID- Returns:
- the matching ct preferences
-
fetchByC_U
Returns the ct preferences where companyId = ? and userId = ? or returnsnullif it could not be found, optionally using the finder cache.- Parameters:
companyId- the company IDuserId- the user IDuseFinderCache- whether to use the finder cache- Returns:
- the matching ct preferences, or
nullif 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 IDuserId- 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 IDuserId- the user ID- Returns:
- the number of matching ct preferenceses
-
create
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
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
-
updateImpl
-
findByPrimaryKey
public static CTPreferences findByPrimaryKey(long ctPreferencesId) throws NoSuchPreferencesException Returns the ct preferences with the primary key or throws aNoSuchPreferencesExceptionif it could not be found.- Parameters:
ctPreferencesId- the primary key of the ct preferences- Returns:
- the ct preferences
-
fetchByPrimaryKey
Returns the ct preferences with the primary key or returnsnullif it could not be found.- Parameters:
ctPreferencesId- the primary key of the ct preferences- Returns:
- the ct preferences, or
nullif a ct preferences with the primary key could not be found
-
fetchByC_U
Returns the ct preferences where companyId = ? and userId = ? or returnsnullif it could not be found. Uses the finder cache.- Parameters:
companyId- the company IDuserId- the user ID- Returns:
- the matching ct preferences, or
nullif a matching ct preferences could not be found
-
findByCtCollectionId
Returns all the ct preferenceses where ctCollectionId = ?.- Parameters:
ctCollectionId- the ct collection ID- Returns:
- the matching ct preferenceses
-
findByCtCollectionId
Returns a range of all the ct preferenceses where ctCollectionId = ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.change.tracking.model.impl.CTPreferencesModelImpl.- Parameters:
ctCollectionId- the ct collection IDstart- the lower bound of the range of ct preferencesesend- 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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.change.tracking.model.impl.CTPreferencesModelImpl.- Parameters:
ctCollectionId- the ct collection IDstart- the lower bound of the range of ct preferencesesend- the upper bound of the range of ct preferenceses (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the ordered range of matching ct preferenceses
-
findByPreviousCtCollectionId
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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.change.tracking.model.impl.CTPreferencesModelImpl.- Parameters:
previousCtCollectionId- the previous ct collection IDstart- the lower bound of the range of ct preferencesesend- 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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.change.tracking.model.impl.CTPreferencesModelImpl.- Parameters:
previousCtCollectionId- the previous ct collection IDstart- the lower bound of the range of ct preferencesesend- the upper bound of the range of ct preferenceses (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the ordered range of matching ct preferenceses
-
getPersistence
-
setPersistence
-