Liferay 6.1.2-ce-ga3

com.liferay.portal.service.persistence
Interface CompanyPersistence

All Superinterfaces:
BasePersistence<Company>
All Known Implementing Classes:
CompanyPersistenceImpl

public interface CompanyPersistence
extends BasePersistence<Company>

The persistence interface for the company service.

Caching information and settings can be found in portal.properties

See Also:
CompanyPersistenceImpl, CompanyUtil
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Method Summary
 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.
 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.
 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 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 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.
 Company remove(long companyId)
          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.
 Company updateImpl(Company company, boolean merge)
           
 
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence
clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, getDataSource, getListeners, openSession, processException, registerListener, remove, remove, setDataSource, unregisterListener, update, update
 

Method Detail

cacheResult

void cacheResult(Company company)
Caches the company in the entity cache if it is enabled.

Parameters:
company - the company

cacheResult

void cacheResult(List<Company> companies)
Caches the companies in the entity cache if it is enabled.

Parameters:
companies - the companies

create

Company create(long companyId)
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

Company remove(long companyId)
               throws NoSuchCompanyException,
                      SystemException
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
SystemException - if a system exception occurred

updateImpl

Company updateImpl(Company company,
                   boolean merge)
                   throws SystemException
Throws:
SystemException

findByPrimaryKey

Company findByPrimaryKey(long companyId)
                         throws NoSuchCompanyException,
                                SystemException
Returns the company with the primary key or throws a NoSuchCompanyException 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
SystemException - if a system exception occurred

fetchByPrimaryKey

Company fetchByPrimaryKey(long companyId)
                          throws SystemException
Returns the company with the primary key or returns null 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
Throws:
SystemException - if a system exception occurred

findByWebId

Company findByWebId(String webId)
                    throws NoSuchCompanyException,
                           SystemException
Returns the company where webId = ? or throws a NoSuchCompanyException 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
SystemException - if a system exception occurred

fetchByWebId

Company fetchByWebId(String webId)
                     throws SystemException
Returns the company where webId = ? or returns null 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
Throws:
SystemException - if a system exception occurred

fetchByWebId

Company fetchByWebId(String webId,
                     boolean retrieveFromCache)
                     throws SystemException
Returns the company where webId = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
webId - the web ID
retrieveFromCache - whether to use the finder cache
Returns:
the matching company, or null if a matching company could not be found
Throws:
SystemException - if a system exception occurred

findByMx

Company findByMx(String mx)
                 throws NoSuchCompanyException,
                        SystemException
Returns the company where mx = ? or throws a NoSuchCompanyException if it could not be found.

Parameters:
mx - the mx
Returns:
the matching company
Throws:
NoSuchCompanyException - if a matching company could not be found
SystemException - if a system exception occurred

fetchByMx

Company fetchByMx(String mx)
                  throws SystemException
Returns the company where mx = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
mx - the mx
Returns:
the matching company, or null if a matching company could not be found
Throws:
SystemException - if a system exception occurred

fetchByMx

Company fetchByMx(String mx,
                  boolean retrieveFromCache)
                  throws SystemException
Returns the company where mx = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
mx - the mx
retrieveFromCache - whether to use the finder cache
Returns:
the matching company, or null if a matching company could not be found
Throws:
SystemException - if a system exception occurred

findByLogoId

Company findByLogoId(long logoId)
                     throws NoSuchCompanyException,
                            SystemException
Returns the company where logoId = ? or throws a NoSuchCompanyException if it could not be found.

Parameters:
logoId - the logo ID
Returns:
the matching company
Throws:
NoSuchCompanyException - if a matching company could not be found
SystemException - if a system exception occurred

fetchByLogoId

Company fetchByLogoId(long logoId)
                      throws SystemException
Returns the company where logoId = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
logoId - the logo ID
Returns:
the matching company, or null if a matching company could not be found
Throws:
SystemException - if a system exception occurred

fetchByLogoId

Company fetchByLogoId(long logoId,
                      boolean retrieveFromCache)
                      throws SystemException
Returns the company where logoId = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
logoId - the logo ID
retrieveFromCache - whether to use the finder cache
Returns:
the matching company, or null if a matching company could not be found
Throws:
SystemException - if a system exception occurred

findBySystem

List<Company> findBySystem(boolean system)
                           throws SystemException
Returns all the companies where system = ?.

Parameters:
system - the system
Returns:
the matching companies
Throws:
SystemException - if a system exception occurred

findBySystem

List<Company> findBySystem(boolean system,
                           int start,
                           int end)
                           throws SystemException
Returns a range of all the companies where system = ?.

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.

Parameters:
system - the system
start - the lower bound of the range of companies
end - the upper bound of the range of companies (not inclusive)
Returns:
the range of matching companies
Throws:
SystemException - if a system exception occurred

findBySystem

List<Company> findBySystem(boolean system,
                           int start,
                           int end,
                           OrderByComparator orderByComparator)
                           throws SystemException
Returns an ordered range of all the companies where system = ?.

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.

Parameters:
system - the system
start - the lower bound of the range of companies
end - the upper bound of the range of companies (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching companies
Throws:
SystemException - if a system exception occurred

findBySystem_First

Company findBySystem_First(boolean system,
                           OrderByComparator orderByComparator)
                           throws NoSuchCompanyException,
                                  SystemException
Returns the first company in the ordered set where system = ?.

Parameters:
system - the system
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching company
Throws:
NoSuchCompanyException - if a matching company could not be found
SystemException - if a system exception occurred

fetchBySystem_First

Company fetchBySystem_First(boolean system,
                            OrderByComparator orderByComparator)
                            throws SystemException
Returns the first company in the ordered set where system = ?.

Parameters:
system - the system
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching company, or null if a matching company could not be found
Throws:
SystemException - if a system exception occurred

findBySystem_Last

Company findBySystem_Last(boolean system,
                          OrderByComparator orderByComparator)
                          throws NoSuchCompanyException,
                                 SystemException
Returns the last company in the ordered set where system = ?.

Parameters:
system - the system
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching company
Throws:
NoSuchCompanyException - if a matching company could not be found
SystemException - if a system exception occurred

fetchBySystem_Last

Company fetchBySystem_Last(boolean system,
                           OrderByComparator orderByComparator)
                           throws SystemException
Returns the last company in the ordered set where system = ?.

Parameters:
system - the system
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching company, or null if a matching company could not be found
Throws:
SystemException - if a system exception occurred

findBySystem_PrevAndNext

Company[] findBySystem_PrevAndNext(long companyId,
                                   boolean system,
                                   OrderByComparator orderByComparator)
                                   throws NoSuchCompanyException,
                                          SystemException
Returns the companies before and after the current company in the ordered set where system = ?.

Parameters:
companyId - the primary key of the current company
system - the system
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next company
Throws:
NoSuchCompanyException - if a company with the primary key could not be found
SystemException - if a system exception occurred

findAll

List<Company> findAll()
                      throws SystemException
Returns all the companies.

Returns:
the companies
Throws:
SystemException - if a system exception occurred

findAll

List<Company> findAll(int start,
                      int end)
                      throws SystemException
Returns a range of all the companies.

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.

Parameters:
start - the lower bound of the range of companies
end - the upper bound of the range of companies (not inclusive)
Returns:
the range of companies
Throws:
SystemException - if a system exception occurred

findAll

List<Company> findAll(int start,
                      int end,
                      OrderByComparator orderByComparator)
                      throws SystemException
Returns an ordered range of all the companies.

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.

Parameters:
start - the lower bound of the range of companies
end - the upper bound of the range of companies (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of companies
Throws:
SystemException - if a system exception occurred

removeByWebId

Company removeByWebId(String webId)
                      throws NoSuchCompanyException,
                             SystemException
Removes the company where webId = ? from the database.

Parameters:
webId - the web ID
Returns:
the company that was removed
Throws:
SystemException - if a system exception occurred
NoSuchCompanyException

removeByMx

Company removeByMx(String mx)
                   throws NoSuchCompanyException,
                          SystemException
Removes the company where mx = ? from the database.

Parameters:
mx - the mx
Returns:
the company that was removed
Throws:
SystemException - if a system exception occurred
NoSuchCompanyException

removeByLogoId

Company removeByLogoId(long logoId)
                       throws NoSuchCompanyException,
                              SystemException
Removes the company where logoId = ? from the database.

Parameters:
logoId - the logo ID
Returns:
the company that was removed
Throws:
SystemException - if a system exception occurred
NoSuchCompanyException

removeBySystem

void removeBySystem(boolean system)
                    throws SystemException
Removes all the companies where system = ? from the database.

Parameters:
system - the system
Throws:
SystemException - if a system exception occurred

removeAll

void removeAll()
               throws SystemException
Removes all the companies from the database.

Throws:
SystemException - if a system exception occurred

countByWebId

int countByWebId(String webId)
                 throws SystemException
Returns the number of companies where webId = ?.

Parameters:
webId - the web ID
Returns:
the number of matching companies
Throws:
SystemException - if a system exception occurred

countByMx

int countByMx(String mx)
              throws SystemException
Returns the number of companies where mx = ?.

Parameters:
mx - the mx
Returns:
the number of matching companies
Throws:
SystemException - if a system exception occurred

countByLogoId

int countByLogoId(long logoId)
                  throws SystemException
Returns the number of companies where logoId = ?.

Parameters:
logoId - the logo ID
Returns:
the number of matching companies
Throws:
SystemException - if a system exception occurred

countBySystem

int countBySystem(boolean system)
                  throws SystemException
Returns the number of companies where system = ?.

Parameters:
system - the system
Returns:
the number of matching companies
Throws:
SystemException - if a system exception occurred

countAll

int countAll()
             throws SystemException
Returns the number of companies.

Returns:
the number of companies
Throws:
SystemException - if a system exception occurred

Liferay 6.1.2-ce-ga3