public class OrgLaborUtil
extends Object
com.liferay.portal.service.persistence.impl.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
OrgLaborPersistence
Constructor and Description |
---|
OrgLaborUtil() |
Modifier and Type | Method and Description |
---|---|
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 = ?.
|
static 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<OrgLabor> orderByComparator)
Returns the first org labor in the ordered set where organizationId = ?.
|
static OrgLabor |
fetchByOrganizationId_Last(long organizationId,
OrderByComparator<OrgLabor> 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 Map<Serializable,OrgLabor> |
fetchByPrimaryKeys(Set<Serializable> primaryKeys) |
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<OrgLabor> orderByComparator)
Returns an ordered range of all the org labors.
|
static List<OrgLabor> |
findAll(int start,
int end,
OrderByComparator<OrgLabor> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the org labors.
|
static OrgLabor |
findByOrganizationId_First(long organizationId,
OrderByComparator<OrgLabor> orderByComparator)
Returns the first org labor in the ordered set where organizationId = ?.
|
static OrgLabor |
findByOrganizationId_Last(long organizationId,
OrderByComparator<OrgLabor> orderByComparator)
Returns the last org labor in the ordered set where organizationId = ?.
|
static OrgLabor[] |
findByOrganizationId_PrevAndNext(long orgLaborId,
long organizationId,
OrderByComparator<OrgLabor> 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<OrgLabor> orderByComparator)
Returns an ordered range of all the org labors where organizationId = ?.
|
static List<OrgLabor> |
findByOrganizationId(long organizationId,
int start,
int end,
OrderByComparator<OrgLabor> orderByComparator,
boolean useFinderCache)
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<OrgLabor> 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.
|
static OrgLabor |
update(OrgLabor orgLabor) |
static OrgLabor |
update(OrgLabor orgLabor,
ServiceContext serviceContext) |
static OrgLabor |
updateImpl(OrgLabor orgLabor) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(OrgLabor orgLabor)
public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
public static Map<Serializable,OrgLabor> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static List<OrgLabor> findWithDynamicQuery(DynamicQuery dynamicQuery)
public static List<OrgLabor> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
public static List<OrgLabor> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<OrgLabor> orderByComparator)
public static OrgLabor update(OrgLabor orgLabor, ServiceContext serviceContext)
public static List<OrgLabor> findByOrganizationId(long organizationId)
organizationId
- the organization IDpublic static List<OrgLabor> findByOrganizationId(long organizationId, int start, int end)
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 OrgLaborModelImpl
. 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.
organizationId
- the organization IDstart
- the lower bound of the range of org laborsend
- the upper bound of the range of org labors (not inclusive)public static List<OrgLabor> findByOrganizationId(long organizationId, int start, int end, OrderByComparator<OrgLabor> orderByComparator)
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 OrgLaborModelImpl
. 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.
organizationId
- the organization IDstart
- the lower bound of the range of org laborsend
- the upper bound of the range of org labors (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static List<OrgLabor> findByOrganizationId(long organizationId, int start, int end, OrderByComparator<OrgLabor> orderByComparator, boolean useFinderCache)
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 OrgLaborModelImpl
. 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.
organizationId
- the organization IDstart
- the lower bound of the range of org laborsend
- the upper bound of the range of org labors (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static OrgLabor findByOrganizationId_First(long organizationId, OrderByComparator<OrgLabor> orderByComparator) throws NoSuchOrgLaborException
organizationId
- the organization IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchOrgLaborException
- if a matching org labor could not be foundpublic static OrgLabor fetchByOrganizationId_First(long organizationId, OrderByComparator<OrgLabor> orderByComparator)
organizationId
- the organization IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching org labor could not be foundpublic static OrgLabor findByOrganizationId_Last(long organizationId, OrderByComparator<OrgLabor> orderByComparator) throws NoSuchOrgLaborException
organizationId
- the organization IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchOrgLaborException
- if a matching org labor could not be foundpublic static OrgLabor fetchByOrganizationId_Last(long organizationId, OrderByComparator<OrgLabor> orderByComparator)
organizationId
- the organization IDorderByComparator
- the comparator to order the set by (optionally null
)null
if a matching org labor could not be foundpublic static OrgLabor[] findByOrganizationId_PrevAndNext(long orgLaborId, long organizationId, OrderByComparator<OrgLabor> orderByComparator) throws NoSuchOrgLaborException
orgLaborId
- the primary key of the current org labororganizationId
- the organization IDorderByComparator
- the comparator to order the set by (optionally null
)NoSuchOrgLaborException
- if a org labor with the primary key could not be foundpublic static void removeByOrganizationId(long organizationId)
organizationId
- the organization IDpublic static int countByOrganizationId(long organizationId)
organizationId
- the organization IDpublic static void cacheResult(OrgLabor orgLabor)
orgLabor
- the org laborpublic static void cacheResult(List<OrgLabor> orgLabors)
orgLabors
- the org laborspublic static OrgLabor create(long orgLaborId)
orgLaborId
- the primary key for the new org laborpublic static OrgLabor remove(long orgLaborId) throws NoSuchOrgLaborException
orgLaborId
- the primary key of the org laborNoSuchOrgLaborException
- if a org labor with the primary key could not be foundpublic static OrgLabor findByPrimaryKey(long orgLaborId) throws NoSuchOrgLaborException
NoSuchOrgLaborException
if it could not be found.orgLaborId
- the primary key of the org laborNoSuchOrgLaborException
- if a org labor with the primary key could not be foundpublic static OrgLabor fetchByPrimaryKey(long orgLaborId)
null
if it could not be found.orgLaborId
- the primary key of the org labornull
if a org labor with the primary key could not be foundpublic static List<OrgLabor> findAll()
public static List<OrgLabor> findAll(int start, int end)
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 OrgLaborModelImpl
. 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.
start
- the lower bound of the range of org laborsend
- the upper bound of the range of org labors (not inclusive)public static List<OrgLabor> findAll(int start, int end, OrderByComparator<OrgLabor> orderByComparator)
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 OrgLaborModelImpl
. 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.
start
- the lower bound of the range of org laborsend
- the upper bound of the range of org labors (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static List<OrgLabor> findAll(int start, int end, OrderByComparator<OrgLabor> orderByComparator, boolean useFinderCache)
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 OrgLaborModelImpl
. 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.
start
- the lower bound of the range of org laborsend
- the upper bound of the range of org labors (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static void removeAll()
public static int countAll()
public static OrgLaborPersistence getPersistence()