Class OrgLaborUtil
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
- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
cacheResult
(OrgLabor orgLabor) Caches the org labor in the entity cache if it is enabled.static void
cacheResult
(List<OrgLabor> orgLabors) Caches the org labors in the entity cache if it is enabled.static void
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 returnsnull
if it could not be found.static Map<Serializable,
OrgLabor> fetchByPrimaryKeys
(Set<Serializable> primaryKeys) findAll()
Returns all the org labors.findAll
(int start, int end) Returns a range of all the org labors.findAll
(int start, int end, OrderByComparator<OrgLabor> orderByComparator) Returns an ordered range of all the org labors.findAll
(int start, int end, OrderByComparator<OrgLabor> orderByComparator, boolean useFinderCache) Returns an ordered range of all the org labors.findByOrganizationId
(long organizationId) Returns all the org labors where organizationId = ?.findByOrganizationId
(long organizationId, int start, int end) Returns a range of all the org labors where organizationId = ?.findByOrganizationId
(long organizationId, int start, int end, OrderByComparator<OrgLabor> orderByComparator) Returns an ordered range of all the org labors where organizationId = ?.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
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 OrgLabor
findByPrimaryKey
(long orgLaborId) Returns the org labor with the primary key or throws aNoSuchOrgLaborException
if it could not be found.findWithDynamicQuery
(DynamicQuery dynamicQuery) findWithDynamicQuery
(DynamicQuery dynamicQuery, int start, int end) findWithDynamicQuery
(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<OrgLabor> orderByComparator) static OrgLaborPersistence
static OrgLabor
remove
(long orgLaborId) Removes the org labor with the primary key from the database.static void
Removes all the org labors from the database.static void
removeByOrganizationId
(long organizationId) Removes all the org labors where organizationId = ? from the database.static void
setPersistence
(OrgLaborPersistence persistence) static OrgLabor
static OrgLabor
update
(OrgLabor orgLabor, ServiceContext serviceContext) static OrgLabor
updateImpl
(OrgLabor orgLabor)
-
Constructor Details
-
OrgLaborUtil
public OrgLaborUtil()
-
-
Method Details
-
clearCache
public static void clearCache()- See Also:
-
clearCache
-
countWithDynamicQuery
-
fetchByPrimaryKeys
- See Also:
-
findWithDynamicQuery
-
findWithDynamicQuery
-
findWithDynamicQuery
public static List<OrgLabor> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<OrgLabor> orderByComparator) -
update
-
update
-
findByOrganizationId
Returns all the org labors where organizationId = ?.- Parameters:
organizationId
- the organization ID- Returns:
- the matching org labors
-
findByOrganizationId
Returns a range of all the org labors where organizationId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromOrgLaborModelImpl
.- Parameters:
organizationId
- the organization IDstart
- the lower bound of the range of org laborsend
- the upper bound of the range of org labors (not inclusive)- Returns:
- the range of matching org labors
-
findByOrganizationId
public static List<OrgLabor> findByOrganizationId(long organizationId, int start, int end, OrderByComparator<OrgLabor> orderByComparator) Returns an ordered range of all the org labors where organizationId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromOrgLaborModelImpl
.- Parameters:
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 (optionallynull
)- Returns:
- the ordered range of matching org labors
-
findByOrganizationId
public 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 = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromOrgLaborModelImpl
.- Parameters:
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 (optionallynull
)useFinderCache
- whether to use the finder cache- Returns:
- the ordered range of matching org labors
-
findByOrganizationId_First
public static OrgLabor findByOrganizationId_First(long organizationId, OrderByComparator<OrgLabor> orderByComparator) throws NoSuchOrgLaborException Returns the first org labor in the ordered set where organizationId = ?.- Parameters:
organizationId
- the organization IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching org labor
- Throws:
NoSuchOrgLaborException
- if a matching org labor could not be foundNoSuchOrgLaborException
-
fetchByOrganizationId_First
public static OrgLabor fetchByOrganizationId_First(long organizationId, OrderByComparator<OrgLabor> orderByComparator) Returns the first org labor in the ordered set where organizationId = ?.- Parameters:
organizationId
- the organization IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching org labor, or
null
if a matching org labor could not be found
-
findByOrganizationId_Last
public static OrgLabor findByOrganizationId_Last(long organizationId, OrderByComparator<OrgLabor> orderByComparator) throws NoSuchOrgLaborException Returns the last org labor in the ordered set where organizationId = ?.- Parameters:
organizationId
- the organization IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching org labor
- Throws:
NoSuchOrgLaborException
- if a matching org labor could not be foundNoSuchOrgLaborException
-
fetchByOrganizationId_Last
public static OrgLabor fetchByOrganizationId_Last(long organizationId, OrderByComparator<OrgLabor> orderByComparator) Returns the last org labor in the ordered set where organizationId = ?.- Parameters:
organizationId
- the organization IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching org labor, or
null
if a matching org labor could not be found
-
findByOrganizationId_PrevAndNext
public static OrgLabor[] findByOrganizationId_PrevAndNext(long orgLaborId, long organizationId, OrderByComparator<OrgLabor> orderByComparator) throws NoSuchOrgLaborException 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 labororganizationId
- the organization IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the previous, current, and next org labor
- Throws:
NoSuchOrgLaborException
- if a org labor with the primary key could not be foundNoSuchOrgLaborException
-
removeByOrganizationId
public static void removeByOrganizationId(long organizationId) Removes all the org labors where organizationId = ? from the database.- Parameters:
organizationId
- the organization ID
-
countByOrganizationId
public static int countByOrganizationId(long organizationId) Returns the number of org labors where organizationId = ?.- Parameters:
organizationId
- the organization ID- Returns:
- the number of matching org labors
-
cacheResult
Caches the org labor in the entity cache if it is enabled.- Parameters:
orgLabor
- the org labor
-
cacheResult
Caches the org labors in the entity cache if it is enabled.- Parameters:
orgLabors
- the org labors
-
create
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
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 foundNoSuchOrgLaborException
-
updateImpl
-
findByPrimaryKey
Returns the org labor with the primary key or throws aNoSuchOrgLaborException
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 foundNoSuchOrgLaborException
-
fetchByPrimaryKey
Returns the org labor with the primary key or returnsnull
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
-
findAll
Returns all the org labors.- Returns:
- the org labors
-
findAll
Returns a range of all the org labors.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromOrgLaborModelImpl
.- Parameters:
start
- the lower bound of the range of org laborsend
- the upper bound of the range of org labors (not inclusive)- Returns:
- the range of org labors
-
findAll
public static List<OrgLabor> findAll(int start, int end, OrderByComparator<OrgLabor> orderByComparator) Returns an ordered range of all the org labors.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromOrgLaborModelImpl
.- Parameters:
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 (optionallynull
)- Returns:
- the ordered range of org labors
-
findAll
public static List<OrgLabor> findAll(int start, int end, OrderByComparator<OrgLabor> orderByComparator, boolean useFinderCache) Returns an ordered range of all the org labors.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromOrgLaborModelImpl
.- Parameters:
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 (optionallynull
)useFinderCache
- whether to use the finder cache- Returns:
- the ordered range of org labors
-
removeAll
public static void removeAll()Removes all the org labors from the database. -
countAll
public static int countAll()Returns the number of org labors.- Returns:
- the number of org labors
-
getPersistence
-
setPersistence
-