public class CompanyInfoUtil
extends java.lang.Object
com.liferay.portal.service.persistence.impl.CompanyInfoPersistenceImpl
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
CompanyInfoPersistence
Constructor and Description |
---|
CompanyInfoUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(CompanyInfo companyInfo)
Caches the company info in the entity cache if it is enabled.
|
static void |
cacheResult(java.util.List<CompanyInfo> companyInfos)
Caches the company infos in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(CompanyInfo companyInfo) |
static int |
countAll()
Returns the number of company infos.
|
static int |
countByCompanyId(long companyId)
Returns the number of company infos where companyId = ?.
|
static long |
countWithDynamicQuery(DynamicQuery dynamicQuery) |
static CompanyInfo |
create(long companyInfoId)
Creates a new company info with the primary key.
|
static CompanyInfo |
fetchByCompanyId(long companyId)
Returns the company info where companyId = ? or returns
null if it could not be found. |
static CompanyInfo |
fetchByCompanyId(long companyId,
boolean useFinderCache)
Returns the company info where companyId = ? or returns
null if it could not be found, optionally using the finder cache. |
static CompanyInfo |
fetchByPrimaryKey(long companyInfoId)
Returns the company info with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,CompanyInfo> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static java.util.List<CompanyInfo> |
findAll()
Returns all the company infos.
|
static java.util.List<CompanyInfo> |
findAll(int start,
int end)
Returns a range of all the company infos.
|
static java.util.List<CompanyInfo> |
findAll(int start,
int end,
OrderByComparator<CompanyInfo> orderByComparator)
Returns an ordered range of all the company infos.
|
static java.util.List<CompanyInfo> |
findAll(int start,
int end,
OrderByComparator<CompanyInfo> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the company infos.
|
static CompanyInfo |
findByCompanyId(long companyId)
Returns the company info where companyId = ? or throws a
NoSuchCompanyInfoException if it could not be found. |
static CompanyInfo |
findByPrimaryKey(long companyInfoId)
Returns the company info with the primary key or throws a
NoSuchCompanyInfoException if it could not be found. |
static java.util.List<CompanyInfo> |
findWithDynamicQuery(DynamicQuery dynamicQuery) |
static java.util.List<CompanyInfo> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<CompanyInfo> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator<CompanyInfo> orderByComparator) |
static CompanyInfoPersistence |
getPersistence() |
static CompanyInfo |
remove(long companyInfoId)
Removes the company info with the primary key from the database.
|
static void |
removeAll()
Removes all the company infos from the database.
|
static CompanyInfo |
removeByCompanyId(long companyId)
Removes the company info where companyId = ? from the database.
|
static void |
setPersistence(CompanyInfoPersistence persistence) |
static CompanyInfo |
update(CompanyInfo companyInfo) |
static CompanyInfo |
update(CompanyInfo companyInfo,
ServiceContext serviceContext) |
static CompanyInfo |
updateImpl(CompanyInfo companyInfo) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(CompanyInfo companyInfo)
public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
public static java.util.Map<java.io.Serializable,CompanyInfo> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<CompanyInfo> findWithDynamicQuery(DynamicQuery dynamicQuery)
public static java.util.List<CompanyInfo> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
public static java.util.List<CompanyInfo> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<CompanyInfo> orderByComparator)
public static CompanyInfo update(CompanyInfo companyInfo)
public static CompanyInfo update(CompanyInfo companyInfo, ServiceContext serviceContext)
public static CompanyInfo findByCompanyId(long companyId) throws NoSuchCompanyInfoException
NoSuchCompanyInfoException
if it could not be found.companyId
- the company IDNoSuchCompanyInfoException
- if a matching company info could not be foundpublic static CompanyInfo fetchByCompanyId(long companyId)
null
if it could not be found. Uses the finder cache.companyId
- the company IDnull
if a matching company info could not be foundpublic static CompanyInfo fetchByCompanyId(long companyId, boolean useFinderCache)
null
if it could not be found, optionally using the finder cache.companyId
- the company IDuseFinderCache
- whether to use the finder cachenull
if a matching company info could not be foundpublic static CompanyInfo removeByCompanyId(long companyId) throws NoSuchCompanyInfoException
companyId
- the company IDNoSuchCompanyInfoException
public static int countByCompanyId(long companyId)
companyId
- the company IDpublic static void cacheResult(CompanyInfo companyInfo)
companyInfo
- the company infopublic static void cacheResult(java.util.List<CompanyInfo> companyInfos)
companyInfos
- the company infospublic static CompanyInfo create(long companyInfoId)
companyInfoId
- the primary key for the new company infopublic static CompanyInfo remove(long companyInfoId) throws NoSuchCompanyInfoException
companyInfoId
- the primary key of the company infoNoSuchCompanyInfoException
- if a company info with the primary key could not be foundpublic static CompanyInfo updateImpl(CompanyInfo companyInfo)
public static CompanyInfo findByPrimaryKey(long companyInfoId) throws NoSuchCompanyInfoException
NoSuchCompanyInfoException
if it could not be found.companyInfoId
- the primary key of the company infoNoSuchCompanyInfoException
- if a company info with the primary key could not be foundpublic static CompanyInfo fetchByPrimaryKey(long companyInfoId)
null
if it could not be found.companyInfoId
- the primary key of the company infonull
if a company info with the primary key could not be foundpublic static java.util.List<CompanyInfo> findAll()
public static java.util.List<CompanyInfo> 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, then the query will include the default ORDER BY logic from CompanyInfoModelImpl
.
start
- the lower bound of the range of company infosend
- the upper bound of the range of company infos (not inclusive)public static java.util.List<CompanyInfo> findAll(int start, int end, OrderByComparator<CompanyInfo> 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, then the query will include the default ORDER BY logic from CompanyInfoModelImpl
.
start
- the lower bound of the range of company infosend
- the upper bound of the range of company infos (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<CompanyInfo> findAll(int start, int end, OrderByComparator<CompanyInfo> 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, then the query will include the default ORDER BY logic from CompanyInfoModelImpl
.
start
- the lower bound of the range of company infosend
- the upper bound of the range of company infos (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 CompanyInfoPersistence getPersistence()
public static void setPersistence(CompanyInfoPersistence persistence)