Liferay 6.2-ce-ga5

com.liferay.portal.service.persistence
Class CompanyPersistenceImpl

java.lang.Object
  extended by com.liferay.portal.service.persistence.impl.BasePersistenceImpl<Company>
      extended by com.liferay.portal.service.persistence.CompanyPersistenceImpl
All Implemented Interfaces:
SessionFactory, BasePersistence<Company>, CompanyPersistence

public class CompanyPersistenceImpl
extends BasePersistenceImpl<Company>
implements CompanyPersistence

The persistence implementation for the company service.

Caching information and settings can be found in portal.properties

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

Field Summary
static String FINDER_CLASS_NAME_ENTITY
           
static String FINDER_CLASS_NAME_LIST_WITH_PAGINATION
           
static String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION
           
static FinderPath FINDER_PATH_COUNT_ALL
           
static FinderPath FINDER_PATH_COUNT_BY_LOGOID
           
static FinderPath FINDER_PATH_COUNT_BY_MX
           
static FinderPath FINDER_PATH_COUNT_BY_SYSTEM
           
static FinderPath FINDER_PATH_COUNT_BY_WEBID
           
static FinderPath FINDER_PATH_FETCH_BY_LOGOID
           
static FinderPath FINDER_PATH_FETCH_BY_MX
           
static FinderPath FINDER_PATH_FETCH_BY_WEBID
           
static FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL
           
static FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_SYSTEM
           
static FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL
           
static FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_SYSTEM
           
 
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

FINDER_CLASS_NAME_ENTITY

public static final String FINDER_CLASS_NAME_ENTITY

FINDER_CLASS_NAME_LIST_WITH_PAGINATION

public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION

FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION

public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION

FINDER_PATH_WITH_PAGINATION_FIND_ALL

public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL

FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL

public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL

FINDER_PATH_COUNT_ALL

public static final FinderPath FINDER_PATH_COUNT_ALL

FINDER_PATH_FETCH_BY_WEBID

public static final FinderPath FINDER_PATH_FETCH_BY_WEBID

FINDER_PATH_COUNT_BY_WEBID

public static final FinderPath FINDER_PATH_COUNT_BY_WEBID

FINDER_PATH_FETCH_BY_MX

public static final FinderPath FINDER_PATH_FETCH_BY_MX

FINDER_PATH_COUNT_BY_MX

public static final FinderPath FINDER_PATH_COUNT_BY_MX

FINDER_PATH_FETCH_BY_LOGOID

public static final FinderPath FINDER_PATH_FETCH_BY_LOGOID

FINDER_PATH_COUNT_BY_LOGOID

public static final FinderPath FINDER_PATH_COUNT_BY_LOGOID

FINDER_PATH_WITH_PAGINATION_FIND_BY_SYSTEM

public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_SYSTEM

FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_SYSTEM

public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_SYSTEM

FINDER_PATH_COUNT_BY_SYSTEM

public static final FinderPath FINDER_PATH_COUNT_BY_SYSTEM
Constructor Detail

CompanyPersistenceImpl

public CompanyPersistenceImpl()
Method Detail

findByWebId

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

Specified by:
findByWebId in interface CompanyPersistence
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

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

Specified by:
fetchByWebId in interface CompanyPersistence
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

public 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.

Specified by:
fetchByWebId in interface CompanyPersistence
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

removeByWebId

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

Specified by:
removeByWebId in interface CompanyPersistence
Parameters:
webId - the web ID
Returns:
the company that was removed
Throws:
SystemException - if a system exception occurred
NoSuchCompanyException

countByWebId

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

Specified by:
countByWebId in interface CompanyPersistence
Parameters:
webId - the web ID
Returns:
the number of matching companies
Throws:
SystemException - if a system exception occurred

findByMx

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

Specified by:
findByMx in interface CompanyPersistence
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

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

Specified by:
fetchByMx in interface CompanyPersistence
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

public 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.

Specified by:
fetchByMx in interface CompanyPersistence
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

removeByMx

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

Specified by:
removeByMx in interface CompanyPersistence
Parameters:
mx - the mx
Returns:
the company that was removed
Throws:
SystemException - if a system exception occurred
NoSuchCompanyException

countByMx

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

Specified by:
countByMx in interface CompanyPersistence
Parameters:
mx - the mx
Returns:
the number of matching companies
Throws:
SystemException - if a system exception occurred

findByLogoId

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

Specified by:
findByLogoId in interface CompanyPersistence
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

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

Specified by:
fetchByLogoId in interface CompanyPersistence
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

public 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.

Specified by:
fetchByLogoId in interface CompanyPersistence
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

removeByLogoId

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

Specified by:
removeByLogoId in interface CompanyPersistence
Parameters:
logoId - the logo ID
Returns:
the company that was removed
Throws:
SystemException - if a system exception occurred
NoSuchCompanyException

countByLogoId

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

Specified by:
countByLogoId in interface CompanyPersistence
Parameters:
logoId - the logo ID
Returns:
the number of matching companies
Throws:
SystemException - if a system exception occurred

findBySystem

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

Specified by:
findBySystem in interface CompanyPersistence
Parameters:
system - the system
Returns:
the matching companies
Throws:
SystemException - if a system exception occurred

findBySystem

public 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. 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.

Specified by:
findBySystem in interface CompanyPersistence
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

public 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. 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.

Specified by:
findBySystem in interface CompanyPersistence
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

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

Specified by:
findBySystem_First in interface CompanyPersistence
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

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

Specified by:
fetchBySystem_First in interface CompanyPersistence
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

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

Specified by:
findBySystem_Last in interface CompanyPersistence
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

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

Specified by:
fetchBySystem_Last in interface CompanyPersistence
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

public 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 = ?.

Specified by:
findBySystem_PrevAndNext in interface CompanyPersistence
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

getBySystem_PrevAndNext

protected Company getBySystem_PrevAndNext(Session session,
                                          Company company,
                                          boolean system,
                                          OrderByComparator orderByComparator,
                                          boolean previous)

removeBySystem

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

Specified by:
removeBySystem in interface CompanyPersistence
Parameters:
system - the system
Throws:
SystemException - if a system exception occurred

countBySystem

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

Specified by:
countBySystem in interface CompanyPersistence
Parameters:
system - the system
Returns:
the number of matching companies
Throws:
SystemException - if a system exception occurred

cacheResult

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

Specified by:
cacheResult in interface CompanyPersistence
Parameters:
company - the company

cacheResult

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

Specified by:
cacheResult in interface CompanyPersistence
Parameters:
companies - the companies

clearCache

public void clearCache()
Clears the cache for all companies.

The EntityCache and FinderCache are both cleared by this method.

Specified by:
clearCache in interface BasePersistence<Company>
Overrides:
clearCache in class BasePersistenceImpl<Company>

clearCache

public void clearCache(Company company)
Clears the cache for the company.

The EntityCache and FinderCache are both cleared by this method.

Specified by:
clearCache in interface BasePersistence<Company>
Overrides:
clearCache in class BasePersistenceImpl<Company>
Parameters:
company - the instance of this model to clear the cache for

clearCache

public void clearCache(List<Company> companies)
Description copied from interface: BasePersistence
Clears the cache for a List instances of this model.

The EntityCache and FinderCache are both cleared by this method.

Specified by:
clearCache in interface BasePersistence<Company>
Overrides:
clearCache in class BasePersistenceImpl<Company>
Parameters:
companies - the List instances of this model to clear the cache for

cacheUniqueFindersCache

protected void cacheUniqueFindersCache(Company company)

clearUniqueFindersCache

protected void clearUniqueFindersCache(Company company)

create

public Company create(long companyId)
Creates a new company with the primary key. Does not add the company to the database.

Specified by:
create in interface CompanyPersistence
Parameters:
companyId - the primary key for the new company
Returns:
the new company

remove

public Company remove(long companyId)
               throws NoSuchCompanyException,
                      SystemException
Removes the company with the primary key from the database. Also notifies the appropriate model listeners.

Specified by:
remove in interface CompanyPersistence
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

remove

public Company remove(Serializable primaryKey)
               throws NoSuchCompanyException,
                      SystemException
Removes the company with the primary key from the database. Also notifies the appropriate model listeners.

Specified by:
remove in interface BasePersistence<Company>
Overrides:
remove in class BasePersistenceImpl<Company>
Parameters:
primaryKey - 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

removeImpl

protected Company removeImpl(Company company)
                      throws SystemException
Description copied from class: BasePersistenceImpl
Removes the model instance from the database. BasePersistenceImpl.update(BaseModel, boolean) depends on this method to implement the remove operation; it only notifies the model listeners.

Overrides:
removeImpl in class BasePersistenceImpl<Company>
Parameters:
company - the model instance to remove
Returns:
the model instance that was removed
Throws:
SystemException - if a system exception occurred

updateImpl

public Company updateImpl(Company company)
                   throws SystemException
Description copied from class: BasePersistenceImpl
Updates the model instance in the database or adds it if it does not yet exist. BasePersistenceImpl.remove(BaseModel) depends on this method to implement the update operation; it only notifies the model listeners.

Specified by:
updateImpl in interface CompanyPersistence
Overrides:
updateImpl in class BasePersistenceImpl<Company>
Parameters:
company - the model instance to update
Returns:
the model instance that was updated
Throws:
SystemException - if a system exception occurred

toUnwrappedModel

protected Company toUnwrappedModel(Company company)

findByPrimaryKey

public Company findByPrimaryKey(Serializable primaryKey)
                         throws NoSuchCompanyException,
                                SystemException
Returns the company with the primary key or throws a NoSuchModelException if it could not be found.

Specified by:
findByPrimaryKey in interface BasePersistence<Company>
Overrides:
findByPrimaryKey in class BasePersistenceImpl<Company>
Parameters:
primaryKey - 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

findByPrimaryKey

public Company findByPrimaryKey(long companyId)
                         throws NoSuchCompanyException,
                                SystemException
Returns the company with the primary key or throws a NoSuchCompanyException if it could not be found.

Specified by:
findByPrimaryKey in interface CompanyPersistence
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

public Company fetchByPrimaryKey(Serializable primaryKey)
                          throws SystemException
Returns the company with the primary key or returns null if it could not be found.

Specified by:
fetchByPrimaryKey in interface BasePersistence<Company>
Overrides:
fetchByPrimaryKey in class BasePersistenceImpl<Company>
Parameters:
primaryKey - 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

fetchByPrimaryKey

public Company fetchByPrimaryKey(long companyId)
                          throws SystemException
Returns the company with the primary key or returns null if it could not be found.

Specified by:
fetchByPrimaryKey in interface CompanyPersistence
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

findAll

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

Specified by:
findAll in interface CompanyPersistence
Returns:
the companies
Throws:
SystemException - if a system exception occurred

findAll

public 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. 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.

Specified by:
findAll in interface CompanyPersistence
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

public 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. 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.

Specified by:
findAll in interface CompanyPersistence
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

removeAll

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

Specified by:
removeAll in interface CompanyPersistence
Throws:
SystemException - if a system exception occurred

countAll

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

Specified by:
countAll in interface CompanyPersistence
Returns:
the number of companies
Throws:
SystemException - if a system exception occurred

getBadColumnNames

protected Set<String> getBadColumnNames()
Overrides:
getBadColumnNames in class BasePersistenceImpl<Company>

afterPropertiesSet

public void afterPropertiesSet()
Initializes the company persistence.


destroy

public void destroy()

Liferay 6.2-ce-ga5