Liferay 6.0.5

com.liferay.portlet.expando.service.persistence
Class ExpandoTableUtil

java.lang.Object
  extended by com.liferay.portlet.expando.service.persistence.ExpandoTableUtil

public class ExpandoTableUtil
extends Object

The persistence utility for the expando table service. This utility wraps ExpandoTablePersistenceImpl 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:
ExpandoTablePersistence, ExpandoTablePersistenceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

Constructor Summary
ExpandoTableUtil()
           
 
Method Summary
static void cacheResult(ExpandoTable expandoTable)
          Caches the expando table in the entity cache if it is enabled.
static void cacheResult(List<ExpandoTable> expandoTables)
          Caches the expando tables in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(ExpandoTable expandoTable)
           
static int countAll()
          Counts all the expando tables.
static int countByC_C_N(long companyId, long classNameId, String name)
          Counts all the expando tables where companyId = ? and classNameId = ? and name = ?.
static int countByC_C(long companyId, long classNameId)
          Counts all the expando tables where companyId = ? and classNameId = ?.
 long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static ExpandoTable create(long tableId)
          Creates a new expando table with the primary key.
static ExpandoTable fetchByC_C_N(long companyId, long classNameId, String name)
          Finds the expando table where companyId = ? and classNameId = ? and name = ? or returns null if it could not be found.
static ExpandoTable fetchByC_C_N(long companyId, long classNameId, String name, boolean retrieveFromCache)
          Finds the expando table where companyId = ? and classNameId = ? and name = ? or returns null if it could not be found, optionally using the finder cache.
static ExpandoTable fetchByPrimaryKey(long tableId)
          Finds the expando table with the primary key or returns null if it could not be found.
static List<ExpandoTable> findAll()
          Finds all the expando tables.
static List<ExpandoTable> findAll(int start, int end)
          Finds a range of all the expando tables.
static List<ExpandoTable> findAll(int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the expando tables.
static ExpandoTable findByC_C_First(long companyId, long classNameId, OrderByComparator orderByComparator)
          Finds the first expando table in the ordered set where companyId = ? and classNameId = ?.
static ExpandoTable findByC_C_Last(long companyId, long classNameId, OrderByComparator orderByComparator)
          Finds the last expando table in the ordered set where companyId = ? and classNameId = ?.
static ExpandoTable findByC_C_N(long companyId, long classNameId, String name)
          Finds the expando table where companyId = ? and classNameId = ? and name = ? or throws a NoSuchTableException if it could not be found.
static ExpandoTable[] findByC_C_PrevAndNext(long tableId, long companyId, long classNameId, OrderByComparator orderByComparator)
          Finds the expando tables before and after the current expando table in the ordered set where companyId = ? and classNameId = ?.
static List<ExpandoTable> findByC_C(long companyId, long classNameId)
          Finds all the expando tables where companyId = ? and classNameId = ?.
static List<ExpandoTable> findByC_C(long companyId, long classNameId, int start, int end)
          Finds a range of all the expando tables where companyId = ? and classNameId = ?.
static List<ExpandoTable> findByC_C(long companyId, long classNameId, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the expando tables where companyId = ? and classNameId = ?.
static ExpandoTable findByPrimaryKey(long tableId)
          Finds the expando table with the primary key or throws a NoSuchTableException if it could not be found.
static List<ExpandoTable> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<ExpandoTable> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<ExpandoTable> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static ExpandoTablePersistence getPersistence()
           
static ExpandoTable remove(ExpandoTable expandoTable)
           
static ExpandoTable remove(long tableId)
          Removes the expando table with the primary key from the database.
static void removeAll()
          Removes all the expando tables from the database.
static void removeByC_C_N(long companyId, long classNameId, String name)
          Removes the expando table where companyId = ? and classNameId = ? and name = ? from the database.
static void removeByC_C(long companyId, long classNameId)
          Removes all the expando tables where companyId = ? and classNameId = ? from the database.
 void setPersistence(ExpandoTablePersistence persistence)
           
static ExpandoTable update(ExpandoTable expandoTable, boolean merge)
           
static ExpandoTable update(ExpandoTable expandoTable, boolean merge, ServiceContext serviceContext)
           
static ExpandoTable updateImpl(ExpandoTable expandoTable, boolean merge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpandoTableUtil

public ExpandoTableUtil()
Method Detail

clearCache

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

clearCache

public static void clearCache(ExpandoTable expandoTable)
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<ExpandoTable> findWithDynamicQuery(DynamicQuery dynamicQuery)
                                               throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

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

findWithDynamicQuery

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

remove

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

update

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

update

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

cacheResult

public static void cacheResult(ExpandoTable expandoTable)
Caches the expando table in the entity cache if it is enabled.

Parameters:
expandoTable - the expando table to cache

cacheResult

public static void cacheResult(List<ExpandoTable> expandoTables)
Caches the expando tables in the entity cache if it is enabled.

Parameters:
expandoTables - the expando tables to cache

create

public static ExpandoTable create(long tableId)
Creates a new expando table with the primary key. Does not add the expando table to the database.

Parameters:
tableId - the primary key for the new expando table
Returns:
the new expando table

remove

public static ExpandoTable remove(long tableId)
                           throws SystemException,
                                  NoSuchTableException
Removes the expando table with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
tableId - the primary key of the expando table to remove
Returns:
the expando table that was removed
Throws:
NoSuchTableException - if a expando table with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

public static ExpandoTable updateImpl(ExpandoTable expandoTable,
                                      boolean merge)
                               throws SystemException
Throws:
SystemException

findByPrimaryKey

public static ExpandoTable findByPrimaryKey(long tableId)
                                     throws SystemException,
                                            NoSuchTableException
Finds the expando table with the primary key or throws a NoSuchTableException if it could not be found.

Parameters:
tableId - the primary key of the expando table to find
Returns:
the expando table
Throws:
NoSuchTableException - if a expando table with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

public static ExpandoTable fetchByPrimaryKey(long tableId)
                                      throws SystemException
Finds the expando table with the primary key or returns null if it could not be found.

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

findByC_C

public static List<ExpandoTable> findByC_C(long companyId,
                                           long classNameId)
                                    throws SystemException
Finds all the expando tables where companyId = ? and classNameId = ?.

Parameters:
companyId - the company id to search with
classNameId - the class name id to search with
Returns:
the matching expando tables
Throws:
SystemException - if a system exception occurred

findByC_C

public static List<ExpandoTable> findByC_C(long companyId,
                                           long classNameId,
                                           int start,
                                           int end)
                                    throws SystemException
Finds a range of all the expando tables where companyId = ? and classNameId = ?.

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:
companyId - the company id to search with
classNameId - the class name id to search with
start - the lower bound of the range of expando tables to return
end - the upper bound of the range of expando tables to return (not inclusive)
Returns:
the range of matching expando tables
Throws:
SystemException - if a system exception occurred

findByC_C

public static List<ExpandoTable> findByC_C(long companyId,
                                           long classNameId,
                                           int start,
                                           int end,
                                           OrderByComparator orderByComparator)
                                    throws SystemException
Finds an ordered range of all the expando tables where companyId = ? and classNameId = ?.

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:
companyId - the company id to search with
classNameId - the class name id to search with
start - the lower bound of the range of expando tables to return
end - the upper bound of the range of expando tables to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching expando tables
Throws:
SystemException - if a system exception occurred

findByC_C_First

public static ExpandoTable findByC_C_First(long companyId,
                                           long classNameId,
                                           OrderByComparator orderByComparator)
                                    throws SystemException,
                                           NoSuchTableException
Finds the first expando table in the ordered set where companyId = ? and classNameId = ?.

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:
companyId - the company id to search with
classNameId - the class name id to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching expando table
Throws:
NoSuchTableException - if a matching expando table could not be found
SystemException - if a system exception occurred

findByC_C_Last

public static ExpandoTable findByC_C_Last(long companyId,
                                          long classNameId,
                                          OrderByComparator orderByComparator)
                                   throws SystemException,
                                          NoSuchTableException
Finds the last expando table in the ordered set where companyId = ? and classNameId = ?.

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:
companyId - the company id to search with
classNameId - the class name id to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching expando table
Throws:
NoSuchTableException - if a matching expando table could not be found
SystemException - if a system exception occurred

findByC_C_PrevAndNext

public static ExpandoTable[] findByC_C_PrevAndNext(long tableId,
                                                   long companyId,
                                                   long classNameId,
                                                   OrderByComparator orderByComparator)
                                            throws SystemException,
                                                   NoSuchTableException
Finds the expando tables before and after the current expando table in the ordered set where companyId = ? and classNameId = ?.

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:
tableId - the primary key of the current expando table
companyId - the company id to search with
classNameId - the class name id to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next expando table
Throws:
NoSuchTableException - if a expando table with the primary key could not be found
SystemException - if a system exception occurred

findByC_C_N

public static ExpandoTable findByC_C_N(long companyId,
                                       long classNameId,
                                       String name)
                                throws SystemException,
                                       NoSuchTableException
Finds the expando table where companyId = ? and classNameId = ? and name = ? or throws a NoSuchTableException if it could not be found.

Parameters:
companyId - the company id to search with
classNameId - the class name id to search with
name - the name to search with
Returns:
the matching expando table
Throws:
NoSuchTableException - if a matching expando table could not be found
SystemException - if a system exception occurred

fetchByC_C_N

public static ExpandoTable fetchByC_C_N(long companyId,
                                        long classNameId,
                                        String name)
                                 throws SystemException
Finds the expando table where companyId = ? and classNameId = ? and name = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
companyId - the company id to search with
classNameId - the class name id to search with
name - the name to search with
Returns:
the matching expando table, or null if a matching expando table could not be found
Throws:
SystemException - if a system exception occurred

fetchByC_C_N

public static ExpandoTable fetchByC_C_N(long companyId,
                                        long classNameId,
                                        String name,
                                        boolean retrieveFromCache)
                                 throws SystemException
Finds the expando table where companyId = ? and classNameId = ? and name = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
companyId - the company id to search with
classNameId - the class name id to search with
name - the name to search with
Returns:
the matching expando table, or null if a matching expando table could not be found
Throws:
SystemException - if a system exception occurred

findAll

public static List<ExpandoTable> findAll()
                                  throws SystemException
Finds all the expando tables.

Returns:
the expando tables
Throws:
SystemException - if a system exception occurred

findAll

public static List<ExpandoTable> findAll(int start,
                                         int end)
                                  throws SystemException
Finds a range of all the expando tables.

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 expando tables to return
end - the upper bound of the range of expando tables to return (not inclusive)
Returns:
the range of expando tables
Throws:
SystemException - if a system exception occurred

findAll

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

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 expando tables to return
end - the upper bound of the range of expando tables to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of expando tables
Throws:
SystemException - if a system exception occurred

removeByC_C

public static void removeByC_C(long companyId,
                               long classNameId)
                        throws SystemException
Removes all the expando tables where companyId = ? and classNameId = ? from the database.

Parameters:
companyId - the company id to search with
classNameId - the class name id to search with
Throws:
SystemException - if a system exception occurred

removeByC_C_N

public static void removeByC_C_N(long companyId,
                                 long classNameId,
                                 String name)
                          throws SystemException,
                                 NoSuchTableException
Removes the expando table where companyId = ? and classNameId = ? and name = ? from the database.

Parameters:
companyId - the company id to search with
classNameId - the class name id to search with
name - the name to search with
Throws:
SystemException - if a system exception occurred
NoSuchTableException

removeAll

public static void removeAll()
                      throws SystemException
Removes all the expando tables from the database.

Throws:
SystemException - if a system exception occurred

countByC_C

public static int countByC_C(long companyId,
                             long classNameId)
                      throws SystemException
Counts all the expando tables where companyId = ? and classNameId = ?.

Parameters:
companyId - the company id to search with
classNameId - the class name id to search with
Returns:
the number of matching expando tables
Throws:
SystemException - if a system exception occurred

countByC_C_N

public static int countByC_C_N(long companyId,
                               long classNameId,
                               String name)
                        throws SystemException
Counts all the expando tables where companyId = ? and classNameId = ? and name = ?.

Parameters:
companyId - the company id to search with
classNameId - the class name id to search with
name - the name to search with
Returns:
the number of matching expando tables
Throws:
SystemException - if a system exception occurred

countAll

public static int countAll()
                    throws SystemException
Counts all the expando tables.

Returns:
the number of expando tables
Throws:
SystemException - if a system exception occurred

getPersistence

public static ExpandoTablePersistence getPersistence()

setPersistence

public void setPersistence(ExpandoTablePersistence persistence)

Liferay 6.0.5