Class ClassNameUtil
java.lang.Object
com.liferay.portal.kernel.service.persistence.ClassNameUtil
The persistence utility for the class name service. This utility wraps
com.liferay.portal.service.persistence.impl.ClassNamePersistenceImpl 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(ClassName className) static voidcacheResult(List<ClassName> classNames) static voidstatic voidclearCache(ClassName className) static intcountByValue(String value) Returns the number of class names where value = ?.static longcountWithDynamicQuery(DynamicQuery dynamicQuery) static ClassNamecreate(long classNameId) Creates a new class name with the primary key.static ClassNamefetchByPrimaryKey(long classNameId) Returns the class name with the primary key or returnsnullif it could not be found.static Map<Serializable, ClassName> fetchByPrimaryKeys(Set<Serializable> primaryKeys) static ClassNamefetchByValue(String value) Returns the class name where value = ? or returnsnullif it could not be found.static ClassNamefetchByValue(String value, boolean useFinderCache) Returns the class name where value = ? or returnsnullif it could not be found, optionally using the finder cache.static ClassNamefindByPrimaryKey(long classNameId) Returns the class name with the primary key or throws aNoSuchClassNameExceptionif it could not be found.static ClassNamefindByValue(String value) Returns the class name where value = ? or throws aNoSuchClassNameExceptionif it could not be found.findWithDynamicQuery(DynamicQuery dynamicQuery) findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<ClassName> orderByComparator) static ClassNamePersistencestatic ClassNameremove(long classNameId) Removes the class name with the primary key from the database.static ClassNameremoveByValue(String value) Removes the class name where value = ? from the database.static voidsetPersistence(ClassNamePersistence persistence) static ClassNamestatic ClassNameupdate(ClassName className, ServiceContext serviceContext) static ClassNameupdateImpl(ClassName className)
-
Constructor Details
-
ClassNameUtil
public ClassNameUtil()
-
-
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<ClassName> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<ClassName> orderByComparator) - See Also:
-
update
- See Also:
-
update
- See Also:
-
findByValue
Returns the class name where value = ? or throws aNoSuchClassNameExceptionif it could not be found.- Parameters:
value- the value- Returns:
- the matching class name
-
fetchByValue
Returns the class name where value = ? or returnsnullif it could not be found, optionally using the finder cache.- Parameters:
value- the valueuseFinderCache- whether to use the finder cache- Returns:
- the matching class name, or
nullif a matching class name could not be found
-
removeByValue
Removes the class name where value = ? from the database.- Parameters:
value- the value- Returns:
- the class name that was removed
- Throws:
NoSuchClassNameException
-
countByValue
Returns the number of class names where value = ?.- Parameters:
value- the value- Returns:
- the number of matching class names
-
create
Creates a new class name with the primary key. Does not add the class name to the database.- Parameters:
classNameId- the primary key for the new class name- Returns:
- the new class name
-
remove
Removes the class name with the primary key from the database. Also notifies the appropriate model listeners.- Parameters:
classNameId- the primary key of the class name- Returns:
- the class name that was removed
-
updateImpl
-
findByPrimaryKey
Returns the class name with the primary key or throws aNoSuchClassNameExceptionif it could not be found.- Parameters:
classNameId- the primary key of the class name- Returns:
- the class name
-
fetchByPrimaryKey
Returns the class name with the primary key or returnsnullif it could not be found.- Parameters:
classNameId- the primary key of the class name- Returns:
- the class name, or
nullif a class name with the primary key could not be found
-
fetchByValue
Returns the class name where value = ? or returnsnullif it could not be found. Uses the finder cache.- Parameters:
value- the value- Returns:
- the matching class name, or
nullif a matching class name could not be found
-
getPersistence
-
setPersistence
-