|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portal.service.persistence.CompanyUtil
@ProviderType 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.
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()
Returns the number of companies. |
static int |
countByLogoId(long logoId)
Returns the number of companies where logoId = ?. |
static int |
countByMx(String mx)
Returns the number of companies where mx = ?. |
static int |
countBySystem(boolean system)
Returns the number of companies where system = ?. |
static int |
countByWebId(String webId)
Returns the number of companies where webId = ?. |
static long |
countWithDynamicQuery(DynamicQuery dynamicQuery)
|
static Company |
create(long companyId)
Creates a new company with the primary key. |
static Company |
fetchByLogoId(long logoId)
Returns the company where logoId = ? or returns null if it could not be found. |
static Company |
fetchByLogoId(long logoId,
boolean retrieveFromCache)
Returns the company where logoId = ? or returns null if it could not be found, optionally using the finder cache. |
static Company |
fetchByMx(String mx)
Returns the company where mx = ? or returns null if it could not be found. |
static Company |
fetchByMx(String mx,
boolean retrieveFromCache)
Returns the company where mx = ? or returns null if it could not be found, optionally using the finder cache. |
static Company |
fetchByPrimaryKey(long companyId)
Returns the company with the primary key or returns null if it could not be found. |
static Map<Serializable,Company> |
fetchByPrimaryKeys(Set<Serializable> primaryKeys)
|
static Company |
fetchBySystem_First(boolean system,
OrderByComparator<Company> orderByComparator)
Returns the first company in the ordered set where system = ?. |
static Company |
fetchBySystem_Last(boolean system,
OrderByComparator<Company> orderByComparator)
Returns the last company in the ordered set where system = ?. |
static Company |
fetchByWebId(String webId)
Returns the company where webId = ? or returns null if it could not be found. |
static Company |
fetchByWebId(String webId,
boolean retrieveFromCache)
Returns the company where webId = ? or returns null if it could not be found, optionally using the finder cache. |
static List<Company> |
findAll()
Returns all the companies. |
static List<Company> |
findAll(int start,
int end)
Returns a range of all the companies. |
static List<Company> |
findAll(int start,
int end,
OrderByComparator<Company> orderByComparator)
Returns an ordered range of all the companies. |
static List<Company> |
findAll(int start,
int end,
OrderByComparator<Company> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the companies. |
static Company |
findByLogoId(long logoId)
Returns the company where logoId = ? or throws a NoSuchCompanyException if it could not be found. |
static Company |
findByMx(String mx)
Returns the company where mx = ? or throws a NoSuchCompanyException if it could not be found. |
static Company |
findByPrimaryKey(long companyId)
Returns the company with the primary key or throws a NoSuchCompanyException if it could not be found. |
static Company |
findBySystem_First(boolean system,
OrderByComparator<Company> orderByComparator)
Returns the first company in the ordered set where system = ?. |
static Company |
findBySystem_Last(boolean system,
OrderByComparator<Company> orderByComparator)
Returns the last company in the ordered set where system = ?. |
static Company[] |
findBySystem_PrevAndNext(long companyId,
boolean system,
OrderByComparator<Company> orderByComparator)
Returns the companies before and after the current company in the ordered set where system = ?. |
static List<Company> |
findBySystem(boolean system)
Returns all the companies where system = ?. |
static List<Company> |
findBySystem(boolean system,
int start,
int end)
Returns a range of all the companies where system = ?. |
static List<Company> |
findBySystem(boolean system,
int start,
int end,
OrderByComparator<Company> orderByComparator)
Returns an ordered range of all the companies where system = ?. |
static List<Company> |
findBySystem(boolean system,
int start,
int end,
OrderByComparator<Company> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the companies where system = ?. |
static Company |
findByWebId(String webId)
Returns 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<Company> orderByComparator)
|
static Set<String> |
getBadColumnNames()
|
static CompanyPersistence |
getPersistence()
|
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 Company |
removeByLogoId(long logoId)
Removes the company where logoId = ? from the database. |
static Company |
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 Company |
removeByWebId(String webId)
Removes the company where webId = ? from the database. |
static Company |
update(Company company)
|
static Company |
update(Company company,
ServiceContext serviceContext)
|
static Company |
updateImpl(Company company)
|
| 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 static long countWithDynamicQuery(DynamicQuery dynamicQuery)
BasePersistence.countWithDynamicQuery(DynamicQuery)public static List<Company> findWithDynamicQuery(DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static List<Company> findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static List<Company> findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator<Company> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)public static Company update(Company company)
BasePersistence.update(com.liferay.portal.model.BaseModel)
public static Company update(Company company,
ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.model.BaseModel, ServiceContext)
public static Company findByWebId(String webId)
throws NoSuchCompanyException
NoSuchCompanyException if it could not be found.
webId - the web ID
NoSuchCompanyException - if a matching company could not be foundpublic static Company fetchByWebId(String webId)
null if it could not be found. Uses the finder cache.
webId - the web ID
null if a matching company could not be found
public static Company fetchByWebId(String webId,
boolean retrieveFromCache)
null if it could not be found, optionally using the finder cache.
webId - the web IDretrieveFromCache - whether to retrieve from the finder cache
null if a matching company could not be found
public static Company removeByWebId(String webId)
throws NoSuchCompanyException
webId - the web ID
NoSuchCompanyExceptionpublic static int countByWebId(String webId)
webId - the web ID
public static Company findByMx(String mx)
throws NoSuchCompanyException
NoSuchCompanyException if it could not be found.
mx - the mx
NoSuchCompanyException - if a matching company could not be foundpublic static Company fetchByMx(String mx)
null if it could not be found. Uses the finder cache.
mx - the mx
null if a matching company could not be found
public static Company fetchByMx(String mx,
boolean retrieveFromCache)
null if it could not be found, optionally using the finder cache.
mx - the mxretrieveFromCache - whether to retrieve from the finder cache
null if a matching company could not be found
public static Company removeByMx(String mx)
throws NoSuchCompanyException
mx - the mx
NoSuchCompanyExceptionpublic static int countByMx(String mx)
mx - the mx
public static Company findByLogoId(long logoId)
throws NoSuchCompanyException
NoSuchCompanyException if it could not be found.
logoId - the logo ID
NoSuchCompanyException - if a matching company could not be foundpublic static Company fetchByLogoId(long logoId)
null if it could not be found. Uses the finder cache.
logoId - the logo ID
null if a matching company could not be found
public static Company fetchByLogoId(long logoId,
boolean retrieveFromCache)
null if it could not be found, optionally using the finder cache.
logoId - the logo IDretrieveFromCache - whether to retrieve from the finder cache
null if a matching company could not be found
public static Company removeByLogoId(long logoId)
throws NoSuchCompanyException
logoId - the logo ID
NoSuchCompanyExceptionpublic static int countByLogoId(long logoId)
logoId - the logo ID
public static List<Company> findBySystem(boolean system)
system - the system
public static List<Company> findBySystem(boolean system,
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 CompanyModelImpl. 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.
system - the systemstart - the lower bound of the range of companiesend - the upper bound of the range of companies (not inclusive)
public static List<Company> findBySystem(boolean system,
int start,
int end,
OrderByComparator<Company> 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 CompanyModelImpl. 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.
system - the systemstart - the lower bound of the range of companiesend - the upper bound of the range of companies (not inclusive)orderByComparator - the comparator to order the results by (optionally null)
public static List<Company> findBySystem(boolean system,
int start,
int end,
OrderByComparator<Company> orderByComparator,
boolean retrieveFromCache)
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 CompanyModelImpl. 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.
system - the systemstart - the lower bound of the range of companiesend - the upper bound of the range of companies (not inclusive)orderByComparator - the comparator to order the results by (optionally null)retrieveFromCache - whether to retrieve from the finder cache
public static Company findBySystem_First(boolean system,
OrderByComparator<Company> orderByComparator)
throws NoSuchCompanyException
system - the systemorderByComparator - the comparator to order the set by (optionally null)
NoSuchCompanyException - if a matching company could not be found
public static Company fetchBySystem_First(boolean system,
OrderByComparator<Company> orderByComparator)
system - the systemorderByComparator - the comparator to order the set by (optionally null)
null if a matching company could not be found
public static Company findBySystem_Last(boolean system,
OrderByComparator<Company> orderByComparator)
throws NoSuchCompanyException
system - the systemorderByComparator - the comparator to order the set by (optionally null)
NoSuchCompanyException - if a matching company could not be found
public static Company fetchBySystem_Last(boolean system,
OrderByComparator<Company> orderByComparator)
system - the systemorderByComparator - the comparator to order the set by (optionally null)
null if a matching company could not be found
public static Company[] findBySystem_PrevAndNext(long companyId,
boolean system,
OrderByComparator<Company> orderByComparator)
throws NoSuchCompanyException
companyId - the primary key of the current companysystem - the systemorderByComparator - the comparator to order the set by (optionally null)
NoSuchCompanyException - if a company with the primary key could not be foundpublic static void removeBySystem(boolean system)
system - the systempublic static int countBySystem(boolean system)
system - the system
public static void cacheResult(Company company)
company - the companypublic static void cacheResult(List<Company> companies)
companies - the companiespublic static Company create(long companyId)
companyId - the primary key for the new company
public static Company remove(long companyId)
throws NoSuchCompanyException
companyId - the primary key of the company
NoSuchCompanyException - if a company with the primary key could not be foundpublic static Company updateImpl(Company company)
public static Company findByPrimaryKey(long companyId)
throws NoSuchCompanyException
NoSuchCompanyException if it could not be found.
companyId - the primary key of the company
NoSuchCompanyException - if a company with the primary key could not be foundpublic static Company fetchByPrimaryKey(long companyId)
null if it could not be found.
companyId - the primary key of the company
null if a company with the primary key could not be foundpublic static Map<Serializable,Company> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
public static List<Company> findAll()
public static List<Company> 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 CompanyModelImpl. 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 companiesend - the upper bound of the range of companies (not inclusive)
public static List<Company> findAll(int start,
int end,
OrderByComparator<Company> 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 CompanyModelImpl. 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 companiesend - the upper bound of the range of companies (not inclusive)orderByComparator - the comparator to order the results by (optionally null)
public static List<Company> findAll(int start,
int end,
OrderByComparator<Company> orderByComparator,
boolean retrieveFromCache)
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 CompanyModelImpl. 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 companiesend - the upper bound of the range of companies (not inclusive)orderByComparator - the comparator to order the results by (optionally null)retrieveFromCache - whether to retrieve from the finder cache
public static void removeAll()
public static int countAll()
public static Set<String> getBadColumnNames()
public static CompanyPersistence getPersistence()
|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||