|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portal.service.persistence.impl.BasePersistenceImpl<Company> com.liferay.portal.service.persistence.CompanyPersistenceImpl
public class CompanyPersistenceImpl
The persistence implementation for the company service.
Caching information and settings can be found in portal.properties
CompanyPersistence
,
CompanyUtil
Fields inherited from class com.liferay.portal.service.persistence.impl.BasePersistenceImpl |
---|
COUNT_COLUMN_NAME, FINDER_ARGS_EMPTY, listeners, ORDER_BY_ASC, ORDER_BY_ASC_HAS_NEXT, ORDER_BY_CLAUSE, ORDER_BY_DESC, ORDER_BY_DESC_HAS_NEXT, WHERE_AND, WHERE_GREATER_THAN, WHERE_GREATER_THAN_HAS_NEXT, WHERE_LESSER_THAN, WHERE_LESSER_THAN_HAS_NEXT, WHERE_OR |
Constructor Summary | |
---|---|
CompanyPersistenceImpl()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
Initializes the company persistence. |
void |
cacheResult(Company company)
Caches the company in the entity cache if it is enabled. |
void |
cacheResult(List<Company> companies)
Caches the companies in the entity cache if it is enabled. |
protected void |
cacheUniqueFindersCache(Company company)
|
void |
clearCache()
Clears the cache for all companies. |
void |
clearCache(Company company)
Clears the cache for the company. |
void |
clearCache(List<Company> companies)
Clears the cache for a List instances of this model. |
protected void |
clearUniqueFindersCache(Company company)
|
int |
countAll()
Returns the number of companies. |
int |
countByLogoId(long logoId)
Returns the number of companies where logoId = ?. |
int |
countByMx(String mx)
Returns the number of companies where mx = ?. |
int |
countBySystem(boolean system)
Returns the number of companies where system = ?. |
int |
countByWebId(String webId)
Returns the number of companies where webId = ?. |
Company |
create(long companyId)
Creates a new company with the primary key. |
void |
destroy()
|
Company |
fetchByLogoId(long logoId)
Returns the company where logoId = ? or returns null if it could not be found. |
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. |
Company |
fetchByMx(String mx)
Returns the company where mx = ? or returns null if it could not be found. |
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. |
Company |
fetchByPrimaryKey(long companyId)
Returns the company with the primary key or returns null if it could not be found. |
Company |
fetchByPrimaryKey(Serializable primaryKey)
Returns the company with the primary key or returns null if it could not be found. |
Company |
fetchBySystem_First(boolean system,
OrderByComparator orderByComparator)
Returns the first company in the ordered set where system = ?. |
Company |
fetchBySystem_Last(boolean system,
OrderByComparator orderByComparator)
Returns the last company in the ordered set where system = ?. |
Company |
fetchByWebId(String webId)
Returns the company where webId = ? or returns null if it could not be found. |
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. |
List<Company> |
findAll()
Returns all the companies. |
List<Company> |
findAll(int start,
int end)
Returns a range of all the companies. |
List<Company> |
findAll(int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the companies. |
Company |
findByLogoId(long logoId)
Returns the company where logoId = ? or throws a NoSuchCompanyException if it could not be found. |
Company |
findByMx(String mx)
Returns the company where mx = ? or throws a NoSuchCompanyException if it could not be found. |
Company |
findByPrimaryKey(long companyId)
Returns the company with the primary key or throws a NoSuchCompanyException if it could not be found. |
Company |
findByPrimaryKey(Serializable primaryKey)
Returns the company with the primary key or throws a NoSuchModelException if it could not be found. |
Company |
findBySystem_First(boolean system,
OrderByComparator orderByComparator)
Returns the first company in the ordered set where system = ?. |
Company |
findBySystem_Last(boolean system,
OrderByComparator orderByComparator)
Returns the last company in the ordered set where system = ?. |
Company[] |
findBySystem_PrevAndNext(long companyId,
boolean system,
OrderByComparator orderByComparator)
Returns the companies before and after the current company in the ordered set where system = ?. |
List<Company> |
findBySystem(boolean system)
Returns all the companies where system = ?. |
List<Company> |
findBySystem(boolean system,
int start,
int end)
Returns a range of all the companies where system = ?. |
List<Company> |
findBySystem(boolean system,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the companies where system = ?. |
Company |
findByWebId(String webId)
Returns the company where webId = ? or throws a NoSuchCompanyException if it could not be found. |
protected Set<String> |
getBadColumnNames()
|
protected Company |
getBySystem_PrevAndNext(Session session,
Company company,
boolean system,
OrderByComparator orderByComparator,
boolean previous)
|
Company |
remove(long companyId)
Removes the company with the primary key from the database. |
Company |
remove(Serializable primaryKey)
Removes the company with the primary key from the database. |
void |
removeAll()
Removes all the companies from the database. |
Company |
removeByLogoId(long logoId)
Removes the company where logoId = ? from the database. |
Company |
removeByMx(String mx)
Removes the company where mx = ? from the database. |
void |
removeBySystem(boolean system)
Removes all the companies where system = ? from the database. |
Company |
removeByWebId(String webId)
Removes the company where webId = ? from the database. |
protected Company |
removeImpl(Company company)
Removes the model instance from the database. |
protected Company |
toUnwrappedModel(Company company)
|
Company |
updateImpl(Company company)
Updates the model instance in the database or adds it if it does not yet exist. |
Methods inherited from class com.liferay.portal.service.persistence.impl.BasePersistenceImpl |
---|
appendOrderByComparator, appendOrderByComparator, closeSession, countWithDynamicQuery, countWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getClassLoader, getCurrentSession, getDataSource, getDB, getDialect, getListeners, getModelClass, openNewSession, openSession, processException, registerListener, remove, removeConjunction, setDataSource, setModelClass, setSessionFactory, unregisterListener, update, update, update, update, updateImpl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence |
---|
closeSession, countWithDynamicQuery, countWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getCurrentSession, getDataSource, getListeners, getModelClass, openSession, processException, registerListener, remove, setDataSource, unregisterListener, update, update, update, update |
Field Detail |
---|
public static final String FINDER_CLASS_NAME_ENTITY
public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION
public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION
public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL
public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL
public static final FinderPath FINDER_PATH_COUNT_ALL
public static final FinderPath FINDER_PATH_FETCH_BY_WEBID
public static final FinderPath FINDER_PATH_COUNT_BY_WEBID
public static final FinderPath FINDER_PATH_FETCH_BY_MX
public static final FinderPath FINDER_PATH_COUNT_BY_MX
public static final FinderPath FINDER_PATH_FETCH_BY_LOGOID
public static final FinderPath FINDER_PATH_COUNT_BY_LOGOID
public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_SYSTEM
public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_SYSTEM
public static final FinderPath FINDER_PATH_COUNT_BY_SYSTEM
Constructor Detail |
---|
public CompanyPersistenceImpl()
Method Detail |
---|
public Company findByWebId(String webId) throws NoSuchCompanyException, SystemException
NoSuchCompanyException
if it could not be found.
findByWebId
in interface CompanyPersistence
webId
- the web ID
NoSuchCompanyException
- if a matching company could not be found
SystemException
- if a system exception occurredpublic Company fetchByWebId(String webId) throws SystemException
null
if it could not be found. Uses the finder cache.
fetchByWebId
in interface CompanyPersistence
webId
- the web ID
null
if a matching company could not be found
SystemException
- if a system exception occurredpublic Company fetchByWebId(String webId, boolean retrieveFromCache) throws SystemException
null
if it could not be found, optionally using the finder cache.
fetchByWebId
in interface CompanyPersistence
webId
- the web IDretrieveFromCache
- whether to use the finder cache
null
if a matching company could not be found
SystemException
- if a system exception occurredpublic Company removeByWebId(String webId) throws NoSuchCompanyException, SystemException
removeByWebId
in interface CompanyPersistence
webId
- the web ID
SystemException
- if a system exception occurred
NoSuchCompanyException
public int countByWebId(String webId) throws SystemException
countByWebId
in interface CompanyPersistence
webId
- the web ID
SystemException
- if a system exception occurredpublic Company findByMx(String mx) throws NoSuchCompanyException, SystemException
NoSuchCompanyException
if it could not be found.
findByMx
in interface CompanyPersistence
mx
- the mx
NoSuchCompanyException
- if a matching company could not be found
SystemException
- if a system exception occurredpublic Company fetchByMx(String mx) throws SystemException
null
if it could not be found. Uses the finder cache.
fetchByMx
in interface CompanyPersistence
mx
- the mx
null
if a matching company could not be found
SystemException
- if a system exception occurredpublic Company fetchByMx(String mx, boolean retrieveFromCache) throws SystemException
null
if it could not be found, optionally using the finder cache.
fetchByMx
in interface CompanyPersistence
mx
- the mxretrieveFromCache
- whether to use the finder cache
null
if a matching company could not be found
SystemException
- if a system exception occurredpublic Company removeByMx(String mx) throws NoSuchCompanyException, SystemException
removeByMx
in interface CompanyPersistence
mx
- the mx
SystemException
- if a system exception occurred
NoSuchCompanyException
public int countByMx(String mx) throws SystemException
countByMx
in interface CompanyPersistence
mx
- the mx
SystemException
- if a system exception occurredpublic Company findByLogoId(long logoId) throws NoSuchCompanyException, SystemException
NoSuchCompanyException
if it could not be found.
findByLogoId
in interface CompanyPersistence
logoId
- the logo ID
NoSuchCompanyException
- if a matching company could not be found
SystemException
- if a system exception occurredpublic Company fetchByLogoId(long logoId) throws SystemException
null
if it could not be found. Uses the finder cache.
fetchByLogoId
in interface CompanyPersistence
logoId
- the logo ID
null
if a matching company could not be found
SystemException
- if a system exception occurredpublic Company fetchByLogoId(long logoId, boolean retrieveFromCache) throws SystemException
null
if it could not be found, optionally using the finder cache.
fetchByLogoId
in interface CompanyPersistence
logoId
- the logo IDretrieveFromCache
- whether to use the finder cache
null
if a matching company could not be found
SystemException
- if a system exception occurredpublic Company removeByLogoId(long logoId) throws NoSuchCompanyException, SystemException
removeByLogoId
in interface CompanyPersistence
logoId
- the logo ID
SystemException
- if a system exception occurred
NoSuchCompanyException
public int countByLogoId(long logoId) throws SystemException
countByLogoId
in interface CompanyPersistence
logoId
- the logo ID
SystemException
- if a system exception occurredpublic List<Company> findBySystem(boolean system) throws SystemException
findBySystem
in interface CompanyPersistence
system
- the system
SystemException
- if a system exception occurredpublic 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. 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.
findBySystem
in interface CompanyPersistence
system
- the systemstart
- the lower bound of the range of companiesend
- the upper bound of the range of companies (not inclusive)
SystemException
- if a system exception occurredpublic 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. 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.
findBySystem
in interface CompanyPersistence
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
)
SystemException
- if a system exception occurredpublic Company findBySystem_First(boolean system, OrderByComparator orderByComparator) throws NoSuchCompanyException, SystemException
findBySystem_First
in interface CompanyPersistence
system
- the systemorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchCompanyException
- if a matching company could not be found
SystemException
- if a system exception occurredpublic Company fetchBySystem_First(boolean system, OrderByComparator orderByComparator) throws SystemException
fetchBySystem_First
in interface CompanyPersistence
system
- the systemorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching company could not be found
SystemException
- if a system exception occurredpublic Company findBySystem_Last(boolean system, OrderByComparator orderByComparator) throws NoSuchCompanyException, SystemException
findBySystem_Last
in interface CompanyPersistence
system
- the systemorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchCompanyException
- if a matching company could not be found
SystemException
- if a system exception occurredpublic Company fetchBySystem_Last(boolean system, OrderByComparator orderByComparator) throws SystemException
fetchBySystem_Last
in interface CompanyPersistence
system
- the systemorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching company could not be found
SystemException
- if a system exception occurredpublic Company[] findBySystem_PrevAndNext(long companyId, boolean system, OrderByComparator orderByComparator) throws NoSuchCompanyException, SystemException
findBySystem_PrevAndNext
in interface CompanyPersistence
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 found
SystemException
- if a system exception occurredprotected Company getBySystem_PrevAndNext(Session session, Company company, boolean system, OrderByComparator orderByComparator, boolean previous)
public void removeBySystem(boolean system) throws SystemException
removeBySystem
in interface CompanyPersistence
system
- the system
SystemException
- if a system exception occurredpublic int countBySystem(boolean system) throws SystemException
countBySystem
in interface CompanyPersistence
system
- the system
SystemException
- if a system exception occurredpublic void cacheResult(Company company)
cacheResult
in interface CompanyPersistence
company
- the companypublic void cacheResult(List<Company> companies)
cacheResult
in interface CompanyPersistence
companies
- the companiespublic void clearCache()
The EntityCache
and FinderCache
are both cleared by this method.
clearCache
in interface BasePersistence<Company>
clearCache
in class BasePersistenceImpl<Company>
public void clearCache(Company company)
The EntityCache
and FinderCache
are both cleared by this method.
clearCache
in interface BasePersistence<Company>
clearCache
in class BasePersistenceImpl<Company>
company
- the instance of this model to clear the cache forpublic void clearCache(List<Company> companies)
BasePersistence
The EntityCache
and FinderCache
are both cleared by this
method.
clearCache
in interface BasePersistence<Company>
clearCache
in class BasePersistenceImpl<Company>
companies
- the List instances of this model to clear the cache forprotected void cacheUniqueFindersCache(Company company)
protected void clearUniqueFindersCache(Company company)
public Company create(long companyId)
create
in interface CompanyPersistence
companyId
- the primary key for the new company
public Company remove(long companyId) throws NoSuchCompanyException, SystemException
remove
in interface CompanyPersistence
companyId
- the primary key of the company
NoSuchCompanyException
- if a company with the primary key could not be found
SystemException
- if a system exception occurredpublic Company remove(Serializable primaryKey) throws NoSuchCompanyException, SystemException
remove
in interface BasePersistence<Company>
remove
in class BasePersistenceImpl<Company>
primaryKey
- the primary key of the company
NoSuchCompanyException
- if a company with the primary key could not be found
SystemException
- if a system exception occurredprotected Company removeImpl(Company company) throws SystemException
BasePersistenceImpl
BasePersistenceImpl.update(BaseModel,
boolean)
depends on this method to implement the remove operation; it
only notifies the model listeners.
removeImpl
in class BasePersistenceImpl<Company>
company
- the model instance to remove
SystemException
- if a system exception occurredpublic Company updateImpl(Company company) throws SystemException
BasePersistenceImpl
BasePersistenceImpl.remove(BaseModel)
depends on this method to implement the
update operation; it only notifies the model listeners.
updateImpl
in interface CompanyPersistence
updateImpl
in class BasePersistenceImpl<Company>
company
- the model instance to update
SystemException
- if a system exception occurredprotected Company toUnwrappedModel(Company company)
public Company findByPrimaryKey(Serializable primaryKey) throws NoSuchCompanyException, SystemException
NoSuchModelException
if it could not be found.
findByPrimaryKey
in interface BasePersistence<Company>
findByPrimaryKey
in class BasePersistenceImpl<Company>
primaryKey
- the primary key of the company
NoSuchCompanyException
- if a company with the primary key could not be found
SystemException
- if a system exception occurredpublic Company findByPrimaryKey(long companyId) throws NoSuchCompanyException, SystemException
NoSuchCompanyException
if it could not be found.
findByPrimaryKey
in interface CompanyPersistence
companyId
- the primary key of the company
NoSuchCompanyException
- if a company with the primary key could not be found
SystemException
- if a system exception occurredpublic Company fetchByPrimaryKey(Serializable primaryKey) throws SystemException
null
if it could not be found.
fetchByPrimaryKey
in interface BasePersistence<Company>
fetchByPrimaryKey
in class BasePersistenceImpl<Company>
primaryKey
- the primary key of the company
null
if a company with the primary key could not be found
SystemException
- if a system exception occurredpublic Company fetchByPrimaryKey(long companyId) throws SystemException
null
if it could not be found.
fetchByPrimaryKey
in interface CompanyPersistence
companyId
- the primary key of the company
null
if a company with the primary key could not be found
SystemException
- if a system exception occurredpublic List<Company> findAll() throws SystemException
findAll
in interface CompanyPersistence
SystemException
- if a system exception occurredpublic 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. 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.
findAll
in interface CompanyPersistence
start
- the lower bound of the range of companiesend
- the upper bound of the range of companies (not inclusive)
SystemException
- if a system exception occurredpublic 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. 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.
findAll
in interface CompanyPersistence
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
)
SystemException
- if a system exception occurredpublic void removeAll() throws SystemException
removeAll
in interface CompanyPersistence
SystemException
- if a system exception occurredpublic int countAll() throws SystemException
countAll
in interface CompanyPersistence
SystemException
- if a system exception occurredprotected Set<String> getBadColumnNames()
getBadColumnNames
in class BasePersistenceImpl<Company>
public void afterPropertiesSet()
public void destroy()
|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |