|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portal.service.persistence.impl.BasePersistenceImpl<VirtualHost>
com.liferay.portal.service.persistence.impl.VirtualHostPersistenceImpl
@ProviderType public class VirtualHostPersistenceImpl
The persistence implementation for the virtual host service.
Caching information and settings can be found in portal.properties
VirtualHostPersistence,
VirtualHostUtil| Field Summary | |
|---|---|
protected CompanyProvider |
companyProvider
|
protected EntityCache |
entityCache
|
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_C_L
|
static FinderPath |
FINDER_PATH_COUNT_BY_HOSTNAME
|
static FinderPath |
FINDER_PATH_FETCH_BY_C_L
|
static FinderPath |
FINDER_PATH_FETCH_BY_HOSTNAME
|
static FinderPath |
FINDER_PATH_WITH_PAGINATION_FIND_ALL
|
static FinderPath |
FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL
|
protected FinderCache |
finderCache
|
| Fields inherited from class com.liferay.portal.service.persistence.impl.BasePersistenceImpl |
|---|
CAST_CLOB_TEXT_OPEN, COUNT_COLUMN_NAME, FINDER_ARGS_EMPTY, listeners, NULL_SAFE_STRING_COMPARATOR, 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 | |
|---|---|
VirtualHostPersistenceImpl()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
Initializes the virtual host persistence. |
void |
cacheResult(List<VirtualHost> virtualHosts)
Caches the virtual hosts in the entity cache if it is enabled. |
void |
cacheResult(VirtualHost virtualHost)
Caches the virtual host in the entity cache if it is enabled. |
protected void |
cacheUniqueFindersCache(VirtualHostModelImpl virtualHostModelImpl,
boolean isNew)
|
void |
clearCache()
Clears the cache for all virtual hosts. |
void |
clearCache(List<VirtualHost> virtualHosts)
Clears the cache for a List instances of this model. |
void |
clearCache(VirtualHost virtualHost)
Clears the cache for the virtual host. |
protected void |
clearUniqueFindersCache(VirtualHostModelImpl virtualHostModelImpl)
|
int |
countAll()
Returns the number of virtual hosts. |
int |
countByC_L(long companyId,
long layoutSetId)
Returns the number of virtual hosts where companyId = ? and layoutSetId = ?. |
int |
countByHostname(String hostname)
Returns the number of virtual hosts where hostname = ?. |
VirtualHost |
create(long virtualHostId)
Creates a new virtual host with the primary key. |
void |
destroy()
|
VirtualHost |
fetchByC_L(long companyId,
long layoutSetId)
Returns the virtual host where companyId = ? and layoutSetId = ? or returns null if it could not be found. |
VirtualHost |
fetchByC_L(long companyId,
long layoutSetId,
boolean retrieveFromCache)
Returns the virtual host where companyId = ? and layoutSetId = ? or returns null if it could not be found, optionally using the finder cache. |
VirtualHost |
fetchByHostname(String hostname)
Returns the virtual host where hostname = ? or returns null if it could not be found. |
VirtualHost |
fetchByHostname(String hostname,
boolean retrieveFromCache)
Returns the virtual host where hostname = ? or returns null if it could not be found, optionally using the finder cache. |
VirtualHost |
fetchByPrimaryKey(long virtualHostId)
Returns the virtual host with the primary key or returns null if it could not be found. |
VirtualHost |
fetchByPrimaryKey(Serializable primaryKey)
Returns the virtual host with the primary key or returns null if it could not be found. |
Map<Serializable,VirtualHost> |
fetchByPrimaryKeys(Set<Serializable> primaryKeys)
|
List<VirtualHost> |
findAll()
Returns all the virtual hosts. |
List<VirtualHost> |
findAll(int start,
int end)
Returns a range of all the virtual hosts. |
List<VirtualHost> |
findAll(int start,
int end,
OrderByComparator<VirtualHost> orderByComparator)
Returns an ordered range of all the virtual hosts. |
List<VirtualHost> |
findAll(int start,
int end,
OrderByComparator<VirtualHost> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the virtual hosts. |
VirtualHost |
findByC_L(long companyId,
long layoutSetId)
Returns the virtual host where companyId = ? and layoutSetId = ? or throws a NoSuchVirtualHostException if it could not be found. |
VirtualHost |
findByHostname(String hostname)
Returns the virtual host where hostname = ? or throws a NoSuchVirtualHostException if it could not be found. |
VirtualHost |
findByPrimaryKey(long virtualHostId)
Returns the virtual host with the primary key or throws a NoSuchVirtualHostException if it could not be found. |
VirtualHost |
findByPrimaryKey(Serializable primaryKey)
Returns the virtual host with the primary key or throws a NoSuchModelException if it could not be found. |
protected Map<String,Integer> |
getTableColumnsMap()
|
VirtualHost |
remove(long virtualHostId)
Removes the virtual host with the primary key from the database. |
VirtualHost |
remove(Serializable primaryKey)
Removes the virtual host with the primary key from the database. |
void |
removeAll()
Removes all the virtual hosts from the database. |
VirtualHost |
removeByC_L(long companyId,
long layoutSetId)
Removes the virtual host where companyId = ? and layoutSetId = ? from the database. |
VirtualHost |
removeByHostname(String hostname)
Removes the virtual host where hostname = ? from the database. |
protected VirtualHost |
removeImpl(VirtualHost virtualHost)
Removes the model instance from the database. |
protected VirtualHost |
toUnwrappedModel(VirtualHost virtualHost)
|
VirtualHost |
updateImpl(VirtualHost virtualHost)
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, getBadColumnNames, getClassLoader, getColumnName, 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, getBadColumnNames, 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_HOSTNAME
public static final FinderPath FINDER_PATH_COUNT_BY_HOSTNAME
public static final FinderPath FINDER_PATH_FETCH_BY_C_L
public static final FinderPath FINDER_PATH_COUNT_BY_C_L
@BeanReference(type=CompanyProviderWrapper.class) protected CompanyProvider companyProvider
protected EntityCache entityCache
protected FinderCache finderCache
| Constructor Detail |
|---|
public VirtualHostPersistenceImpl()
| Method Detail |
|---|
public VirtualHost findByHostname(String hostname)
throws NoSuchVirtualHostException
NoSuchVirtualHostException if it could not be found.
findByHostname in interface VirtualHostPersistencehostname - the hostname
NoSuchVirtualHostException - if a matching virtual host could not be foundpublic VirtualHost fetchByHostname(String hostname)
null if it could not be found. Uses the finder cache.
fetchByHostname in interface VirtualHostPersistencehostname - the hostname
null if a matching virtual host could not be found
public VirtualHost fetchByHostname(String hostname,
boolean retrieveFromCache)
null if it could not be found, optionally using the finder cache.
fetchByHostname in interface VirtualHostPersistencehostname - the hostnameretrieveFromCache - whether to retrieve from the finder cache
null if a matching virtual host could not be found
public VirtualHost removeByHostname(String hostname)
throws NoSuchVirtualHostException
removeByHostname in interface VirtualHostPersistencehostname - the hostname
NoSuchVirtualHostExceptionpublic int countByHostname(String hostname)
countByHostname in interface VirtualHostPersistencehostname - the hostname
public VirtualHost findByC_L(long companyId,
long layoutSetId)
throws NoSuchVirtualHostException
NoSuchVirtualHostException if it could not be found.
findByC_L in interface VirtualHostPersistencecompanyId - the company IDlayoutSetId - the layout set ID
NoSuchVirtualHostException - if a matching virtual host could not be found
public VirtualHost fetchByC_L(long companyId,
long layoutSetId)
null if it could not be found. Uses the finder cache.
fetchByC_L in interface VirtualHostPersistencecompanyId - the company IDlayoutSetId - the layout set ID
null if a matching virtual host could not be found
public VirtualHost fetchByC_L(long companyId,
long layoutSetId,
boolean retrieveFromCache)
null if it could not be found, optionally using the finder cache.
fetchByC_L in interface VirtualHostPersistencecompanyId - the company IDlayoutSetId - the layout set IDretrieveFromCache - whether to retrieve from the finder cache
null if a matching virtual host could not be found
public VirtualHost removeByC_L(long companyId,
long layoutSetId)
throws NoSuchVirtualHostException
removeByC_L in interface VirtualHostPersistencecompanyId - the company IDlayoutSetId - the layout set ID
NoSuchVirtualHostException
public int countByC_L(long companyId,
long layoutSetId)
countByC_L in interface VirtualHostPersistencecompanyId - the company IDlayoutSetId - the layout set ID
public void cacheResult(VirtualHost virtualHost)
cacheResult in interface VirtualHostPersistencevirtualHost - the virtual hostpublic void cacheResult(List<VirtualHost> virtualHosts)
cacheResult in interface VirtualHostPersistencevirtualHosts - the virtual hostspublic void clearCache()
The EntityCache and FinderCache are both cleared by this method.
clearCache in interface BasePersistence<VirtualHost>clearCache in class BasePersistenceImpl<VirtualHost>public void clearCache(VirtualHost virtualHost)
The EntityCache and FinderCache are both cleared by this method.
clearCache in interface BasePersistence<VirtualHost>clearCache in class BasePersistenceImpl<VirtualHost>virtualHost - the instance of this model to clear the cache forpublic void clearCache(List<VirtualHost> virtualHosts)
BasePersistence
The EntityCache and FinderCache are both cleared by this
method.
clearCache in interface BasePersistence<VirtualHost>clearCache in class BasePersistenceImpl<VirtualHost>virtualHosts - the List instances of this model to clear the cache for
protected void cacheUniqueFindersCache(VirtualHostModelImpl virtualHostModelImpl,
boolean isNew)
protected void clearUniqueFindersCache(VirtualHostModelImpl virtualHostModelImpl)
public VirtualHost create(long virtualHostId)
create in interface VirtualHostPersistencevirtualHostId - the primary key for the new virtual host
public VirtualHost remove(long virtualHostId)
throws NoSuchVirtualHostException
remove in interface VirtualHostPersistencevirtualHostId - the primary key of the virtual host
NoSuchVirtualHostException - if a virtual host with the primary key could not be found
public VirtualHost remove(Serializable primaryKey)
throws NoSuchVirtualHostException
remove in interface BasePersistence<VirtualHost>remove in class BasePersistenceImpl<VirtualHost>primaryKey - the primary key of the virtual host
NoSuchVirtualHostException - if a virtual host with the primary key could not be foundprotected VirtualHost removeImpl(VirtualHost virtualHost)
BasePersistenceImplBasePersistenceImpl.update(BaseModel,
boolean) depends on this method to implement the remove operation; it
only notifies the model listeners.
removeImpl in class BasePersistenceImpl<VirtualHost>virtualHost - the model instance to remove
public VirtualHost updateImpl(VirtualHost virtualHost)
BasePersistenceImplBasePersistenceImpl.remove(BaseModel) depends on this method to implement the
update operation; it only notifies the model listeners.
updateImpl in interface VirtualHostPersistenceupdateImpl in class BasePersistenceImpl<VirtualHost>virtualHost - the model instance to update
protected VirtualHost toUnwrappedModel(VirtualHost virtualHost)
public VirtualHost findByPrimaryKey(Serializable primaryKey)
throws NoSuchVirtualHostException
NoSuchModelException if it could not be found.
findByPrimaryKey in interface BasePersistence<VirtualHost>findByPrimaryKey in class BasePersistenceImpl<VirtualHost>primaryKey - the primary key of the virtual host
NoSuchVirtualHostException - if a virtual host with the primary key could not be found
public VirtualHost findByPrimaryKey(long virtualHostId)
throws NoSuchVirtualHostException
NoSuchVirtualHostException if it could not be found.
findByPrimaryKey in interface VirtualHostPersistencevirtualHostId - the primary key of the virtual host
NoSuchVirtualHostException - if a virtual host with the primary key could not be foundpublic VirtualHost fetchByPrimaryKey(Serializable primaryKey)
null if it could not be found.
fetchByPrimaryKey in interface BasePersistence<VirtualHost>fetchByPrimaryKey in class BasePersistenceImpl<VirtualHost>primaryKey - the primary key of the virtual host
null if a virtual host with the primary key could not be foundpublic VirtualHost fetchByPrimaryKey(long virtualHostId)
null if it could not be found.
fetchByPrimaryKey in interface VirtualHostPersistencevirtualHostId - the primary key of the virtual host
null if a virtual host with the primary key could not be foundpublic Map<Serializable,VirtualHost> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
fetchByPrimaryKeys in interface BasePersistence<VirtualHost>fetchByPrimaryKeys in interface VirtualHostPersistencefetchByPrimaryKeys in class BasePersistenceImpl<VirtualHost>public List<VirtualHost> findAll()
findAll in interface VirtualHostPersistence
public List<VirtualHost> findAll(int start,
int end)
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from VirtualHostModelImpl. 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 VirtualHostPersistencestart - the lower bound of the range of virtual hostsend - the upper bound of the range of virtual hosts (not inclusive)
public List<VirtualHost> findAll(int start,
int end,
OrderByComparator<VirtualHost> orderByComparator)
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from VirtualHostModelImpl. 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 VirtualHostPersistencestart - the lower bound of the range of virtual hostsend - the upper bound of the range of virtual hosts (not inclusive)orderByComparator - the comparator to order the results by (optionally null)
public List<VirtualHost> findAll(int start,
int end,
OrderByComparator<VirtualHost> orderByComparator,
boolean retrieveFromCache)
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from VirtualHostModelImpl. 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 VirtualHostPersistencestart - the lower bound of the range of virtual hostsend - the upper bound of the range of virtual hosts (not inclusive)orderByComparator - the comparator to order the results by (optionally null)retrieveFromCache - whether to retrieve from the finder cache
public void removeAll()
removeAll in interface VirtualHostPersistencepublic int countAll()
countAll in interface VirtualHostPersistenceprotected Map<String,Integer> getTableColumnsMap()
getTableColumnsMap in class BasePersistenceImpl<VirtualHost>public void afterPropertiesSet()
public void destroy()
|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||