Class ReleaseUtil
java.lang.Object
com.liferay.portal.kernel.service.persistence.ReleaseUtil
The persistence utility for the release service. This utility wraps
com.liferay.portal.service.persistence.impl.ReleasePersistenceImpl 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
- Author:
- Brian Wing Shun Chan
- See Also:
- Generated:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcacheResult(Release release) static voidcacheResult(List<Release> releases) static voidstatic voidclearCache(Release release) static intcountByServletContextName(String servletContextName) Returns the number of releases where servletContextName = ?.static longcountWithDynamicQuery(DynamicQuery dynamicQuery) static Releasecreate(long releaseId) Creates a new release with the primary key.static ReleasefetchByPrimaryKey(long releaseId) Returns the release with the primary key or returnsnullif it could not be found.static Map<Serializable, Release> fetchByPrimaryKeys(Set<Serializable> primaryKeys) static ReleasefetchByServletContextName(String servletContextName) Returns the release where servletContextName = ? or returnsnullif it could not be found.static ReleasefetchByServletContextName(String servletContextName, boolean useFinderCache) Returns the release where servletContextName = ? or returnsnullif it could not be found, optionally using the finder cache.static ReleasefindByPrimaryKey(long releaseId) Returns the release with the primary key or throws aNoSuchReleaseExceptionif it could not be found.static ReleasefindByServletContextName(String servletContextName) Returns the release where servletContextName = ? or throws aNoSuchReleaseExceptionif it could not be found.findWithDynamicQuery(DynamicQuery dynamicQuery) findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<Release> orderByComparator) static ReleasePersistencestatic Releaseremove(long releaseId) Removes the release with the primary key from the database.static ReleaseremoveByServletContextName(String servletContextName) Removes the release where servletContextName = ? from the database.static voidsetPersistence(ReleasePersistence persistence) static Releasestatic Releaseupdate(Release release, ServiceContext serviceContext) static ReleaseupdateImpl(Release release)
-
Constructor Details
-
ReleaseUtil
public ReleaseUtil()
-
-
Method Details
-
cacheResult
- See Also:
-
cacheResult
- See Also:
-
clearCache
public static void clearCache()- See Also:
-
clearCache
- See Also:
-
countWithDynamicQuery
- See Also:
-
fetchByPrimaryKeys
- See Also:
-
findWithDynamicQuery
- See Also:
-
findWithDynamicQuery
- See Also:
-
findWithDynamicQuery
public static List<Release> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<Release> orderByComparator) - See Also:
-
update
- See Also:
-
update
- See Also:
-
findByServletContextName
public static Release findByServletContextName(String servletContextName) throws NoSuchReleaseException Returns the release where servletContextName = ? or throws aNoSuchReleaseExceptionif it could not be found.- Parameters:
servletContextName- the servlet context name- Returns:
- the matching release
-
fetchByServletContextName
Returns the release where servletContextName = ? or returnsnullif it could not be found, optionally using the finder cache.- Parameters:
servletContextName- the servlet context nameuseFinderCache- whether to use the finder cache- Returns:
- the matching release, or
nullif a matching release could not be found
-
removeByServletContextName
public static Release removeByServletContextName(String servletContextName) throws NoSuchReleaseException Removes the release where servletContextName = ? from the database.- Parameters:
servletContextName- the servlet context name- Returns:
- the release that was removed
- Throws:
NoSuchReleaseException
-
countByServletContextName
Returns the number of releases where servletContextName = ?.- Parameters:
servletContextName- the servlet context name- Returns:
- the number of matching releases
-
create
Creates a new release with the primary key. Does not add the release to the database.- Parameters:
releaseId- the primary key for the new release- Returns:
- the new release
-
remove
Removes the release with the primary key from the database. Also notifies the appropriate model listeners.- Parameters:
releaseId- the primary key of the release- Returns:
- the release that was removed
-
updateImpl
-
findByPrimaryKey
Returns the release with the primary key or throws aNoSuchReleaseExceptionif it could not be found.- Parameters:
releaseId- the primary key of the release- Returns:
- the release
-
fetchByPrimaryKey
Returns the release with the primary key or returnsnullif it could not be found.- Parameters:
releaseId- the primary key of the release- Returns:
- the release, or
nullif a release with the primary key could not be found
-
fetchByServletContextName
Returns the release where servletContextName = ? or returnsnullif it could not be found. Uses the finder cache.- Parameters:
servletContextName- the servlet context name- Returns:
- the matching release, or
nullif a matching release could not be found
-
getPersistence
-
setPersistence
-