public class CTPreferencesUtil
extends java.lang.Object
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
CTPreferencesPersistence
Constructor and Description |
---|
CTPreferencesUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(CTPreferences ctPreferences)
Caches the ct preferences in the entity cache if it is enabled.
|
static void |
cacheResult(java.util.List<CTPreferences> ctPreferenceses)
Caches the ct preferenceses in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(CTPreferences ctPreferences) |
static int |
countAll()
Returns the number of ct preferenceses.
|
static int |
countByC_U(long companyId,
long userId)
Returns the number of ct preferenceses where companyId = ? and userId = ?.
|
static int |
countByCtCollectionId(long ctCollectionId)
Returns the number of ct preferenceses where ctCollectionId = ?.
|
static int |
countByPreviousCtCollectionId(long previousCtCollectionId)
Returns the number of ct preferenceses where previousCtCollectionId = ?.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static CTPreferences |
create(long ctPreferencesId)
Creates a new ct preferences with the primary key.
|
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. |
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. |
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 = ?.
|
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 = ?.
|
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 = ?.
|
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 = ?.
|
static CTPreferences |
fetchByPrimaryKey(long ctPreferencesId)
Returns the ct preferences with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,CTPreferences> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static java.util.List<CTPreferences> |
findAll()
Returns all the ct preferenceses.
|
static java.util.List<CTPreferences> |
findAll(int start,
int end)
Returns a range of all the ct preferenceses.
|
static java.util.List<CTPreferences> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
Returns an ordered range of all the ct preferenceses.
|
static java.util.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.
|
static CTPreferences |
findByC_U(long companyId,
long userId)
Returns the ct preferences where companyId = ? and userId = ? or throws a
NoSuchPreferencesException if it could not be found. |
static CTPreferences |
findByCtCollectionId_First(long ctCollectionId,
com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
Returns the first ct preferences in the ordered set where ctCollectionId = ?.
|
static CTPreferences |
findByCtCollectionId_Last(long ctCollectionId,
com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
Returns the last ct preferences in the ordered set where ctCollectionId = ?.
|
static CTPreferences[] |
findByCtCollectionId_PrevAndNext(long ctPreferencesId,
long ctCollectionId,
com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
Returns the ct preferenceses before and after the current ct preferences in the ordered set where ctCollectionId = ?.
|
static java.util.List<CTPreferences> |
findByCtCollectionId(long ctCollectionId)
Returns all the ct preferenceses where ctCollectionId = ?.
|
static java.util.List<CTPreferences> |
findByCtCollectionId(long ctCollectionId,
int start,
int end)
Returns a range of all the ct preferenceses where ctCollectionId = ?.
|
static java.util.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 java.util.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 CTPreferences |
findByPreviousCtCollectionId_First(long previousCtCollectionId,
com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
Returns the first ct preferences in the ordered set where previousCtCollectionId = ?.
|
static CTPreferences |
findByPreviousCtCollectionId_Last(long previousCtCollectionId,
com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
Returns the last ct preferences in the ordered set where previousCtCollectionId = ?.
|
static CTPreferences[] |
findByPreviousCtCollectionId_PrevAndNext(long ctPreferencesId,
long previousCtCollectionId,
com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
Returns the ct preferenceses before and after the current ct preferences in the ordered set where previousCtCollectionId = ?.
|
static java.util.List<CTPreferences> |
findByPreviousCtCollectionId(long previousCtCollectionId)
Returns all the ct preferenceses where previousCtCollectionId = ?.
|
static java.util.List<CTPreferences> |
findByPreviousCtCollectionId(long previousCtCollectionId,
int start,
int end)
Returns a range of all the ct preferenceses where previousCtCollectionId = ?.
|
static java.util.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 java.util.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 CTPreferences |
findByPrimaryKey(long ctPreferencesId)
Returns the ct preferences with the primary key or throws a
NoSuchPreferencesException if it could not be found. |
static java.util.List<CTPreferences> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<CTPreferences> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<CTPreferences> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) |
static CTPreferencesPersistence |
getPersistence() |
static CTPreferences |
remove(long ctPreferencesId)
Removes the ct preferences with the primary key from the database.
|
static void |
removeAll()
Removes all the ct preferenceses from the database.
|
static CTPreferences |
removeByC_U(long companyId,
long userId)
Removes the ct preferences where companyId = ? and userId = ? from the database.
|
static void |
removeByCtCollectionId(long ctCollectionId)
Removes all the ct preferenceses where ctCollectionId = ? from the database.
|
static void |
removeByPreviousCtCollectionId(long previousCtCollectionId)
Removes all the ct preferenceses where previousCtCollectionId = ? from the database.
|
static CTPreferences |
update(CTPreferences ctPreferences) |
static CTPreferences |
update(CTPreferences ctPreferences,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static CTPreferences |
updateImpl(CTPreferences ctPreferences) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(CTPreferences ctPreferences)
BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)
public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.countWithDynamicQuery(DynamicQuery)
public static java.util.Map<java.io.Serializable,CTPreferences> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<CTPreferences> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<CTPreferences> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<CTPreferences> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static CTPreferences update(CTPreferences ctPreferences)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static CTPreferences update(CTPreferences ctPreferences, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static java.util.List<CTPreferences> findByCtCollectionId(long ctCollectionId)
ctCollectionId
- the ct collection IDpublic static java.util.List<CTPreferences> findByCtCollectionId(long ctCollectionId, int start, int end)
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
.
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)public static java.util.List<CTPreferences> findByCtCollectionId(long ctCollectionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
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
.
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 (optionally null
)public static java.util.List<CTPreferences> findByCtCollectionId(long ctCollectionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator, boolean useFinderCache)
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
.
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 (optionally null
)useFinderCache
- whether to use the finder cachepublic static CTPreferences findByCtCollectionId_First(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) throws NoSuchPreferencesException
ctCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchPreferencesException
- if a matching ct preferences could not be foundpublic static CTPreferences fetchByCtCollectionId_First(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
ctCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ct preferences could not be foundpublic static CTPreferences findByCtCollectionId_Last(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) throws NoSuchPreferencesException
ctCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchPreferencesException
- if a matching ct preferences could not be foundpublic static CTPreferences fetchByCtCollectionId_Last(long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
ctCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ct preferences could not be foundpublic static CTPreferences[] findByCtCollectionId_PrevAndNext(long ctPreferencesId, long ctCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) throws NoSuchPreferencesException
ctPreferencesId
- the primary key of the current ct preferencesctCollectionId
- the ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchPreferencesException
- if a ct preferences with the primary key could not be foundpublic static void removeByCtCollectionId(long ctCollectionId)
ctCollectionId
- the ct collection IDpublic static int countByCtCollectionId(long ctCollectionId)
ctCollectionId
- the ct collection IDpublic static java.util.List<CTPreferences> findByPreviousCtCollectionId(long previousCtCollectionId)
previousCtCollectionId
- the previous ct collection IDpublic static java.util.List<CTPreferences> findByPreviousCtCollectionId(long previousCtCollectionId, int start, int end)
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
.
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)public static java.util.List<CTPreferences> findByPreviousCtCollectionId(long previousCtCollectionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
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
.
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 (optionally null
)public static java.util.List<CTPreferences> findByPreviousCtCollectionId(long previousCtCollectionId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator, boolean useFinderCache)
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
.
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 (optionally null
)useFinderCache
- whether to use the finder cachepublic static CTPreferences findByPreviousCtCollectionId_First(long previousCtCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) throws NoSuchPreferencesException
previousCtCollectionId
- the previous ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchPreferencesException
- if a matching ct preferences could not be foundpublic static CTPreferences fetchByPreviousCtCollectionId_First(long previousCtCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
previousCtCollectionId
- the previous ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ct preferences could not be foundpublic static CTPreferences findByPreviousCtCollectionId_Last(long previousCtCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) throws NoSuchPreferencesException
previousCtCollectionId
- the previous ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchPreferencesException
- if a matching ct preferences could not be foundpublic static CTPreferences fetchByPreviousCtCollectionId_Last(long previousCtCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
previousCtCollectionId
- the previous ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ct preferences could not be foundpublic static CTPreferences[] findByPreviousCtCollectionId_PrevAndNext(long ctPreferencesId, long previousCtCollectionId, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator) throws NoSuchPreferencesException
ctPreferencesId
- the primary key of the current ct preferencespreviousCtCollectionId
- the previous ct collection IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchPreferencesException
- if a ct preferences with the primary key could not be foundpublic static void removeByPreviousCtCollectionId(long previousCtCollectionId)
previousCtCollectionId
- the previous ct collection IDpublic static int countByPreviousCtCollectionId(long previousCtCollectionId)
previousCtCollectionId
- the previous ct collection IDpublic static CTPreferences findByC_U(long companyId, long userId) throws NoSuchPreferencesException
NoSuchPreferencesException
if it could not be found.companyId
- the company IDuserId
- the user IDNoSuchPreferencesException
- if a matching ct preferences could not be foundpublic static CTPreferences fetchByC_U(long companyId, long userId)
null
if it could not be found. Uses the finder cache.companyId
- the company IDuserId
- the user IDnull
if a matching ct preferences could not be foundpublic static CTPreferences fetchByC_U(long companyId, long userId, boolean useFinderCache)
null
if it could not be found, optionally using the finder cache.companyId
- the company IDuserId
- the user IDuseFinderCache
- whether to use the finder cachenull
if a matching ct preferences could not be foundpublic static CTPreferences removeByC_U(long companyId, long userId) throws NoSuchPreferencesException
companyId
- the company IDuserId
- the user IDNoSuchPreferencesException
public static int countByC_U(long companyId, long userId)
companyId
- the company IDuserId
- the user IDpublic static void cacheResult(CTPreferences ctPreferences)
ctPreferences
- the ct preferencespublic static void cacheResult(java.util.List<CTPreferences> ctPreferenceses)
ctPreferenceses
- the ct preferencesespublic static CTPreferences create(long ctPreferencesId)
ctPreferencesId
- the primary key for the new ct preferencespublic static CTPreferences remove(long ctPreferencesId) throws NoSuchPreferencesException
ctPreferencesId
- the primary key of the ct preferencesNoSuchPreferencesException
- if a ct preferences with the primary key could not be foundpublic static CTPreferences updateImpl(CTPreferences ctPreferences)
public static CTPreferences findByPrimaryKey(long ctPreferencesId) throws NoSuchPreferencesException
NoSuchPreferencesException
if it could not be found.ctPreferencesId
- the primary key of the ct preferencesNoSuchPreferencesException
- if a ct preferences with the primary key could not be foundpublic static CTPreferences fetchByPrimaryKey(long ctPreferencesId)
null
if it could not be found.ctPreferencesId
- the primary key of the ct preferencesnull
if a ct preferences with the primary key could not be foundpublic static java.util.List<CTPreferences> findAll()
public static java.util.List<CTPreferences> findAll(int start, int end)
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
.
start
- the lower bound of the range of ct preferencesesend
- the upper bound of the range of ct preferenceses (not inclusive)public static java.util.List<CTPreferences> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator)
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
.
start
- 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 (optionally null
)public static java.util.List<CTPreferences> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTPreferences> orderByComparator, boolean useFinderCache)
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
.
start
- 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 (optionally null
)useFinderCache
- whether to use the finder cachepublic static void removeAll()
public static int countAll()
public static CTPreferencesPersistence getPersistence()