Liferay 7.0-ce-b4

com.liferay.portal.service.persistence
Class ListTypeUtil

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

@ProviderType
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.

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 it 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()
          Returns the number of list types.
static int countByN_T(String name, String type)
          Returns the number of list types where name = ? and type = ?.
static int countByType(String type)
          Returns the number of list types where type = ?.
static long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static ListType create(long listTypeId)
          Creates a new list type with the primary key.
static ListType fetchByN_T(String name, String type)
          Returns the list type where name = ? and type = ? or returns null if it could not be found.
static ListType fetchByN_T(String name, String type, boolean retrieveFromCache)
          Returns the list type where name = ? and type = ? or returns null if it could not be found, optionally using the finder cache.
static ListType fetchByPrimaryKey(long listTypeId)
          Returns the list type with the primary key or returns null if it could not be found.
static Map<Serializable,ListType> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
           
static ListType fetchByType_First(String type, OrderByComparator<ListType> orderByComparator)
          Returns the first list type in the ordered set where type = ?.
static ListType fetchByType_Last(String type, OrderByComparator<ListType> orderByComparator)
          Returns the last list type in the ordered set where type = ?.
static List<ListType> findAll()
          Returns all the list types.
static List<ListType> findAll(int start, int end)
          Returns a range of all the list types.
static List<ListType> findAll(int start, int end, OrderByComparator<ListType> orderByComparator)
          Returns an ordered range of all the list types.
static List<ListType> findAll(int start, int end, OrderByComparator<ListType> orderByComparator, boolean retrieveFromCache)
          Returns an ordered range of all the list types.
static ListType findByN_T(String name, String type)
          Returns the list type where name = ? and type = ? or throws a NoSuchListTypeException if it could not be found.
static ListType findByPrimaryKey(long listTypeId)
          Returns the list type with the primary key or throws a NoSuchListTypeException if it could not be found.
static ListType findByType_First(String type, OrderByComparator<ListType> orderByComparator)
          Returns the first list type in the ordered set where type = ?.
static ListType findByType_Last(String type, OrderByComparator<ListType> orderByComparator)
          Returns the last list type in the ordered set where type = ?.
static ListType[] findByType_PrevAndNext(long listTypeId, String type, OrderByComparator<ListType> orderByComparator)
          Returns the list types before and after the current list type in the ordered set where type = ?.
static List<ListType> findByType(String type)
          Returns all the list types where type = ?.
static List<ListType> findByType(String type, int start, int end)
          Returns a range of all the list types where type = ?.
static List<ListType> findByType(String type, int start, int end, OrderByComparator<ListType> orderByComparator)
          Returns an ordered range of all the list types where type = ?.
static List<ListType> findByType(String type, int start, int end, OrderByComparator<ListType> orderByComparator, boolean retrieveFromCache)
          Returns 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<ListType> orderByComparator)
           
static Set<String> getBadColumnNames()
           
static ListTypePersistence getPersistence()
           
static ListType remove(long listTypeId)
          Removes the list type with the primary key from the database.
static void removeAll()
          Removes all the list types from the database.
static ListType removeByN_T(String name, String type)
          Removes the list type where name = ? and type = ? from the database.
static void removeByType(String type)
          Removes all the list types where type = ? from the database.
static ListType update(ListType listType)
           
static ListType update(ListType listType, ServiceContext serviceContext)
           
static ListType updateImpl(ListType listType)
           
 
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 static long countWithDynamicQuery(DynamicQuery dynamicQuery)
See Also:
BasePersistence.countWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

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

findWithDynamicQuery

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

findWithDynamicQuery

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

update

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

update

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

findByType

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

Parameters:
type - the type
Returns:
the matching list types

findByType

public static List<ListType> findByType(String type,
                                        int start,
                                        int end)
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil#ALL_POS), then the query will include the default ORDER BY logic from ListTypeModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
type - the type
start - the lower bound of the range of list types
end - the upper bound of the range of list types (not inclusive)
Returns:
the range of matching list types

findByType

public static List<ListType> findByType(String type,
                                        int start,
                                        int end,
                                        OrderByComparator<ListType> orderByComparator)
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil#ALL_POS), then the query will include the default ORDER BY logic from ListTypeModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
type - the type
start - the lower bound of the range of list types
end - the upper bound of the range of list types (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching list types

findByType

public static List<ListType> findByType(String type,
                                        int start,
                                        int end,
                                        OrderByComparator<ListType> orderByComparator,
                                        boolean retrieveFromCache)
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil#ALL_POS), then the query will include the default ORDER BY logic from ListTypeModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
type - the type
start - the lower bound of the range of list types
end - the upper bound of the range of list types (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
retrieveFromCache - whether to retrieve from the finder cache
Returns:
the ordered range of matching list types

findByType_First

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

Parameters:
type - the type
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching list type
Throws:
NoSuchListTypeException - if a matching list type could not be found

fetchByType_First

public static ListType fetchByType_First(String type,
                                         OrderByComparator<ListType> orderByComparator)
Returns the first list type in the ordered set where type = ?.

Parameters:
type - the type
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching list type, or null if a matching list type could not be found

findByType_Last

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

Parameters:
type - the type
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching list type
Throws:
NoSuchListTypeException - if a matching list type could not be found

fetchByType_Last

public static ListType fetchByType_Last(String type,
                                        OrderByComparator<ListType> orderByComparator)
Returns the last list type in the ordered set where type = ?.

Parameters:
type - the type
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching list type, or null if a matching list type could not be found

findByType_PrevAndNext

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

Parameters:
listTypeId - the primary key of the current list type
type - the type
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next list type
Throws:
NoSuchListTypeException - if a list type with the primary key could not be found

removeByType

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

Parameters:
type - the type

countByType

public static int countByType(String type)
Returns the number of list types where type = ?.

Parameters:
type - the type
Returns:
the number of matching list types

findByN_T

public static ListType findByN_T(String name,
                                 String type)
                          throws NoSuchListTypeException
Returns the list type where name = ? and type = ? or throws a NoSuchListTypeException if it could not be found.

Parameters:
name - the name
type - the type
Returns:
the matching list type
Throws:
NoSuchListTypeException - if a matching list type could not be found

fetchByN_T

public static ListType fetchByN_T(String name,
                                  String type)
Returns the list type where name = ? and type = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
name - the name
type - the type
Returns:
the matching list type, or null if a matching list type could not be found

fetchByN_T

public static ListType fetchByN_T(String name,
                                  String type,
                                  boolean retrieveFromCache)
Returns the list type where name = ? and type = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
name - the name
type - the type
retrieveFromCache - whether to retrieve from the finder cache
Returns:
the matching list type, or null if a matching list type could not be found

removeByN_T

public static ListType removeByN_T(String name,
                                   String type)
                            throws NoSuchListTypeException
Removes the list type where name = ? and type = ? from the database.

Parameters:
name - the name
type - the type
Returns:
the list type that was removed
Throws:
NoSuchListTypeException

countByN_T

public static int countByN_T(String name,
                             String type)
Returns the number of list types where name = ? and type = ?.

Parameters:
name - the name
type - the type
Returns:
the number of matching list types

cacheResult

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

Parameters:
listType - the list type

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

create

public static ListType create(long 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(long listTypeId)
                       throws NoSuchListTypeException
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
Returns:
the list type that was removed
Throws:
NoSuchListTypeException - if a list type with the primary key could not be found

updateImpl

public static ListType updateImpl(ListType listType)

findByPrimaryKey

public static ListType findByPrimaryKey(long listTypeId)
                                 throws NoSuchListTypeException
Returns 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
Returns:
the list type
Throws:
NoSuchListTypeException - if a list type with the primary key could not be found

fetchByPrimaryKey

public static ListType fetchByPrimaryKey(long listTypeId)
Returns 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
Returns:
the list type, or null if a list type with the primary key could not be found

fetchByPrimaryKeys

public static Map<Serializable,ListType> fetchByPrimaryKeys(Set<Serializable> primaryKeys)

findAll

public static List<ListType> findAll()
Returns all the list types.

Returns:
the list types

findAll

public static List<ListType> findAll(int start,
                                     int end)
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil#ALL_POS), then the query will include the default ORDER BY logic from ListTypeModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
start - the lower bound of the range of list types
end - the upper bound of the range of list types (not inclusive)
Returns:
the range of list types

findAll

public static List<ListType> findAll(int start,
                                     int end,
                                     OrderByComparator<ListType> orderByComparator)
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil#ALL_POS), then the query will include the default ORDER BY logic from ListTypeModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
start - the lower bound of the range of list types
end - the upper bound of the range of list types (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of list types

findAll

public static List<ListType> findAll(int start,
                                     int end,
                                     OrderByComparator<ListType> orderByComparator,
                                     boolean retrieveFromCache)
Returns 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil#ALL_POS), then the query will include the default ORDER BY logic from ListTypeModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
start - the lower bound of the range of list types
end - the upper bound of the range of list types (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
retrieveFromCache - whether to retrieve from the finder cache
Returns:
the ordered range of list types

removeAll

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


countAll

public static int countAll()
Returns the number of list types.

Returns:
the number of list types

getBadColumnNames

public static Set<String> getBadColumnNames()

getPersistence

public static ListTypePersistence getPersistence()

Liferay 7.0-ce-b4