|
Liferay 6.0.5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portal.service.persistence.CompanyUtil
public class CompanyUtil
The persistence utility for the company service. This utility wraps CompanyPersistenceImpl
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
CompanyPersistence
,
CompanyPersistenceImpl
Constructor Summary | |
---|---|
CompanyUtil()
|
Method Summary | |
---|---|
static void |
cacheResult(Company company)
Caches the company in the entity cache if it is enabled. |
static void |
cacheResult(List<Company> companies)
Caches the companies in the entity cache if it is enabled. |
static void |
clearCache()
|
static void |
clearCache(Company company)
|
static int |
countAll()
Counts all the companies. |
static int |
countByLogoId(long logoId)
Counts all the companies where logoId = ?. |
static int |
countByMx(String mx)
Counts all the companies where mx = ?. |
static int |
countBySystem(boolean system)
Counts all the companies where system = ?. |
static int |
countByVirtualHost(String virtualHost)
Counts all the companies where virtualHost = ?. |
static int |
countByWebId(String webId)
Counts all the companies where webId = ?. |
long |
countWithDynamicQuery(DynamicQuery dynamicQuery)
|
static Company |
create(long companyId)
Creates a new company with the primary key. |
static Company |
fetchByLogoId(long logoId)
Finds the company where logoId = ? or returns null if it could not be found. |
static Company |
fetchByLogoId(long logoId,
boolean retrieveFromCache)
Finds the company where logoId = ? or returns null if it could not be found, optionally using the finder cache. |
static Company |
fetchByMx(String mx)
Finds the company where mx = ? or returns null if it could not be found. |
static Company |
fetchByMx(String mx,
boolean retrieveFromCache)
Finds the company where mx = ? or returns null if it could not be found, optionally using the finder cache. |
static Company |
fetchByPrimaryKey(long companyId)
Finds the company with the primary key or returns null if it could not be found. |
static Company |
fetchByVirtualHost(String virtualHost)
Finds the company where virtualHost = ? or returns null if it could not be found. |
static Company |
fetchByVirtualHost(String virtualHost,
boolean retrieveFromCache)
Finds the company where virtualHost = ? or returns null if it could not be found, optionally using the finder cache. |
static Company |
fetchByWebId(String webId)
Finds the company where webId = ? or returns null if it could not be found. |
static Company |
fetchByWebId(String webId,
boolean retrieveFromCache)
Finds the company where webId = ? or returns null if it could not be found, optionally using the finder cache. |
static List<Company> |
findAll()
Finds all the companies. |
static List<Company> |
findAll(int start,
int end)
Finds a range of all the companies. |
static List<Company> |
findAll(int start,
int end,
OrderByComparator orderByComparator)
Finds an ordered range of all the companies. |
static Company |
findByLogoId(long logoId)
Finds the company where logoId = ? or throws a NoSuchCompanyException if it could not be found. |
static Company |
findByMx(String mx)
Finds the company where mx = ? or throws a NoSuchCompanyException if it could not be found. |
static Company |
findByPrimaryKey(long companyId)
Finds the company with the primary key or throws a NoSuchCompanyException if it could not be found. |
static Company |
findBySystem_First(boolean system,
OrderByComparator orderByComparator)
Finds the first company in the ordered set where system = ?. |
static Company |
findBySystem_Last(boolean system,
OrderByComparator orderByComparator)
Finds the last company in the ordered set where system = ?. |
static Company[] |
findBySystem_PrevAndNext(long companyId,
boolean system,
OrderByComparator orderByComparator)
Finds the companies before and after the current company in the ordered set where system = ?. |
static List<Company> |
findBySystem(boolean system)
Finds all the companies where system = ?. |
static List<Company> |
findBySystem(boolean system,
int start,
int end)
Finds a range of all the companies where system = ?. |
static List<Company> |
findBySystem(boolean system,
int start,
int end,
OrderByComparator orderByComparator)
Finds an ordered range of all the companies where system = ?. |
static Company |
findByVirtualHost(String virtualHost)
Finds the company where virtualHost = ? or throws a NoSuchCompanyException if it could not be found. |
static Company |
findByWebId(String webId)
Finds the company where webId = ? or throws a NoSuchCompanyException if it could not be found. |
static List<Company> |
findWithDynamicQuery(DynamicQuery dynamicQuery)
|
static List<Company> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
|
static List<Company> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator orderByComparator)
|
static CompanyPersistence |
getPersistence()
|
static Company |
remove(Company company)
|
static Company |
remove(long companyId)
Removes the company with the primary key from the database. |
static void |
removeAll()
Removes all the companies from the database. |
static void |
removeByLogoId(long logoId)
Removes the company where logoId = ? from the database. |
static void |
removeByMx(String mx)
Removes the company where mx = ? from the database. |
static void |
removeBySystem(boolean system)
Removes all the companies where system = ? from the database. |
static void |
removeByVirtualHost(String virtualHost)
Removes the company where virtualHost = ? from the database. |
static void |
removeByWebId(String webId)
Removes the company where webId = ? from the database. |
void |
setPersistence(CompanyPersistence persistence)
|
static Company |
update(Company company,
boolean merge)
|
static Company |
update(Company company,
boolean merge,
ServiceContext serviceContext)
|
static Company |
updateImpl(Company company,
boolean merge)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompanyUtil()
Method Detail |
---|
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(Company company)
BasePersistence.clearCache(com.liferay.portal.model.BaseModel)
public long countWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException
SystemException
BasePersistence.countWithDynamicQuery(DynamicQuery)
public static List<Company> findWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static List<Company> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static List<Company> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static Company remove(Company company) throws SystemException
SystemException
BasePersistence.remove(com.liferay.portal.model.BaseModel)
public static Company update(Company company, boolean merge) throws SystemException
SystemException
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean)
public static Company update(Company company, boolean merge, ServiceContext serviceContext) throws SystemException
SystemException
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
public static void cacheResult(Company company)
company
- the company to cachepublic static void cacheResult(List<Company> companies)
companies
- the companies to cachepublic static Company create(long companyId)
companyId
- the primary key for the new company
public static Company remove(long companyId) throws NoSuchCompanyException, SystemException
companyId
- the primary key of the company to remove
NoSuchCompanyException
- if a company with the primary key could not be found
SystemException
- if a system exception occurredpublic static Company updateImpl(Company company, boolean merge) throws SystemException
SystemException
public static Company findByPrimaryKey(long companyId) throws NoSuchCompanyException, SystemException
NoSuchCompanyException
if it could not be found.
companyId
- the primary key of the company to find
NoSuchCompanyException
- if a company with the primary key could not be found
SystemException
- if a system exception occurredpublic static Company fetchByPrimaryKey(long companyId) throws SystemException
null
if it could not be found.
companyId
- the primary key of the company to find
null
if a company with the primary key could not be found
SystemException
- if a system exception occurredpublic static Company findByWebId(String webId) throws NoSuchCompanyException, SystemException
NoSuchCompanyException
if it could not be found.
webId
- the web id to search with
NoSuchCompanyException
- if a matching company could not be found
SystemException
- if a system exception occurredpublic static Company fetchByWebId(String webId) throws SystemException
null
if it could not be found. Uses the finder cache.
webId
- the web id to search with
null
if a matching company could not be found
SystemException
- if a system exception occurredpublic static Company fetchByWebId(String webId, boolean retrieveFromCache) throws SystemException
null
if it could not be found, optionally using the finder cache.
webId
- the web id to search with
null
if a matching company could not be found
SystemException
- if a system exception occurredpublic static Company findByVirtualHost(String virtualHost) throws NoSuchCompanyException, SystemException
NoSuchCompanyException
if it could not be found.
virtualHost
- the virtual host to search with
NoSuchCompanyException
- if a matching company could not be found
SystemException
- if a system exception occurredpublic static Company fetchByVirtualHost(String virtualHost) throws SystemException
null
if it could not be found. Uses the finder cache.
virtualHost
- the virtual host to search with
null
if a matching company could not be found
SystemException
- if a system exception occurredpublic static Company fetchByVirtualHost(String virtualHost, boolean retrieveFromCache) throws SystemException
null
if it could not be found, optionally using the finder cache.
virtualHost
- the virtual host to search with
null
if a matching company could not be found
SystemException
- if a system exception occurredpublic static Company findByMx(String mx) throws NoSuchCompanyException, SystemException
NoSuchCompanyException
if it could not be found.
mx
- the mx to search with
NoSuchCompanyException
- if a matching company could not be found
SystemException
- if a system exception occurredpublic static Company fetchByMx(String mx) throws SystemException
null
if it could not be found. Uses the finder cache.
mx
- the mx to search with
null
if a matching company could not be found
SystemException
- if a system exception occurredpublic static Company fetchByMx(String mx, boolean retrieveFromCache) throws SystemException
null
if it could not be found, optionally using the finder cache.
mx
- the mx to search with
null
if a matching company could not be found
SystemException
- if a system exception occurredpublic static Company findByLogoId(long logoId) throws NoSuchCompanyException, SystemException
NoSuchCompanyException
if it could not be found.
logoId
- the logo id to search with
NoSuchCompanyException
- if a matching company could not be found
SystemException
- if a system exception occurredpublic static Company fetchByLogoId(long logoId) throws SystemException
null
if it could not be found. Uses the finder cache.
logoId
- the logo id to search with
null
if a matching company could not be found
SystemException
- if a system exception occurredpublic static Company fetchByLogoId(long logoId, boolean retrieveFromCache) throws SystemException
null
if it could not be found, optionally using the finder cache.
logoId
- the logo id to search with
null
if a matching company could not be found
SystemException
- if a system exception occurredpublic static List<Company> findBySystem(boolean system) throws SystemException
system
- the system to search with
SystemException
- if a system exception occurredpublic static List<Company> findBySystem(boolean system, int start, int end) throws SystemException
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.
system
- the system to search withstart
- the lower bound of the range of companies to returnend
- the upper bound of the range of companies to return (not inclusive)
SystemException
- if a system exception occurredpublic static List<Company> findBySystem(boolean system, int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
system
- the system to search withstart
- the lower bound of the range of companies to returnend
- the upper bound of the range of companies to return (not inclusive)orderByComparator
- the comparator to order the results by
SystemException
- if a system exception occurredpublic static Company findBySystem_First(boolean system, OrderByComparator orderByComparator) throws NoSuchCompanyException, SystemException
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.
system
- the system to search withorderByComparator
- the comparator to order the set by
NoSuchCompanyException
- if a matching company could not be found
SystemException
- if a system exception occurredpublic static Company findBySystem_Last(boolean system, OrderByComparator orderByComparator) throws NoSuchCompanyException, SystemException
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.
system
- the system to search withorderByComparator
- the comparator to order the set by
NoSuchCompanyException
- if a matching company could not be found
SystemException
- if a system exception occurredpublic static Company[] findBySystem_PrevAndNext(long companyId, boolean system, OrderByComparator orderByComparator) throws NoSuchCompanyException, SystemException
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.
companyId
- the primary key of the current companysystem
- the system to search withorderByComparator
- the comparator to order the set by
NoSuchCompanyException
- if a company with the primary key could not be found
SystemException
- if a system exception occurredpublic static List<Company> findAll() throws SystemException
SystemException
- if a system exception occurredpublic static List<Company> findAll(int start, int end) throws SystemException
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.
start
- the lower bound of the range of companies to returnend
- the upper bound of the range of companies to return (not inclusive)
SystemException
- if a system exception occurredpublic static List<Company> findAll(int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
start
- the lower bound of the range of companies to returnend
- the upper bound of the range of companies to return (not inclusive)orderByComparator
- the comparator to order the results by
SystemException
- if a system exception occurredpublic static void removeByWebId(String webId) throws NoSuchCompanyException, SystemException
webId
- the web id to search with
SystemException
- if a system exception occurred
NoSuchCompanyException
public static void removeByVirtualHost(String virtualHost) throws NoSuchCompanyException, SystemException
virtualHost
- the virtual host to search with
SystemException
- if a system exception occurred
NoSuchCompanyException
public static void removeByMx(String mx) throws NoSuchCompanyException, SystemException
mx
- the mx to search with
SystemException
- if a system exception occurred
NoSuchCompanyException
public static void removeByLogoId(long logoId) throws NoSuchCompanyException, SystemException
logoId
- the logo id to search with
SystemException
- if a system exception occurred
NoSuchCompanyException
public static void removeBySystem(boolean system) throws SystemException
system
- the system to search with
SystemException
- if a system exception occurredpublic static void removeAll() throws SystemException
SystemException
- if a system exception occurredpublic static int countByWebId(String webId) throws SystemException
webId
- the web id to search with
SystemException
- if a system exception occurredpublic static int countByVirtualHost(String virtualHost) throws SystemException
virtualHost
- the virtual host to search with
SystemException
- if a system exception occurredpublic static int countByMx(String mx) throws SystemException
mx
- the mx to search with
SystemException
- if a system exception occurredpublic static int countByLogoId(long logoId) throws SystemException
logoId
- the logo id to search with
SystemException
- if a system exception occurredpublic static int countBySystem(boolean system) throws SystemException
system
- the system to search with
SystemException
- if a system exception occurredpublic static int countAll() throws SystemException
SystemException
- if a system exception occurredpublic static CompanyPersistence getPersistence()
public void setPersistence(CompanyPersistence persistence)
|
Liferay 6.0.5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |