com.liferay.portal.service.persistence
Class ClassNameUtil

java.lang.Object
  extended by com.liferay.portal.service.persistence.ClassNameUtil

public class ClassNameUtil
extends java.lang.Object

View Source

Author:
Brian Wing Shun Chan

Constructor Summary
ClassNameUtil()
           
 
Method Summary
static int countAll()
           
static int countByValue(java.lang.String value)
           
static ClassName create(long classNameId)
           
static ClassName fetchByPrimaryKey(long classNameId)
           
static ClassName fetchByValue(java.lang.String value)
           
static java.util.List<ClassName> findAll()
           
static java.util.List<ClassName> findAll(int start, int end)
           
static java.util.List<ClassName> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
           
static ClassName findByPrimaryKey(long classNameId)
           
static ClassName findByValue(java.lang.String value)
           
static java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
           
static java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
           
static ClassNamePersistence getPersistence()
           
static ClassName remove(ClassName className)
           
static ClassName remove(long classNameId)
           
static void removeAll()
           
static void removeByValue(java.lang.String value)
           
 void setPersistence(ClassNamePersistence persistence)
           
static ClassName update(ClassName className)
          Deprecated. Use update(ClassName className, boolean merge).
static ClassName update(ClassName className, boolean merge)
          Add, update, or merge, the entity.
static ClassName updateImpl(ClassName className, boolean merge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassNameUtil

public ClassNameUtil()
Method Detail

create

public static ClassName create(long classNameId)

remove

public static ClassName remove(long classNameId)
                        throws NoSuchClassNameException,
                               com.liferay.portal.SystemException
Throws:
NoSuchClassNameException
com.liferay.portal.SystemException

remove

public static ClassName remove(ClassName className)
                        throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

update

public static ClassName update(ClassName className)
                        throws com.liferay.portal.SystemException
Deprecated. Use update(ClassName className, boolean merge).

Throws:
com.liferay.portal.SystemException

update

public static ClassName update(ClassName className,
                               boolean merge)
                        throws com.liferay.portal.SystemException
Add, update, or merge, the entity. This method also calls the model listeners to trigger the proper events associated with adding, deleting, or updating an entity.

Parameters:
className - the entity to add, update, or merge
merge - boolean value for whether to merge the entity. The default value is false. Setting merge to true is more expensive and should only be true when className is transient. See LEP-5473 for a detailed discussion of this method.
Returns:
true if the portlet can be displayed via Ajax
Throws:
com.liferay.portal.SystemException

updateImpl

public static ClassName updateImpl(ClassName className,
                                   boolean merge)
                            throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByPrimaryKey

public static ClassName findByPrimaryKey(long classNameId)
                                  throws NoSuchClassNameException,
                                         com.liferay.portal.SystemException
Throws:
NoSuchClassNameException
com.liferay.portal.SystemException

fetchByPrimaryKey

public static ClassName fetchByPrimaryKey(long classNameId)
                                   throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByValue

public static ClassName findByValue(java.lang.String value)
                             throws NoSuchClassNameException,
                                    com.liferay.portal.SystemException
Throws:
NoSuchClassNameException
com.liferay.portal.SystemException

fetchByValue

public static ClassName fetchByValue(java.lang.String value)
                              throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findWithDynamicQuery

public static java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
                                                             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findWithDynamicQuery

public static java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
                                                                    int start,
                                                                    int end)
                                                             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findAll

public static java.util.List<ClassName> findAll()
                                         throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findAll

public static java.util.List<ClassName> findAll(int start,
                                                int end)
                                         throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findAll

public static java.util.List<ClassName> findAll(int start,
                                                int end,
                                                com.liferay.portal.kernel.util.OrderByComparator obc)
                                         throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

removeByValue

public static void removeByValue(java.lang.String value)
                          throws NoSuchClassNameException,
                                 com.liferay.portal.SystemException
Throws:
NoSuchClassNameException
com.liferay.portal.SystemException

removeAll

public static void removeAll()
                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

countByValue

public static int countByValue(java.lang.String value)
                        throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

countAll

public static int countAll()
                    throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getPersistence

public static ClassNamePersistence getPersistence()

setPersistence

public void setPersistence(ClassNamePersistence persistence)