@ProviderType
public class CommerceAccountUtil
extends java.lang.Object
com.liferay.commerce.account.service.persistence.impl.CommerceAccountPersistenceImpl 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
CommerceAccountPersistence,
com.liferay.commerce.account.service.persistence.impl.CommerceAccountPersistenceImpl| Constructor and Description |
|---|
CommerceAccountUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
cacheResult(CommerceAccount commerceAccount)
Caches the commerce account in the entity cache if it is enabled.
|
static void |
cacheResult(java.util.List<CommerceAccount> commerceAccounts)
Caches the commerce accounts in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(CommerceAccount commerceAccount) |
static int |
countAll()
Returns the number of commerce accounts.
|
static int |
countByC_ERC(long companyId,
java.lang.String externalReferenceCode)
Returns the number of commerce accounts where companyId = ? and externalReferenceCode = ?.
|
static int |
countByC_N(long companyId,
java.lang.String name)
Returns the number of commerce accounts where companyId = ? and name = ?.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static CommerceAccount |
create(long commerceAccountId)
Creates a new commerce account with the primary key.
|
static CommerceAccount |
fetchByC_ERC(long companyId,
java.lang.String externalReferenceCode)
Returns the commerce account where companyId = ? and externalReferenceCode = ? or returns
null if it could not be found. |
static CommerceAccount |
fetchByC_ERC(long companyId,
java.lang.String externalReferenceCode,
boolean retrieveFromCache)
Returns the commerce account where companyId = ? and externalReferenceCode = ? or returns
null if it could not be found, optionally using the finder cache. |
static CommerceAccount |
fetchByC_N(long companyId,
java.lang.String name)
Returns the commerce account where companyId = ? and name = ? or returns
null if it could not be found. |
static CommerceAccount |
fetchByC_N(long companyId,
java.lang.String name,
boolean retrieveFromCache)
Returns the commerce account where companyId = ? and name = ? or returns
null if it could not be found, optionally using the finder cache. |
static CommerceAccount |
fetchByPrimaryKey(long commerceAccountId)
Returns the commerce account with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,CommerceAccount> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static java.util.List<CommerceAccount> |
findAll()
Returns all the commerce accounts.
|
static java.util.List<CommerceAccount> |
findAll(int start,
int end)
Returns a range of all the commerce accounts.
|
static java.util.List<CommerceAccount> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CommerceAccount> orderByComparator)
Returns an ordered range of all the commerce accounts.
|
static java.util.List<CommerceAccount> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CommerceAccount> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the commerce accounts.
|
static CommerceAccount |
findByC_ERC(long companyId,
java.lang.String externalReferenceCode)
Returns the commerce account where companyId = ? and externalReferenceCode = ? or throws a
NoSuchAccountException if it could not be found. |
static CommerceAccount |
findByC_N(long companyId,
java.lang.String name)
Returns the commerce account where companyId = ? and name = ? or throws a
NoSuchAccountException if it could not be found. |
static CommerceAccount |
findByPrimaryKey(long commerceAccountId)
Returns the commerce account with the primary key or throws a
NoSuchAccountException if it could not be found. |
static java.util.List<CommerceAccount> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<CommerceAccount> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<CommerceAccount> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<CommerceAccount> orderByComparator) |
static java.util.Set<java.lang.String> |
getBadColumnNames() |
static CommerceAccountPersistence |
getPersistence() |
static CommerceAccount |
remove(long commerceAccountId)
Removes the commerce account with the primary key from the database.
|
static void |
removeAll()
Removes all the commerce accounts from the database.
|
static CommerceAccount |
removeByC_ERC(long companyId,
java.lang.String externalReferenceCode)
Removes the commerce account where companyId = ? and externalReferenceCode = ? from the database.
|
static CommerceAccount |
removeByC_N(long companyId,
java.lang.String name)
Removes the commerce account where companyId = ? and name = ? from the database.
|
static CommerceAccount |
update(CommerceAccount commerceAccount) |
static CommerceAccount |
update(CommerceAccount commerceAccount,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static CommerceAccount |
updateImpl(CommerceAccount commerceAccount) |
public static void clearCache()
BasePersistence.clearCache()public static void clearCache(CommerceAccount commerceAccount)
BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.countWithDynamicQuery(DynamicQuery)public static java.util.List<CommerceAccount> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)public static java.util.List<CommerceAccount> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)public static java.util.List<CommerceAccount> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceAccount> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)public static CommerceAccount update(CommerceAccount commerceAccount)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)public static CommerceAccount update(CommerceAccount commerceAccount, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)public static CommerceAccount findByC_N(long companyId, java.lang.String name) throws NoSuchAccountException
NoSuchAccountException if it could not be found.companyId - the company IDname - the nameNoSuchAccountException - if a matching commerce account could not be foundpublic static CommerceAccount fetchByC_N(long companyId, java.lang.String name)
null if it could not be found. Uses the finder cache.companyId - the company IDname - the namenull if a matching commerce account could not be foundpublic static CommerceAccount fetchByC_N(long companyId, java.lang.String name, boolean retrieveFromCache)
null if it could not be found, optionally using the finder cache.companyId - the company IDname - the nameretrieveFromCache - whether to retrieve from the finder cachenull if a matching commerce account could not be foundpublic static CommerceAccount removeByC_N(long companyId, java.lang.String name) throws NoSuchAccountException
companyId - the company IDname - the nameNoSuchAccountExceptionpublic static int countByC_N(long companyId,
java.lang.String name)
companyId - the company IDname - the namepublic static CommerceAccount findByC_ERC(long companyId, java.lang.String externalReferenceCode) throws NoSuchAccountException
NoSuchAccountException if it could not be found.companyId - the company IDexternalReferenceCode - the external reference codeNoSuchAccountException - if a matching commerce account could not be foundpublic static CommerceAccount fetchByC_ERC(long companyId, java.lang.String externalReferenceCode)
null if it could not be found. Uses the finder cache.companyId - the company IDexternalReferenceCode - the external reference codenull if a matching commerce account could not be foundpublic static CommerceAccount fetchByC_ERC(long companyId, java.lang.String externalReferenceCode, boolean retrieveFromCache)
null if it could not be found, optionally using the finder cache.companyId - the company IDexternalReferenceCode - the external reference coderetrieveFromCache - whether to retrieve from the finder cachenull if a matching commerce account could not be foundpublic static CommerceAccount removeByC_ERC(long companyId, java.lang.String externalReferenceCode) throws NoSuchAccountException
companyId - the company IDexternalReferenceCode - the external reference codeNoSuchAccountExceptionpublic static int countByC_ERC(long companyId,
java.lang.String externalReferenceCode)
companyId - the company IDexternalReferenceCode - the external reference codepublic static void cacheResult(CommerceAccount commerceAccount)
commerceAccount - the commerce accountpublic static void cacheResult(java.util.List<CommerceAccount> commerceAccounts)
commerceAccounts - the commerce accountspublic static CommerceAccount create(long commerceAccountId)
commerceAccountId - the primary key for the new commerce accountpublic static CommerceAccount remove(long commerceAccountId) throws NoSuchAccountException
commerceAccountId - the primary key of the commerce accountNoSuchAccountException - if a commerce account with the primary key could not be foundpublic static CommerceAccount updateImpl(CommerceAccount commerceAccount)
public static CommerceAccount findByPrimaryKey(long commerceAccountId) throws NoSuchAccountException
NoSuchAccountException if it could not be found.commerceAccountId - the primary key of the commerce accountNoSuchAccountException - if a commerce account with the primary key could not be foundpublic static CommerceAccount fetchByPrimaryKey(long commerceAccountId)
null if it could not be found.commerceAccountId - the primary key of the commerce accountnull if a commerce account with the primary key could not be foundpublic static java.util.Map<java.io.Serializable,CommerceAccount> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
public static java.util.List<CommerceAccount> findAll()
public static java.util.List<CommerceAccount> 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 CommerceAccountModelImpl. 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 commerce accountsend - the upper bound of the range of commerce accounts (not inclusive)public static java.util.List<CommerceAccount> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceAccount> 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 CommerceAccountModelImpl. 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 commerce accountsend - the upper bound of the range of commerce accounts (not inclusive)orderByComparator - the comparator to order the results by (optionally null)public static java.util.List<CommerceAccount> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CommerceAccount> 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 CommerceAccountModelImpl. 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 commerce accountsend - the upper bound of the range of commerce accounts (not inclusive)orderByComparator - the comparator to order the results by (optionally null)retrieveFromCache - whether to retrieve from the finder cachepublic static void removeAll()
public static int countAll()
public static java.util.Set<java.lang.String> getBadColumnNames()
public static CommerceAccountPersistence getPersistence()