public class CTSchemaVersionUtil
extends java.lang.Object
com.liferay.change.tracking.service.persistence.impl.CTSchemaVersionPersistenceImpl
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
CTSchemaVersionPersistence
Constructor and Description |
---|
CTSchemaVersionUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(CTSchemaVersion ctSchemaVersion)
Caches the ct schema version in the entity cache if it is enabled.
|
static void |
cacheResult(java.util.List<CTSchemaVersion> ctSchemaVersions)
Caches the ct schema versions in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(CTSchemaVersion ctSchemaVersion) |
static int |
countAll()
Returns the number of ct schema versions.
|
static int |
countByCompanyId(long companyId)
Returns the number of ct schema versions where companyId = ?.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static CTSchemaVersion |
create(long schemaVersionId)
Creates a new ct schema version with the primary key.
|
static CTSchemaVersion |
fetchByCompanyId_First(long companyId,
com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> orderByComparator)
Returns the first ct schema version in the ordered set where companyId = ?.
|
static CTSchemaVersion |
fetchByCompanyId_Last(long companyId,
com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> orderByComparator)
Returns the last ct schema version in the ordered set where companyId = ?.
|
static CTSchemaVersion |
fetchByPrimaryKey(long schemaVersionId)
Returns the ct schema version with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,CTSchemaVersion> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static java.util.List<CTSchemaVersion> |
findAll()
Returns all the ct schema versions.
|
static java.util.List<CTSchemaVersion> |
findAll(int start,
int end)
Returns a range of all the ct schema versions.
|
static java.util.List<CTSchemaVersion> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> orderByComparator)
Returns an ordered range of all the ct schema versions.
|
static java.util.List<CTSchemaVersion> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the ct schema versions.
|
static CTSchemaVersion |
findByCompanyId_First(long companyId,
com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> orderByComparator)
Returns the first ct schema version in the ordered set where companyId = ?.
|
static CTSchemaVersion |
findByCompanyId_Last(long companyId,
com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> orderByComparator)
Returns the last ct schema version in the ordered set where companyId = ?.
|
static CTSchemaVersion[] |
findByCompanyId_PrevAndNext(long schemaVersionId,
long companyId,
com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> orderByComparator)
Returns the ct schema versions before and after the current ct schema version in the ordered set where companyId = ?.
|
static java.util.List<CTSchemaVersion> |
findByCompanyId(long companyId)
Returns all the ct schema versions where companyId = ?.
|
static java.util.List<CTSchemaVersion> |
findByCompanyId(long companyId,
int start,
int end)
Returns a range of all the ct schema versions where companyId = ?.
|
static java.util.List<CTSchemaVersion> |
findByCompanyId(long companyId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> orderByComparator)
Returns an ordered range of all the ct schema versions where companyId = ?.
|
static java.util.List<CTSchemaVersion> |
findByCompanyId(long companyId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the ct schema versions where companyId = ?.
|
static CTSchemaVersion |
findByPrimaryKey(long schemaVersionId)
Returns the ct schema version with the primary key or throws a
NoSuchSchemaVersionException if it could not be found. |
static java.util.List<CTSchemaVersion> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<CTSchemaVersion> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<CTSchemaVersion> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> orderByComparator) |
static CTSchemaVersionPersistence |
getPersistence() |
static CTSchemaVersion |
remove(long schemaVersionId)
Removes the ct schema version with the primary key from the database.
|
static void |
removeAll()
Removes all the ct schema versions from the database.
|
static void |
removeByCompanyId(long companyId)
Removes all the ct schema versions where companyId = ? from the database.
|
static CTSchemaVersion |
update(CTSchemaVersion ctSchemaVersion) |
static CTSchemaVersion |
update(CTSchemaVersion ctSchemaVersion,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static CTSchemaVersion |
updateImpl(CTSchemaVersion ctSchemaVersion) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(CTSchemaVersion ctSchemaVersion)
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,CTSchemaVersion> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<CTSchemaVersion> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<CTSchemaVersion> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<CTSchemaVersion> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static CTSchemaVersion update(CTSchemaVersion ctSchemaVersion)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static CTSchemaVersion update(CTSchemaVersion ctSchemaVersion, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static java.util.List<CTSchemaVersion> findByCompanyId(long companyId)
companyId
- the company IDpublic static java.util.List<CTSchemaVersion> findByCompanyId(long companyId, 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 CTSchemaVersionModelImpl
.
companyId
- the company IDstart
- the lower bound of the range of ct schema versionsend
- the upper bound of the range of ct schema versions (not inclusive)public static java.util.List<CTSchemaVersion> findByCompanyId(long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> 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 CTSchemaVersionModelImpl
.
companyId
- the company IDstart
- the lower bound of the range of ct schema versionsend
- the upper bound of the range of ct schema versions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<CTSchemaVersion> findByCompanyId(long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> 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 CTSchemaVersionModelImpl
.
companyId
- the company IDstart
- the lower bound of the range of ct schema versionsend
- the upper bound of the range of ct schema versions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static CTSchemaVersion findByCompanyId_First(long companyId, com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> orderByComparator) throws NoSuchSchemaVersionException
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchSchemaVersionException
- if a matching ct schema version could not be foundpublic static CTSchemaVersion fetchByCompanyId_First(long companyId, com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> orderByComparator)
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ct schema version could not be foundpublic static CTSchemaVersion findByCompanyId_Last(long companyId, com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> orderByComparator) throws NoSuchSchemaVersionException
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchSchemaVersionException
- if a matching ct schema version could not be foundpublic static CTSchemaVersion fetchByCompanyId_Last(long companyId, com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> orderByComparator)
companyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ct schema version could not be foundpublic static CTSchemaVersion[] findByCompanyId_PrevAndNext(long schemaVersionId, long companyId, com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> orderByComparator) throws NoSuchSchemaVersionException
schemaVersionId
- the primary key of the current ct schema versioncompanyId
- the company IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchSchemaVersionException
- if a ct schema version with the primary key could not be foundpublic static void removeByCompanyId(long companyId)
companyId
- the company IDpublic static int countByCompanyId(long companyId)
companyId
- the company IDpublic static void cacheResult(CTSchemaVersion ctSchemaVersion)
ctSchemaVersion
- the ct schema versionpublic static void cacheResult(java.util.List<CTSchemaVersion> ctSchemaVersions)
ctSchemaVersions
- the ct schema versionspublic static CTSchemaVersion create(long schemaVersionId)
schemaVersionId
- the primary key for the new ct schema versionpublic static CTSchemaVersion remove(long schemaVersionId) throws NoSuchSchemaVersionException
schemaVersionId
- the primary key of the ct schema versionNoSuchSchemaVersionException
- if a ct schema version with the primary key could not be foundpublic static CTSchemaVersion updateImpl(CTSchemaVersion ctSchemaVersion)
public static CTSchemaVersion findByPrimaryKey(long schemaVersionId) throws NoSuchSchemaVersionException
NoSuchSchemaVersionException
if it could not be found.schemaVersionId
- the primary key of the ct schema versionNoSuchSchemaVersionException
- if a ct schema version with the primary key could not be foundpublic static CTSchemaVersion fetchByPrimaryKey(long schemaVersionId)
null
if it could not be found.schemaVersionId
- the primary key of the ct schema versionnull
if a ct schema version with the primary key could not be foundpublic static java.util.List<CTSchemaVersion> findAll()
public static java.util.List<CTSchemaVersion> 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 CTSchemaVersionModelImpl
.
start
- the lower bound of the range of ct schema versionsend
- the upper bound of the range of ct schema versions (not inclusive)public static java.util.List<CTSchemaVersion> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> 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 CTSchemaVersionModelImpl
.
start
- the lower bound of the range of ct schema versionsend
- the upper bound of the range of ct schema versions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<CTSchemaVersion> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CTSchemaVersion> 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 CTSchemaVersionModelImpl
.
start
- the lower bound of the range of ct schema versionsend
- the upper bound of the range of ct schema versions (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 CTSchemaVersionPersistence getPersistence()