Liferay 6.0.5

com.liferay.portal.service.persistence
Class ListTypeUtil

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

public class ListTypeUtil
extends Object

The persistence utility for the list type service. This utility wraps ListTypePersistenceImpl 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.

Never modify this class directly. Modify service.xml and rerun ServiceBuilder to regenerate this class.

Caching information and settings can be found in portal.properties

See Also:
ListTypePersistence, ListTypePersistenceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

Constructor Summary
ListTypeUtil()
           
 
Method Summary
static void cacheResult(List<ListType> listTypes)
          Caches the list types in the entity cache if it is enabled.
static void cacheResult(ListType listType)
          Caches the list type in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(ListType listType)
           
static int countAll()
          Counts all the list types.
static int countByType(String type)
          Counts all the list types where type = ?.
 long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static ListType create(int listTypeId)
          Creates a new list type with the primary key.
static ListType fetchByPrimaryKey(int listTypeId)
          Finds the list type with the primary key or returns null if it could not be found.
static List<ListType> findAll()
          Finds all the list types.
static List<ListType> findAll(int start, int end)
          Finds a range of all the list types.
static List<ListType> findAll(int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the list types.
static ListType findByPrimaryKey(int listTypeId)
          Finds the list type with the primary key or throws a NoSuchListTypeException if it could not be found.
static ListType findByType_First(String type, OrderByComparator orderByComparator)
          Finds the first list type in the ordered set where type = ?.
static ListType findByType_Last(String type, OrderByComparator orderByComparator)
          Finds the last list type in the ordered set where type = ?.
static ListType[] findByType_PrevAndNext(int listTypeId, String type, OrderByComparator orderByComparator)
          Finds the list types before and after the current list type in the ordered set where type = ?.
static List<ListType> findByType(String type)
          Finds all the list types where type = ?.
static List<ListType> findByType(String type, int start, int end)
          Finds a range of all the list types where type = ?.
static List<ListType> findByType(String type, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the list types where type = ?.
static List<ListType> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<ListType> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<ListType> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static ListTypePersistence getPersistence()
           
static ListType remove(int listTypeId)
          Removes the list type with the primary key from the database.
static ListType remove(ListType listType)
           
static void removeAll()
          Removes all the list types from the database.
static void removeByType(String type)
          Removes all the list types where type = ? from the database.
 void setPersistence(ListTypePersistence persistence)
           
static ListType update(ListType listType, boolean merge)
           
static ListType update(ListType listType, boolean merge, ServiceContext serviceContext)
           
static ListType updateImpl(ListType listType, boolean merge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListTypeUtil

public ListTypeUtil()
Method Detail

clearCache

public static void clearCache()
See Also:
BasePersistence.clearCache()

clearCache

public static void clearCache(ListType listType)
See Also:
BasePersistence.clearCache(com.liferay.portal.model.BaseModel)

countWithDynamicQuery

public long countWithDynamicQuery(DynamicQuery dynamicQuery)
                           throws SystemException
Throws:
SystemException
See Also:
BasePersistence.countWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<ListType> findWithDynamicQuery(DynamicQuery dynamicQuery)
                                           throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<ListType> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                                  int start,
                                                  int end)
                                           throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)

findWithDynamicQuery

public static List<ListType> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                                  int start,
                                                  int end,
                                                  OrderByComparator orderByComparator)
                                           throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)

remove

public static ListType remove(ListType listType)
                       throws SystemException
Throws:
SystemException
See Also:
BasePersistence.remove(com.liferay.portal.model.BaseModel)

update

public static ListType update(ListType listType,
                              boolean merge)
                       throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean)

update

public static ListType update(ListType listType,
                              boolean merge,
                              ServiceContext serviceContext)
                       throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)

cacheResult

public static void cacheResult(ListType listType)
Caches the list type in the entity cache if it is enabled.

Parameters:
listType - the list type to cache

cacheResult

public static void cacheResult(List<ListType> listTypes)
Caches the list types in the entity cache if it is enabled.

Parameters:
listTypes - the list types to cache

create

public static ListType create(int listTypeId)
Creates a new list type with the primary key. Does not add the list type to the database.

Parameters:
listTypeId - the primary key for the new list type
Returns:
the new list type

remove

public static ListType remove(int listTypeId)
                       throws NoSuchListTypeException,
                              SystemException
Removes the list type with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
listTypeId - the primary key of the list type to remove
Returns:
the list type that was removed
Throws:
NoSuchListTypeException - if a list type with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

public static ListType updateImpl(ListType listType,
                                  boolean merge)
                           throws SystemException
Throws:
SystemException

findByPrimaryKey

public static ListType findByPrimaryKey(int listTypeId)
                                 throws NoSuchListTypeException,
                                        SystemException
Finds the list type with the primary key or throws a NoSuchListTypeException if it could not be found.

Parameters:
listTypeId - the primary key of the list type to find
Returns:
the list type
Throws:
NoSuchListTypeException - if a list type with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

public static ListType fetchByPrimaryKey(int listTypeId)
                                  throws SystemException
Finds the list type with the primary key or returns null if it could not be found.

Parameters:
listTypeId - the primary key of the list type to find
Returns:
the list type, or null if a list type with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findByType

public static List<ListType> findByType(String type)
                                 throws SystemException
Finds all the list types where type = ?.

Parameters:
type - the type to search with
Returns:
the matching list types
Throws:
SystemException - if a system exception occurred

findByType

public static List<ListType> findByType(String type,
                                        int start,
                                        int end)
                                 throws SystemException
Finds a range of all the list types where type = ?.

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.

Parameters:
type - the type to search with
start - the lower bound of the range of list types to return
end - the upper bound of the range of list types to return (not inclusive)
Returns:
the range of matching list types
Throws:
SystemException - if a system exception occurred

findByType

public static List<ListType> findByType(String type,
                                        int start,
                                        int end,
                                        OrderByComparator orderByComparator)
                                 throws SystemException
Finds an ordered range of all the list types where type = ?.

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.

Parameters:
type - the type to search with
start - the lower bound of the range of list types to return
end - the upper bound of the range of list types to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching list types
Throws:
SystemException - if a system exception occurred

findByType_First

public static ListType findByType_First(String type,
                                        OrderByComparator orderByComparator)
                                 throws NoSuchListTypeException,
                                        SystemException
Finds the first list type in the ordered set where type = ?.

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.

Parameters:
type - the type to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching list type
Throws:
NoSuchListTypeException - if a matching list type could not be found
SystemException - if a system exception occurred

findByType_Last

public static ListType findByType_Last(String type,
                                       OrderByComparator orderByComparator)
                                throws NoSuchListTypeException,
                                       SystemException
Finds the last list type in the ordered set where type = ?.

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.

Parameters:
type - the type to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching list type
Throws:
NoSuchListTypeException - if a matching list type could not be found
SystemException - if a system exception occurred

findByType_PrevAndNext

public static ListType[] findByType_PrevAndNext(int listTypeId,
                                                String type,
                                                OrderByComparator orderByComparator)
                                         throws NoSuchListTypeException,
                                                SystemException
Finds the list types before and after the current list type in the ordered set where type = ?.

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.

Parameters:
listTypeId - the primary key of the current list type
type - the type to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next list type
Throws:
NoSuchListTypeException - if a list type with the primary key could not be found
SystemException - if a system exception occurred

findAll

public static List<ListType> findAll()
                              throws SystemException
Finds all the list types.

Returns:
the list types
Throws:
SystemException - if a system exception occurred

findAll

public static List<ListType> findAll(int start,
                                     int end)
                              throws SystemException
Finds a range of all the list types.

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.

Parameters:
start - the lower bound of the range of list types to return
end - the upper bound of the range of list types to return (not inclusive)
Returns:
the range of list types
Throws:
SystemException - if a system exception occurred

findAll

public static List<ListType> findAll(int start,
                                     int end,
                                     OrderByComparator orderByComparator)
                              throws SystemException
Finds an ordered range of all the list types.

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.

Parameters:
start - the lower bound of the range of list types to return
end - the upper bound of the range of list types to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of list types
Throws:
SystemException - if a system exception occurred

removeByType

public static void removeByType(String type)
                         throws SystemException
Removes all the list types where type = ? from the database.

Parameters:
type - the type to search with
Throws:
SystemException - if a system exception occurred

removeAll

public static void removeAll()
                      throws SystemException
Removes all the list types from the database.

Throws:
SystemException - if a system exception occurred

countByType

public static int countByType(String type)
                       throws SystemException
Counts all the list types where type = ?.

Parameters:
type - the type to search with
Returns:
the number of matching list types
Throws:
SystemException - if a system exception occurred

countAll

public static int countAll()
                    throws SystemException
Counts all the list types.

Returns:
the number of list types
Throws:
SystemException - if a system exception occurred

getPersistence

public static ListTypePersistence getPersistence()

setPersistence

public void setPersistence(ListTypePersistence persistence)

Liferay 6.0.5