Liferay 6.1.2-ce-ga3

com.liferay.portal.service.persistence
Class OrgLaborUtil

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

public class OrgLaborUtil
extends Object

The persistence utility for the org labor service. This utility wraps OrgLaborPersistenceImpl 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:
OrgLaborPersistence, OrgLaborPersistenceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Constructor Summary
OrgLaborUtil()
           
 
Method Summary
static void cacheResult(List<OrgLabor> orgLabors)
          Caches the org labors in the entity cache if it is enabled.
static void cacheResult(OrgLabor orgLabor)
          Caches the org labor in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(OrgLabor orgLabor)
           
static int countAll()
          Returns the number of org labors.
static int countByOrganizationId(long organizationId)
          Returns the number of org labors where organizationId = ?.
 long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static OrgLabor create(long orgLaborId)
          Creates a new org labor with the primary key.
static OrgLabor fetchByOrganizationId_First(long organizationId, OrderByComparator orderByComparator)
          Returns the first org labor in the ordered set where organizationId = ?.
static OrgLabor fetchByOrganizationId_Last(long organizationId, OrderByComparator orderByComparator)
          Returns the last org labor in the ordered set where organizationId = ?.
static OrgLabor fetchByPrimaryKey(long orgLaborId)
          Returns the org labor with the primary key or returns null if it could not be found.
static List<OrgLabor> findAll()
          Returns all the org labors.
static List<OrgLabor> findAll(int start, int end)
          Returns a range of all the org labors.
static List<OrgLabor> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the org labors.
static OrgLabor findByOrganizationId_First(long organizationId, OrderByComparator orderByComparator)
          Returns the first org labor in the ordered set where organizationId = ?.
static OrgLabor findByOrganizationId_Last(long organizationId, OrderByComparator orderByComparator)
          Returns the last org labor in the ordered set where organizationId = ?.
static OrgLabor[] findByOrganizationId_PrevAndNext(long orgLaborId, long organizationId, OrderByComparator orderByComparator)
          Returns the org labors before and after the current org labor in the ordered set where organizationId = ?.
static List<OrgLabor> findByOrganizationId(long organizationId)
          Returns all the org labors where organizationId = ?.
static List<OrgLabor> findByOrganizationId(long organizationId, int start, int end)
          Returns a range of all the org labors where organizationId = ?.
static List<OrgLabor> findByOrganizationId(long organizationId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the org labors where organizationId = ?.
static OrgLabor findByPrimaryKey(long orgLaborId)
          Returns the org labor with the primary key or throws a NoSuchOrgLaborException if it could not be found.
static List<OrgLabor> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<OrgLabor> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<OrgLabor> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static OrgLaborPersistence getPersistence()
           
static OrgLabor remove(long orgLaborId)
          Removes the org labor with the primary key from the database.
static void removeAll()
          Removes all the org labors from the database.
static void removeByOrganizationId(long organizationId)
          Removes all the org labors where organizationId = ? from the database.
 void setPersistence(OrgLaborPersistence persistence)
          Deprecated.  
static OrgLabor update(OrgLabor orgLabor, boolean merge)
           
static OrgLabor update(OrgLabor orgLabor, boolean merge, ServiceContext serviceContext)
           
static OrgLabor updateImpl(OrgLabor orgLabor, boolean merge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrgLaborUtil

public OrgLaborUtil()
Method Detail

clearCache

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

clearCache

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

findWithDynamicQuery

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

findWithDynamicQuery

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

update

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

update

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

cacheResult

public static void cacheResult(OrgLabor orgLabor)
Caches the org labor in the entity cache if it is enabled.

Parameters:
orgLabor - the org labor

cacheResult

public static void cacheResult(List<OrgLabor> orgLabors)
Caches the org labors in the entity cache if it is enabled.

Parameters:
orgLabors - the org labors

create

public static OrgLabor create(long orgLaborId)
Creates a new org labor with the primary key. Does not add the org labor to the database.

Parameters:
orgLaborId - the primary key for the new org labor
Returns:
the new org labor

remove

public static OrgLabor remove(long orgLaborId)
                       throws NoSuchOrgLaborException,
                              SystemException
Removes the org labor with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
orgLaborId - the primary key of the org labor
Returns:
the org labor that was removed
Throws:
NoSuchOrgLaborException - if a org labor with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

public static OrgLabor updateImpl(OrgLabor orgLabor,
                                  boolean merge)
                           throws SystemException
Throws:
SystemException

findByPrimaryKey

public static OrgLabor findByPrimaryKey(long orgLaborId)
                                 throws NoSuchOrgLaborException,
                                        SystemException
Returns the org labor with the primary key or throws a NoSuchOrgLaborException if it could not be found.

Parameters:
orgLaborId - the primary key of the org labor
Returns:
the org labor
Throws:
NoSuchOrgLaborException - if a org labor with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

public static OrgLabor fetchByPrimaryKey(long orgLaborId)
                                  throws SystemException
Returns the org labor with the primary key or returns null if it could not be found.

Parameters:
orgLaborId - the primary key of the org labor
Returns:
the org labor, or null if a org labor with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findByOrganizationId

public static List<OrgLabor> findByOrganizationId(long organizationId)
                                           throws SystemException
Returns all the org labors where organizationId = ?.

Parameters:
organizationId - the organization ID
Returns:
the matching org labors
Throws:
SystemException - if a system exception occurred

findByOrganizationId

public static List<OrgLabor> findByOrganizationId(long organizationId,
                                                  int start,
                                                  int end)
                                           throws SystemException
Returns a range of all the org labors where organizationId = ?.

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:
organizationId - the organization ID
start - the lower bound of the range of org labors
end - the upper bound of the range of org labors (not inclusive)
Returns:
the range of matching org labors
Throws:
SystemException - if a system exception occurred

findByOrganizationId

public static List<OrgLabor> findByOrganizationId(long organizationId,
                                                  int start,
                                                  int end,
                                                  OrderByComparator orderByComparator)
                                           throws SystemException
Returns an ordered range of all the org labors where organizationId = ?.

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:
organizationId - the organization ID
start - the lower bound of the range of org labors
end - the upper bound of the range of org labors (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching org labors
Throws:
SystemException - if a system exception occurred

findByOrganizationId_First

public static OrgLabor findByOrganizationId_First(long organizationId,
                                                  OrderByComparator orderByComparator)
                                           throws NoSuchOrgLaborException,
                                                  SystemException
Returns the first org labor in the ordered set where organizationId = ?.

Parameters:
organizationId - the organization ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching org labor
Throws:
NoSuchOrgLaborException - if a matching org labor could not be found
SystemException - if a system exception occurred

fetchByOrganizationId_First

public static OrgLabor fetchByOrganizationId_First(long organizationId,
                                                   OrderByComparator orderByComparator)
                                            throws SystemException
Returns the first org labor in the ordered set where organizationId = ?.

Parameters:
organizationId - the organization ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching org labor, or null if a matching org labor could not be found
Throws:
SystemException - if a system exception occurred

findByOrganizationId_Last

public static OrgLabor findByOrganizationId_Last(long organizationId,
                                                 OrderByComparator orderByComparator)
                                          throws NoSuchOrgLaborException,
                                                 SystemException
Returns the last org labor in the ordered set where organizationId = ?.

Parameters:
organizationId - the organization ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching org labor
Throws:
NoSuchOrgLaborException - if a matching org labor could not be found
SystemException - if a system exception occurred

fetchByOrganizationId_Last

public static OrgLabor fetchByOrganizationId_Last(long organizationId,
                                                  OrderByComparator orderByComparator)
                                           throws SystemException
Returns the last org labor in the ordered set where organizationId = ?.

Parameters:
organizationId - the organization ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching org labor, or null if a matching org labor could not be found
Throws:
SystemException - if a system exception occurred

findByOrganizationId_PrevAndNext

public static OrgLabor[] findByOrganizationId_PrevAndNext(long orgLaborId,
                                                          long organizationId,
                                                          OrderByComparator orderByComparator)
                                                   throws NoSuchOrgLaborException,
                                                          SystemException
Returns the org labors before and after the current org labor in the ordered set where organizationId = ?.

Parameters:
orgLaborId - the primary key of the current org labor
organizationId - the organization ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next org labor
Throws:
NoSuchOrgLaborException - if a org labor with the primary key could not be found
SystemException - if a system exception occurred

findAll

public static List<OrgLabor> findAll()
                              throws SystemException
Returns all the org labors.

Returns:
the org labors
Throws:
SystemException - if a system exception occurred

findAll

public static List<OrgLabor> findAll(int start,
                                     int end)
                              throws SystemException
Returns a range of all the org labors.

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

findAll

public static List<OrgLabor> findAll(int start,
                                     int end,
                                     OrderByComparator orderByComparator)
                              throws SystemException
Returns an ordered range of all the org labors.

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

removeByOrganizationId

public static void removeByOrganizationId(long organizationId)
                                   throws SystemException
Removes all the org labors where organizationId = ? from the database.

Parameters:
organizationId - the organization ID
Throws:
SystemException - if a system exception occurred

removeAll

public static void removeAll()
                      throws SystemException
Removes all the org labors from the database.

Throws:
SystemException - if a system exception occurred

countByOrganizationId

public static int countByOrganizationId(long organizationId)
                                 throws SystemException
Returns the number of org labors where organizationId = ?.

Parameters:
organizationId - the organization ID
Returns:
the number of matching org labors
Throws:
SystemException - if a system exception occurred

countAll

public static int countAll()
                    throws SystemException
Returns the number of org labors.

Returns:
the number of org labors
Throws:
SystemException - if a system exception occurred

getPersistence

public static OrgLaborPersistence getPersistence()

setPersistence

public void setPersistence(OrgLaborPersistence persistence)
Deprecated. 


Liferay 6.1.2-ce-ga3