|
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<VirtualHost> com.liferay.portal.service.persistence.VirtualHostPersistenceImpl
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 | |
---|---|
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
|
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 | |
---|---|
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(VirtualHost virtualHost)
|
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(VirtualHost virtualHost)
|
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. |
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 orderByComparator)
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. |
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, 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_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
Constructor Detail |
---|
public VirtualHostPersistenceImpl()
Method Detail |
---|
public VirtualHost findByHostname(String hostname) throws NoSuchVirtualHostException, SystemException
NoSuchVirtualHostException
if it could not be found.
findByHostname
in interface VirtualHostPersistence
hostname
- the hostname
NoSuchVirtualHostException
- if a matching virtual host could not be found
SystemException
- if a system exception occurredpublic VirtualHost fetchByHostname(String hostname) throws SystemException
null
if it could not be found. Uses the finder cache.
fetchByHostname
in interface VirtualHostPersistence
hostname
- the hostname
null
if a matching virtual host could not be found
SystemException
- if a system exception occurredpublic VirtualHost fetchByHostname(String hostname, boolean retrieveFromCache) throws SystemException
null
if it could not be found, optionally using the finder cache.
fetchByHostname
in interface VirtualHostPersistence
hostname
- the hostnameretrieveFromCache
- whether to use the finder cache
null
if a matching virtual host could not be found
SystemException
- if a system exception occurredpublic VirtualHost removeByHostname(String hostname) throws NoSuchVirtualHostException, SystemException
removeByHostname
in interface VirtualHostPersistence
hostname
- the hostname
SystemException
- if a system exception occurred
NoSuchVirtualHostException
public int countByHostname(String hostname) throws SystemException
countByHostname
in interface VirtualHostPersistence
hostname
- the hostname
SystemException
- if a system exception occurredpublic VirtualHost findByC_L(long companyId, long layoutSetId) throws NoSuchVirtualHostException, SystemException
NoSuchVirtualHostException
if it could not be found.
findByC_L
in interface VirtualHostPersistence
companyId
- the company IDlayoutSetId
- the layout set ID
NoSuchVirtualHostException
- if a matching virtual host could not be found
SystemException
- if a system exception occurredpublic VirtualHost fetchByC_L(long companyId, long layoutSetId) throws SystemException
null
if it could not be found. Uses the finder cache.
fetchByC_L
in interface VirtualHostPersistence
companyId
- the company IDlayoutSetId
- the layout set ID
null
if a matching virtual host could not be found
SystemException
- if a system exception occurredpublic VirtualHost fetchByC_L(long companyId, long layoutSetId, boolean retrieveFromCache) throws SystemException
null
if it could not be found, optionally using the finder cache.
fetchByC_L
in interface VirtualHostPersistence
companyId
- the company IDlayoutSetId
- the layout set IDretrieveFromCache
- whether to use the finder cache
null
if a matching virtual host could not be found
SystemException
- if a system exception occurredpublic VirtualHost removeByC_L(long companyId, long layoutSetId) throws NoSuchVirtualHostException, SystemException
removeByC_L
in interface VirtualHostPersistence
companyId
- the company IDlayoutSetId
- the layout set ID
SystemException
- if a system exception occurred
NoSuchVirtualHostException
public int countByC_L(long companyId, long layoutSetId) throws SystemException
countByC_L
in interface VirtualHostPersistence
companyId
- the company IDlayoutSetId
- the layout set ID
SystemException
- if a system exception occurredpublic void cacheResult(VirtualHost virtualHost)
cacheResult
in interface VirtualHostPersistence
virtualHost
- the virtual hostpublic void cacheResult(List<VirtualHost> virtualHosts)
cacheResult
in interface VirtualHostPersistence
virtualHosts
- 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 forprotected void cacheUniqueFindersCache(VirtualHost virtualHost)
protected void clearUniqueFindersCache(VirtualHost virtualHost)
public VirtualHost create(long virtualHostId)
create
in interface VirtualHostPersistence
virtualHostId
- the primary key for the new virtual host
public VirtualHost remove(long virtualHostId) throws NoSuchVirtualHostException, SystemException
remove
in interface VirtualHostPersistence
virtualHostId
- the primary key of the virtual host
NoSuchVirtualHostException
- if a virtual host with the primary key could not be found
SystemException
- if a system exception occurredpublic VirtualHost remove(Serializable primaryKey) throws NoSuchVirtualHostException, SystemException
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 found
SystemException
- if a system exception occurredprotected VirtualHost removeImpl(VirtualHost virtualHost) 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<VirtualHost>
virtualHost
- the model instance to remove
SystemException
- if a system exception occurredpublic VirtualHost updateImpl(VirtualHost virtualHost) throws SystemException
BasePersistenceImpl
BasePersistenceImpl.remove(BaseModel)
depends on this method to implement the
update operation; it only notifies the model listeners.
updateImpl
in interface VirtualHostPersistence
updateImpl
in class BasePersistenceImpl<VirtualHost>
virtualHost
- the model instance to update
SystemException
- if a system exception occurredprotected VirtualHost toUnwrappedModel(VirtualHost virtualHost)
public VirtualHost findByPrimaryKey(Serializable primaryKey) throws NoSuchVirtualHostException, SystemException
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
SystemException
- if a system exception occurredpublic VirtualHost findByPrimaryKey(long virtualHostId) throws NoSuchVirtualHostException, SystemException
NoSuchVirtualHostException
if it could not be found.
findByPrimaryKey
in interface VirtualHostPersistence
virtualHostId
- the primary key of the virtual host
NoSuchVirtualHostException
- if a virtual host with the primary key could not be found
SystemException
- if a system exception occurredpublic VirtualHost fetchByPrimaryKey(Serializable primaryKey) throws SystemException
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 found
SystemException
- if a system exception occurredpublic VirtualHost fetchByPrimaryKey(long virtualHostId) throws SystemException
null
if it could not be found.
fetchByPrimaryKey
in interface VirtualHostPersistence
virtualHostId
- the primary key of the virtual host
null
if a virtual host with the primary key could not be found
SystemException
- if a system exception occurredpublic List<VirtualHost> findAll() throws SystemException
findAll
in interface VirtualHostPersistence
SystemException
- if a system exception occurredpublic List<VirtualHost> 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 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 VirtualHostPersistence
start
- the lower bound of the range of virtual hostsend
- the upper bound of the range of virtual hosts (not inclusive)
SystemException
- if a system exception occurredpublic List<VirtualHost> 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 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 VirtualHostPersistence
start
- 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
)
SystemException
- if a system exception occurredpublic void removeAll() throws SystemException
removeAll
in interface VirtualHostPersistence
SystemException
- if a system exception occurredpublic int countAll() throws SystemException
countAll
in interface VirtualHostPersistence
SystemException
- if a system exception occurredpublic 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 |