public class DDMTemplateVersionUtil
extends java.lang.Object
com.liferay.dynamic.data.mapping.service.persistence.impl.DDMTemplateVersionPersistenceImpl
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
DDMTemplateVersionPersistence
Constructor and Description |
---|
DDMTemplateVersionUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(DDMTemplateVersion ddmTemplateVersion)
Caches the ddm template version in the entity cache if it is enabled.
|
static void |
cacheResult(java.util.List<DDMTemplateVersion> ddmTemplateVersions)
Caches the ddm template versions in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(DDMTemplateVersion ddmTemplateVersion) |
static int |
countAll()
Returns the number of ddm template versions.
|
static int |
countByT_S(long templateId,
int status)
Returns the number of ddm template versions where templateId = ? and status = ?.
|
static int |
countByT_V(long templateId,
java.lang.String version)
Returns the number of ddm template versions where templateId = ? and version = ?.
|
static int |
countByTemplateId(long templateId)
Returns the number of ddm template versions where templateId = ?.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static DDMTemplateVersion |
create(long templateVersionId)
Creates a new ddm template version with the primary key.
|
static DDMTemplateVersion |
fetchByPrimaryKey(long templateVersionId)
Returns the ddm template version with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,DDMTemplateVersion> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static DDMTemplateVersion |
fetchByT_S_First(long templateId,
int status,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
Returns the first ddm template version in the ordered set where templateId = ? and status = ?.
|
static DDMTemplateVersion |
fetchByT_S_Last(long templateId,
int status,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
Returns the last ddm template version in the ordered set where templateId = ? and status = ?.
|
static DDMTemplateVersion |
fetchByT_V(long templateId,
java.lang.String version)
Returns the ddm template version where templateId = ? and version = ? or returns
null if it could not be found. |
static DDMTemplateVersion |
fetchByT_V(long templateId,
java.lang.String version,
boolean useFinderCache)
Returns the ddm template version where templateId = ? and version = ? or returns
null if it could not be found, optionally using the finder cache. |
static DDMTemplateVersion |
fetchByTemplateId_First(long templateId,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
Returns the first ddm template version in the ordered set where templateId = ?.
|
static DDMTemplateVersion |
fetchByTemplateId_Last(long templateId,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
Returns the last ddm template version in the ordered set where templateId = ?.
|
static java.util.List<DDMTemplateVersion> |
findAll()
Returns all the ddm template versions.
|
static java.util.List<DDMTemplateVersion> |
findAll(int start,
int end)
Returns a range of all the ddm template versions.
|
static java.util.List<DDMTemplateVersion> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
Returns an ordered range of all the ddm template versions.
|
static java.util.List<DDMTemplateVersion> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the ddm template versions.
|
static DDMTemplateVersion |
findByPrimaryKey(long templateVersionId)
Returns the ddm template version with the primary key or throws a
NoSuchTemplateVersionException if it could not be found. |
static DDMTemplateVersion |
findByT_S_First(long templateId,
int status,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
Returns the first ddm template version in the ordered set where templateId = ? and status = ?.
|
static DDMTemplateVersion |
findByT_S_Last(long templateId,
int status,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
Returns the last ddm template version in the ordered set where templateId = ? and status = ?.
|
static DDMTemplateVersion[] |
findByT_S_PrevAndNext(long templateVersionId,
long templateId,
int status,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
Returns the ddm template versions before and after the current ddm template version in the ordered set where templateId = ? and status = ?.
|
static java.util.List<DDMTemplateVersion> |
findByT_S(long templateId,
int status)
Returns all the ddm template versions where templateId = ? and status = ?.
|
static java.util.List<DDMTemplateVersion> |
findByT_S(long templateId,
int status,
int start,
int end)
Returns a range of all the ddm template versions where templateId = ? and status = ?.
|
static java.util.List<DDMTemplateVersion> |
findByT_S(long templateId,
int status,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
Returns an ordered range of all the ddm template versions where templateId = ? and status = ?.
|
static java.util.List<DDMTemplateVersion> |
findByT_S(long templateId,
int status,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the ddm template versions where templateId = ? and status = ?.
|
static DDMTemplateVersion |
findByT_V(long templateId,
java.lang.String version)
Returns the ddm template version where templateId = ? and version = ? or throws a
NoSuchTemplateVersionException if it could not be found. |
static DDMTemplateVersion |
findByTemplateId_First(long templateId,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
Returns the first ddm template version in the ordered set where templateId = ?.
|
static DDMTemplateVersion |
findByTemplateId_Last(long templateId,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
Returns the last ddm template version in the ordered set where templateId = ?.
|
static DDMTemplateVersion[] |
findByTemplateId_PrevAndNext(long templateVersionId,
long templateId,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
Returns the ddm template versions before and after the current ddm template version in the ordered set where templateId = ?.
|
static java.util.List<DDMTemplateVersion> |
findByTemplateId(long templateId)
Returns all the ddm template versions where templateId = ?.
|
static java.util.List<DDMTemplateVersion> |
findByTemplateId(long templateId,
int start,
int end)
Returns a range of all the ddm template versions where templateId = ?.
|
static java.util.List<DDMTemplateVersion> |
findByTemplateId(long templateId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
Returns an ordered range of all the ddm template versions where templateId = ?.
|
static java.util.List<DDMTemplateVersion> |
findByTemplateId(long templateId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the ddm template versions where templateId = ?.
|
static java.util.List<DDMTemplateVersion> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<DDMTemplateVersion> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<DDMTemplateVersion> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator) |
static DDMTemplateVersionPersistence |
getPersistence() |
static DDMTemplateVersion |
remove(long templateVersionId)
Removes the ddm template version with the primary key from the database.
|
static void |
removeAll()
Removes all the ddm template versions from the database.
|
static void |
removeByT_S(long templateId,
int status)
Removes all the ddm template versions where templateId = ? and status = ? from the database.
|
static DDMTemplateVersion |
removeByT_V(long templateId,
java.lang.String version)
Removes the ddm template version where templateId = ? and version = ? from the database.
|
static void |
removeByTemplateId(long templateId)
Removes all the ddm template versions where templateId = ? from the database.
|
static DDMTemplateVersion |
update(DDMTemplateVersion ddmTemplateVersion) |
static DDMTemplateVersion |
update(DDMTemplateVersion ddmTemplateVersion,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static DDMTemplateVersion |
updateImpl(DDMTemplateVersion ddmTemplateVersion) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(DDMTemplateVersion ddmTemplateVersion)
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,DDMTemplateVersion> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<DDMTemplateVersion> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<DDMTemplateVersion> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<DDMTemplateVersion> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static DDMTemplateVersion update(DDMTemplateVersion ddmTemplateVersion)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static DDMTemplateVersion update(DDMTemplateVersion ddmTemplateVersion, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static java.util.List<DDMTemplateVersion> findByTemplateId(long templateId)
templateId
- the template IDpublic static java.util.List<DDMTemplateVersion> findByTemplateId(long templateId, 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 DDMTemplateVersionModelImpl
.
templateId
- the template IDstart
- the lower bound of the range of ddm template versionsend
- the upper bound of the range of ddm template versions (not inclusive)public static java.util.List<DDMTemplateVersion> findByTemplateId(long templateId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> 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 DDMTemplateVersionModelImpl
.
templateId
- the template IDstart
- the lower bound of the range of ddm template versionsend
- the upper bound of the range of ddm template versions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<DDMTemplateVersion> findByTemplateId(long templateId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> 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 DDMTemplateVersionModelImpl
.
templateId
- the template IDstart
- the lower bound of the range of ddm template versionsend
- the upper bound of the range of ddm template versions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static DDMTemplateVersion findByTemplateId_First(long templateId, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator) throws NoSuchTemplateVersionException
templateId
- the template IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchTemplateVersionException
- if a matching ddm template version could not be foundpublic static DDMTemplateVersion fetchByTemplateId_First(long templateId, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
templateId
- the template IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ddm template version could not be foundpublic static DDMTemplateVersion findByTemplateId_Last(long templateId, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator) throws NoSuchTemplateVersionException
templateId
- the template IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchTemplateVersionException
- if a matching ddm template version could not be foundpublic static DDMTemplateVersion fetchByTemplateId_Last(long templateId, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
templateId
- the template IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ddm template version could not be foundpublic static DDMTemplateVersion[] findByTemplateId_PrevAndNext(long templateVersionId, long templateId, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator) throws NoSuchTemplateVersionException
templateVersionId
- the primary key of the current ddm template versiontemplateId
- the template IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchTemplateVersionException
- if a ddm template version with the primary key could not be foundpublic static void removeByTemplateId(long templateId)
templateId
- the template IDpublic static int countByTemplateId(long templateId)
templateId
- the template IDpublic static DDMTemplateVersion findByT_V(long templateId, java.lang.String version) throws NoSuchTemplateVersionException
NoSuchTemplateVersionException
if it could not be found.templateId
- the template IDversion
- the versionNoSuchTemplateVersionException
- if a matching ddm template version could not be foundpublic static DDMTemplateVersion fetchByT_V(long templateId, java.lang.String version)
null
if it could not be found. Uses the finder cache.templateId
- the template IDversion
- the versionnull
if a matching ddm template version could not be foundpublic static DDMTemplateVersion fetchByT_V(long templateId, java.lang.String version, boolean useFinderCache)
null
if it could not be found, optionally using the finder cache.templateId
- the template IDversion
- the versionuseFinderCache
- whether to use the finder cachenull
if a matching ddm template version could not be foundpublic static DDMTemplateVersion removeByT_V(long templateId, java.lang.String version) throws NoSuchTemplateVersionException
templateId
- the template IDversion
- the versionNoSuchTemplateVersionException
public static int countByT_V(long templateId, java.lang.String version)
templateId
- the template IDversion
- the versionpublic static java.util.List<DDMTemplateVersion> findByT_S(long templateId, int status)
templateId
- the template IDstatus
- the statuspublic static java.util.List<DDMTemplateVersion> findByT_S(long templateId, int status, 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 DDMTemplateVersionModelImpl
.
templateId
- the template IDstatus
- the statusstart
- the lower bound of the range of ddm template versionsend
- the upper bound of the range of ddm template versions (not inclusive)public static java.util.List<DDMTemplateVersion> findByT_S(long templateId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> 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 DDMTemplateVersionModelImpl
.
templateId
- the template IDstatus
- the statusstart
- the lower bound of the range of ddm template versionsend
- the upper bound of the range of ddm template versions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<DDMTemplateVersion> findByT_S(long templateId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> 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 DDMTemplateVersionModelImpl
.
templateId
- the template IDstatus
- the statusstart
- the lower bound of the range of ddm template versionsend
- the upper bound of the range of ddm template versions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static DDMTemplateVersion findByT_S_First(long templateId, int status, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator) throws NoSuchTemplateVersionException
templateId
- the template IDstatus
- the statusorderByComparator
- the comparator to order the set by (optionally null
)NoSuchTemplateVersionException
- if a matching ddm template version could not be foundpublic static DDMTemplateVersion fetchByT_S_First(long templateId, int status, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
templateId
- the template IDstatus
- the statusorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ddm template version could not be foundpublic static DDMTemplateVersion findByT_S_Last(long templateId, int status, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator) throws NoSuchTemplateVersionException
templateId
- the template IDstatus
- the statusorderByComparator
- the comparator to order the set by (optionally null
)NoSuchTemplateVersionException
- if a matching ddm template version could not be foundpublic static DDMTemplateVersion fetchByT_S_Last(long templateId, int status, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator)
templateId
- the template IDstatus
- the statusorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ddm template version could not be foundpublic static DDMTemplateVersion[] findByT_S_PrevAndNext(long templateVersionId, long templateId, int status, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> orderByComparator) throws NoSuchTemplateVersionException
templateVersionId
- the primary key of the current ddm template versiontemplateId
- the template IDstatus
- the statusorderByComparator
- the comparator to order the set by (optionally null
)NoSuchTemplateVersionException
- if a ddm template version with the primary key could not be foundpublic static void removeByT_S(long templateId, int status)
templateId
- the template IDstatus
- the statuspublic static int countByT_S(long templateId, int status)
templateId
- the template IDstatus
- the statuspublic static void cacheResult(DDMTemplateVersion ddmTemplateVersion)
ddmTemplateVersion
- the ddm template versionpublic static void cacheResult(java.util.List<DDMTemplateVersion> ddmTemplateVersions)
ddmTemplateVersions
- the ddm template versionspublic static DDMTemplateVersion create(long templateVersionId)
templateVersionId
- the primary key for the new ddm template versionpublic static DDMTemplateVersion remove(long templateVersionId) throws NoSuchTemplateVersionException
templateVersionId
- the primary key of the ddm template versionNoSuchTemplateVersionException
- if a ddm template version with the primary key could not be foundpublic static DDMTemplateVersion updateImpl(DDMTemplateVersion ddmTemplateVersion)
public static DDMTemplateVersion findByPrimaryKey(long templateVersionId) throws NoSuchTemplateVersionException
NoSuchTemplateVersionException
if it could not be found.templateVersionId
- the primary key of the ddm template versionNoSuchTemplateVersionException
- if a ddm template version with the primary key could not be foundpublic static DDMTemplateVersion fetchByPrimaryKey(long templateVersionId)
null
if it could not be found.templateVersionId
- the primary key of the ddm template versionnull
if a ddm template version with the primary key could not be foundpublic static java.util.List<DDMTemplateVersion> findAll()
public static java.util.List<DDMTemplateVersion> 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 DDMTemplateVersionModelImpl
.
start
- the lower bound of the range of ddm template versionsend
- the upper bound of the range of ddm template versions (not inclusive)public static java.util.List<DDMTemplateVersion> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> 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 DDMTemplateVersionModelImpl
.
start
- the lower bound of the range of ddm template versionsend
- the upper bound of the range of ddm template versions (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<DDMTemplateVersion> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateVersion> 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 DDMTemplateVersionModelImpl
.
start
- the lower bound of the range of ddm template versionsend
- the upper bound of the range of ddm template 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 DDMTemplateVersionPersistence getPersistence()