public class DDMTemplateLinkUtil
extends java.lang.Object
com.liferay.dynamic.data.mapping.service.persistence.impl.DDMTemplateLinkPersistenceImpl
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
DDMTemplateLinkPersistence
Constructor and Description |
---|
DDMTemplateLinkUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(DDMTemplateLink ddmTemplateLink)
Caches the ddm template link in the entity cache if it is enabled.
|
static void |
cacheResult(java.util.List<DDMTemplateLink> ddmTemplateLinks)
Caches the ddm template links in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(DDMTemplateLink ddmTemplateLink) |
static int |
countAll()
Returns the number of ddm template links.
|
static int |
countByC_C(long classNameId,
long classPK)
Returns the number of ddm template links where classNameId = ? and classPK = ?.
|
static int |
countByTemplateId(long templateId)
Returns the number of ddm template links where templateId = ?.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static DDMTemplateLink |
create(long templateLinkId)
Creates a new ddm template link with the primary key.
|
static DDMTemplateLink |
fetchByC_C(long classNameId,
long classPK)
Returns the ddm template link where classNameId = ? and classPK = ? or returns
null if it could not be found. |
static DDMTemplateLink |
fetchByC_C(long classNameId,
long classPK,
boolean useFinderCache)
Returns the ddm template link where classNameId = ? and classPK = ? or returns
null if it could not be found, optionally using the finder cache. |
static DDMTemplateLink |
fetchByPrimaryKey(long templateLinkId)
Returns the ddm template link with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,DDMTemplateLink> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static DDMTemplateLink |
fetchByTemplateId_First(long templateId,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator)
Returns the first ddm template link in the ordered set where templateId = ?.
|
static DDMTemplateLink |
fetchByTemplateId_Last(long templateId,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator)
Returns the last ddm template link in the ordered set where templateId = ?.
|
static java.util.List<DDMTemplateLink> |
findAll()
Returns all the ddm template links.
|
static java.util.List<DDMTemplateLink> |
findAll(int start,
int end)
Returns a range of all the ddm template links.
|
static java.util.List<DDMTemplateLink> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator)
Returns an ordered range of all the ddm template links.
|
static java.util.List<DDMTemplateLink> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the ddm template links.
|
static DDMTemplateLink |
findByC_C(long classNameId,
long classPK)
Returns the ddm template link where classNameId = ? and classPK = ? or throws a
NoSuchTemplateLinkException if it could not be found. |
static DDMTemplateLink |
findByPrimaryKey(long templateLinkId)
Returns the ddm template link with the primary key or throws a
NoSuchTemplateLinkException if it could not be found. |
static DDMTemplateLink |
findByTemplateId_First(long templateId,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator)
Returns the first ddm template link in the ordered set where templateId = ?.
|
static DDMTemplateLink |
findByTemplateId_Last(long templateId,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator)
Returns the last ddm template link in the ordered set where templateId = ?.
|
static DDMTemplateLink[] |
findByTemplateId_PrevAndNext(long templateLinkId,
long templateId,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator)
Returns the ddm template links before and after the current ddm template link in the ordered set where templateId = ?.
|
static java.util.List<DDMTemplateLink> |
findByTemplateId(long templateId)
Returns all the ddm template links where templateId = ?.
|
static java.util.List<DDMTemplateLink> |
findByTemplateId(long templateId,
int start,
int end)
Returns a range of all the ddm template links where templateId = ?.
|
static java.util.List<DDMTemplateLink> |
findByTemplateId(long templateId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator)
Returns an ordered range of all the ddm template links where templateId = ?.
|
static java.util.List<DDMTemplateLink> |
findByTemplateId(long templateId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the ddm template links where templateId = ?.
|
static java.util.List<DDMTemplateLink> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<DDMTemplateLink> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<DDMTemplateLink> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator) |
static DDMTemplateLinkPersistence |
getPersistence() |
static DDMTemplateLink |
remove(long templateLinkId)
Removes the ddm template link with the primary key from the database.
|
static void |
removeAll()
Removes all the ddm template links from the database.
|
static DDMTemplateLink |
removeByC_C(long classNameId,
long classPK)
Removes the ddm template link where classNameId = ? and classPK = ? from the database.
|
static void |
removeByTemplateId(long templateId)
Removes all the ddm template links where templateId = ? from the database.
|
static DDMTemplateLink |
update(DDMTemplateLink ddmTemplateLink) |
static DDMTemplateLink |
update(DDMTemplateLink ddmTemplateLink,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static DDMTemplateLink |
updateImpl(DDMTemplateLink ddmTemplateLink) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(DDMTemplateLink ddmTemplateLink)
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,DDMTemplateLink> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<DDMTemplateLink> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<DDMTemplateLink> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<DDMTemplateLink> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static DDMTemplateLink update(DDMTemplateLink ddmTemplateLink)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static DDMTemplateLink update(DDMTemplateLink ddmTemplateLink, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static java.util.List<DDMTemplateLink> findByTemplateId(long templateId)
templateId
- the template IDpublic static java.util.List<DDMTemplateLink> 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 DDMTemplateLinkModelImpl
.
templateId
- the template IDstart
- the lower bound of the range of ddm template linksend
- the upper bound of the range of ddm template links (not inclusive)public static java.util.List<DDMTemplateLink> findByTemplateId(long templateId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> 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 DDMTemplateLinkModelImpl
.
templateId
- the template IDstart
- the lower bound of the range of ddm template linksend
- the upper bound of the range of ddm template links (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<DDMTemplateLink> findByTemplateId(long templateId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> 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 DDMTemplateLinkModelImpl
.
templateId
- the template IDstart
- the lower bound of the range of ddm template linksend
- the upper bound of the range of ddm template links (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static DDMTemplateLink findByTemplateId_First(long templateId, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator) throws NoSuchTemplateLinkException
templateId
- the template IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchTemplateLinkException
- if a matching ddm template link could not be foundpublic static DDMTemplateLink fetchByTemplateId_First(long templateId, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator)
templateId
- the template IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ddm template link could not be foundpublic static DDMTemplateLink findByTemplateId_Last(long templateId, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator) throws NoSuchTemplateLinkException
templateId
- the template IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchTemplateLinkException
- if a matching ddm template link could not be foundpublic static DDMTemplateLink fetchByTemplateId_Last(long templateId, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator)
templateId
- the template IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching ddm template link could not be foundpublic static DDMTemplateLink[] findByTemplateId_PrevAndNext(long templateLinkId, long templateId, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> orderByComparator) throws NoSuchTemplateLinkException
templateLinkId
- the primary key of the current ddm template linktemplateId
- the template IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchTemplateLinkException
- if a ddm template link 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 DDMTemplateLink findByC_C(long classNameId, long classPK) throws NoSuchTemplateLinkException
NoSuchTemplateLinkException
if it could not be found.classNameId
- the class name IDclassPK
- the class pkNoSuchTemplateLinkException
- if a matching ddm template link could not be foundpublic static DDMTemplateLink fetchByC_C(long classNameId, long classPK)
null
if it could not be found. Uses the finder cache.classNameId
- the class name IDclassPK
- the class pknull
if a matching ddm template link could not be foundpublic static DDMTemplateLink fetchByC_C(long classNameId, long classPK, boolean useFinderCache)
null
if it could not be found, optionally using the finder cache.classNameId
- the class name IDclassPK
- the class pkuseFinderCache
- whether to use the finder cachenull
if a matching ddm template link could not be foundpublic static DDMTemplateLink removeByC_C(long classNameId, long classPK) throws NoSuchTemplateLinkException
classNameId
- the class name IDclassPK
- the class pkNoSuchTemplateLinkException
public static int countByC_C(long classNameId, long classPK)
classNameId
- the class name IDclassPK
- the class pkpublic static void cacheResult(DDMTemplateLink ddmTemplateLink)
ddmTemplateLink
- the ddm template linkpublic static void cacheResult(java.util.List<DDMTemplateLink> ddmTemplateLinks)
ddmTemplateLinks
- the ddm template linkspublic static DDMTemplateLink create(long templateLinkId)
templateLinkId
- the primary key for the new ddm template linkpublic static DDMTemplateLink remove(long templateLinkId) throws NoSuchTemplateLinkException
templateLinkId
- the primary key of the ddm template linkNoSuchTemplateLinkException
- if a ddm template link with the primary key could not be foundpublic static DDMTemplateLink updateImpl(DDMTemplateLink ddmTemplateLink)
public static DDMTemplateLink findByPrimaryKey(long templateLinkId) throws NoSuchTemplateLinkException
NoSuchTemplateLinkException
if it could not be found.templateLinkId
- the primary key of the ddm template linkNoSuchTemplateLinkException
- if a ddm template link with the primary key could not be foundpublic static DDMTemplateLink fetchByPrimaryKey(long templateLinkId)
null
if it could not be found.templateLinkId
- the primary key of the ddm template linknull
if a ddm template link with the primary key could not be foundpublic static java.util.List<DDMTemplateLink> findAll()
public static java.util.List<DDMTemplateLink> 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 DDMTemplateLinkModelImpl
.
start
- the lower bound of the range of ddm template linksend
- the upper bound of the range of ddm template links (not inclusive)public static java.util.List<DDMTemplateLink> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> 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 DDMTemplateLinkModelImpl
.
start
- the lower bound of the range of ddm template linksend
- the upper bound of the range of ddm template links (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<DDMTemplateLink> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplateLink> 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 DDMTemplateLinkModelImpl
.
start
- the lower bound of the range of ddm template linksend
- the upper bound of the range of ddm template links (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 DDMTemplateLinkPersistence getPersistence()