Interface CompanyPersistence
- All Superinterfaces:
BasePersistence<Company>
Caching information and settings can be found in portal.properties
- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.int
countAll()
Returns the number of companies.int
countByLogoId
(long logoId) Returns the number of companies where logoId = ?.int
countByWebId
(String webId) Returns the number of companies where webId = ?.create
(long companyId) Creates a new company with the primary key.fetchByLogoId_First
(long logoId, OrderByComparator<Company> orderByComparator) Returns the first company in the ordered set where logoId = ?.fetchByLogoId_Last
(long logoId, OrderByComparator<Company> orderByComparator) Returns the last company in the ordered set where logoId = ?.fetchByPrimaryKey
(long companyId) Returns the company with the primary key or returnsnull
if it could not be found.fetchByWebId
(String webId) Returns the company where webId = ? or returnsnull
if it could not be found.fetchByWebId
(String webId, boolean useFinderCache) Returns the company where webId = ? or returnsnull
if it could not be found, optionally using the finder cache.findAll()
Returns all the companies.findAll
(int start, int end) Returns a range of all the companies.findAll
(int start, int end, OrderByComparator<Company> orderByComparator) Returns an ordered range of all the companies.findAll
(int start, int end, OrderByComparator<Company> orderByComparator, boolean useFinderCache) Returns an ordered range of all the companies.findByLogoId
(long logoId) Returns all the companies where logoId = ?.findByLogoId
(long logoId, int start, int end) Returns a range of all the companies where logoId = ?.findByLogoId
(long logoId, int start, int end, OrderByComparator<Company> orderByComparator) Returns an ordered range of all the companies where logoId = ?.findByLogoId
(long logoId, int start, int end, OrderByComparator<Company> orderByComparator, boolean useFinderCache) Returns an ordered range of all the companies where logoId = ?.findByLogoId_First
(long logoId, OrderByComparator<Company> orderByComparator) Returns the first company in the ordered set where logoId = ?.findByLogoId_Last
(long logoId, OrderByComparator<Company> orderByComparator) Returns the last company in the ordered set where logoId = ?.Company[]
findByLogoId_PrevAndNext
(long companyId, long logoId, OrderByComparator<Company> orderByComparator) Returns the companies before and after the current company in the ordered set where logoId = ?.findByPrimaryKey
(long companyId) Returns the company with the primary key or throws aNoSuchCompanyException
if it could not be found.findByWebId
(String webId) Returns the company where webId = ? or throws aNoSuchCompanyException
if it could not be found.remove
(long companyId) Removes the company with the primary key from the database.void
Removes all the companies from the database.void
removeByLogoId
(long logoId) Removes all the companies where logoId = ? from the database.removeByWebId
(String webId) Removes the company where webId = ? from the database.updateImpl
(Company company) Methods inherited from interface com.liferay.portal.kernel.service.persistence.BasePersistence
clearCache, clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, countWithDynamicQuery, dslQuery, dslQueryCount, fetchByPrimaryKey, fetchByPrimaryKeys, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getBadColumnNames, getCurrentSession, getDataSource, getDB, getDialect, getListeners, getModelClass, openSession, processException, registerListener, remove, remove, removeByFunction, setDataSource, unregisterListener, update, update
-
Method Details
-
findByWebId
Returns the company where webId = ? or throws aNoSuchCompanyException
if it could not be found.- Parameters:
webId
- the web ID- Returns:
- the matching company
- Throws:
NoSuchCompanyException
- if a matching company could not be found
-
fetchByWebId
Returns the company where webId = ? or returnsnull
if it could not be found. Uses the finder cache.- Parameters:
webId
- the web ID- Returns:
- the matching company, or
null
if a matching company could not be found
-
fetchByWebId
Returns the company where webId = ? or returnsnull
if it could not be found, optionally using the finder cache.- Parameters:
webId
- the web IDuseFinderCache
- whether to use the finder cache- Returns:
- the matching company, or
null
if a matching company could not be found
-
removeByWebId
Removes the company where webId = ? from the database.- Parameters:
webId
- the web ID- Returns:
- the company that was removed
- Throws:
NoSuchCompanyException
-
countByWebId
Returns the number of companies where webId = ?.- Parameters:
webId
- the web ID- Returns:
- the number of matching companies
-
findByLogoId
Returns all the companies where logoId = ?.- Parameters:
logoId
- the logo ID- Returns:
- the matching companies
-
findByLogoId
Returns a range of all the companies where logoId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCompanyModelImpl
.- Parameters:
logoId
- the logo IDstart
- the lower bound of the range of companiesend
- the upper bound of the range of companies (not inclusive)- Returns:
- the range of matching companies
-
findByLogoId
List<Company> findByLogoId(long logoId, int start, int end, OrderByComparator<Company> orderByComparator) Returns an ordered range of all the companies where logoId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCompanyModelImpl
.- Parameters:
logoId
- the logo IDstart
- 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 (optionallynull
)- Returns:
- the ordered range of matching companies
-
findByLogoId
List<Company> findByLogoId(long logoId, int start, int end, OrderByComparator<Company> orderByComparator, boolean useFinderCache) Returns an ordered range of all the companies where logoId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCompanyModelImpl
.- Parameters:
logoId
- the logo IDstart
- 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 (optionallynull
)useFinderCache
- whether to use the finder cache- Returns:
- the ordered range of matching companies
-
findByLogoId_First
Company findByLogoId_First(long logoId, OrderByComparator<Company> orderByComparator) throws NoSuchCompanyException Returns the first company in the ordered set where logoId = ?.- Parameters:
logoId
- the logo IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching company
- Throws:
NoSuchCompanyException
- if a matching company could not be found
-
fetchByLogoId_First
Returns the first company in the ordered set where logoId = ?.- Parameters:
logoId
- the logo IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching company, or
null
if a matching company could not be found
-
findByLogoId_Last
Company findByLogoId_Last(long logoId, OrderByComparator<Company> orderByComparator) throws NoSuchCompanyException Returns the last company in the ordered set where logoId = ?.- Parameters:
logoId
- the logo IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching company
- Throws:
NoSuchCompanyException
- if a matching company could not be found
-
fetchByLogoId_Last
Returns the last company in the ordered set where logoId = ?.- Parameters:
logoId
- the logo IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching company, or
null
if a matching company could not be found
-
findByLogoId_PrevAndNext
Company[] findByLogoId_PrevAndNext(long companyId, long logoId, OrderByComparator<Company> orderByComparator) throws NoSuchCompanyException Returns the companies before and after the current company in the ordered set where logoId = ?.- Parameters:
companyId
- the primary key of the current companylogoId
- the logo IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the previous, current, and next company
- Throws:
NoSuchCompanyException
- if a company with the primary key could not be found
-
removeByLogoId
void removeByLogoId(long logoId) Removes all the companies where logoId = ? from the database.- Parameters:
logoId
- the logo ID
-
countByLogoId
int countByLogoId(long logoId) Returns the number of companies where logoId = ?.- Parameters:
logoId
- the logo ID- Returns:
- the number of matching companies
-
cacheResult
Caches the company in the entity cache if it is enabled.- Parameters:
company
- the company
-
cacheResult
Caches the companies in the entity cache if it is enabled.- Parameters:
companies
- the companies
-
create
Creates a new company with the primary key. Does not add the company to the database.- Parameters:
companyId
- the primary key for the new company- Returns:
- the new company
-
remove
Removes the company with the primary key from the database. Also notifies the appropriate model listeners.- Parameters:
companyId
- the primary key of the company- Returns:
- the company that was removed
- Throws:
NoSuchCompanyException
- if a company with the primary key could not be found
-
updateImpl
-
findByPrimaryKey
Returns the company with the primary key or throws aNoSuchCompanyException
if it could not be found.- Parameters:
companyId
- the primary key of the company- Returns:
- the company
- Throws:
NoSuchCompanyException
- if a company with the primary key could not be found
-
fetchByPrimaryKey
Returns the company with the primary key or returnsnull
if it could not be found.- Parameters:
companyId
- the primary key of the company- Returns:
- the company, or
null
if a company with the primary key could not be found
-
findAll
Returns all the companies.- Returns:
- the companies
-
findAll
Returns a range of all the companies.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCompanyModelImpl
.- Parameters:
start
- the lower bound of the range of companiesend
- the upper bound of the range of companies (not inclusive)- Returns:
- the range of companies
-
findAll
Returns an ordered range of all the companies.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCompanyModelImpl
.- Parameters:
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 (optionallynull
)- Returns:
- the ordered range of companies
-
findAll
List<Company> findAll(int start, int end, OrderByComparator<Company> orderByComparator, boolean useFinderCache) Returns an ordered range of all the companies.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromCompanyModelImpl
.- Parameters:
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 (optionallynull
)useFinderCache
- whether to use the finder cache- Returns:
- the ordered range of companies
-
removeAll
void removeAll()Removes all the companies from the database. -
countAll
int countAll()Returns the number of companies.- Returns:
- the number of companies
-