Liferay 6.1.2-ce-ga3

com.liferay.portal.service.persistence
Interface VirtualHostPersistence

All Superinterfaces:
BasePersistence<VirtualHost>
All Known Implementing Classes:
VirtualHostPersistenceImpl

public interface VirtualHostPersistence
extends BasePersistence<VirtualHost>

The persistence interface for the virtual host service.

Caching information and settings can be found in portal.properties

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

Method Summary
 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.
 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.
 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.
 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 remove(long virtualHostId)
          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.
 VirtualHost updateImpl(VirtualHost virtualHost, 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(VirtualHost virtualHost)
Caches the virtual host in the entity cache if it is enabled.

Parameters:
virtualHost - the virtual host

cacheResult

void cacheResult(List<VirtualHost> virtualHosts)
Caches the virtual hosts in the entity cache if it is enabled.

Parameters:
virtualHosts - the virtual hosts

create

VirtualHost create(long virtualHostId)
Creates a new virtual host with the primary key. Does not add the virtual host to the database.

Parameters:
virtualHostId - the primary key for the new virtual host
Returns:
the new virtual host

remove

VirtualHost remove(long virtualHostId)
                   throws NoSuchVirtualHostException,
                          SystemException
Removes the virtual host with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
virtualHostId - the primary key of the virtual host
Returns:
the virtual host that was removed
Throws:
NoSuchVirtualHostException - if a virtual host with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

VirtualHost updateImpl(VirtualHost virtualHost,
                       boolean merge)
                       throws SystemException
Throws:
SystemException

findByPrimaryKey

VirtualHost findByPrimaryKey(long virtualHostId)
                             throws NoSuchVirtualHostException,
                                    SystemException
Returns the virtual host with the primary key or throws a NoSuchVirtualHostException if it could not be found.

Parameters:
virtualHostId - the primary key of the virtual host
Returns:
the virtual host
Throws:
NoSuchVirtualHostException - if a virtual host with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

VirtualHost fetchByPrimaryKey(long virtualHostId)
                              throws SystemException
Returns the virtual host with the primary key or returns null if it could not be found.

Parameters:
virtualHostId - the primary key of the virtual host
Returns:
the virtual host, or null if a virtual host with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findByHostname

VirtualHost findByHostname(String hostname)
                           throws NoSuchVirtualHostException,
                                  SystemException
Returns the virtual host where hostname = ? or throws a NoSuchVirtualHostException if it could not be found.

Parameters:
hostname - the hostname
Returns:
the matching virtual host
Throws:
NoSuchVirtualHostException - if a matching virtual host could not be found
SystemException - if a system exception occurred

fetchByHostname

VirtualHost fetchByHostname(String hostname)
                            throws SystemException
Returns the virtual host where hostname = ? or returns null if it could not be found. Uses the finder cache.

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

fetchByHostname

VirtualHost fetchByHostname(String hostname,
                            boolean retrieveFromCache)
                            throws SystemException
Returns the virtual host where hostname = ? or returns null if it could not be found, optionally using the finder cache.

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

findByC_L

VirtualHost findByC_L(long companyId,
                      long layoutSetId)
                      throws NoSuchVirtualHostException,
                             SystemException
Returns the virtual host where companyId = ? and layoutSetId = ? or throws a NoSuchVirtualHostException if it could not be found.

Parameters:
companyId - the company ID
layoutSetId - the layout set ID
Returns:
the matching virtual host
Throws:
NoSuchVirtualHostException - if a matching virtual host could not be found
SystemException - if a system exception occurred

fetchByC_L

VirtualHost fetchByC_L(long companyId,
                       long layoutSetId)
                       throws SystemException
Returns the virtual host where companyId = ? and layoutSetId = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
companyId - the company ID
layoutSetId - the layout set ID
Returns:
the matching virtual host, or null if a matching virtual host could not be found
Throws:
SystemException - if a system exception occurred

fetchByC_L

VirtualHost fetchByC_L(long companyId,
                       long layoutSetId,
                       boolean retrieveFromCache)
                       throws SystemException
Returns the virtual host where companyId = ? and layoutSetId = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
companyId - the company ID
layoutSetId - the layout set ID
retrieveFromCache - whether to use the finder cache
Returns:
the matching virtual host, or null if a matching virtual host could not be found
Throws:
SystemException - if a system exception occurred

findAll

List<VirtualHost> findAll()
                          throws SystemException
Returns all the virtual hosts.

Returns:
the virtual hosts
Throws:
SystemException - if a system exception occurred

findAll

List<VirtualHost> findAll(int start,
                          int end)
                          throws SystemException
Returns a range of all the virtual hosts.

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 virtual hosts
end - the upper bound of the range of virtual hosts (not inclusive)
Returns:
the range of virtual hosts
Throws:
SystemException - if a system exception occurred

findAll

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

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 virtual hosts
end - the upper bound of the range of virtual hosts (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of virtual hosts
Throws:
SystemException - if a system exception occurred

removeByHostname

VirtualHost removeByHostname(String hostname)
                             throws NoSuchVirtualHostException,
                                    SystemException
Removes the virtual host where hostname = ? from the database.

Parameters:
hostname - the hostname
Returns:
the virtual host that was removed
Throws:
SystemException - if a system exception occurred
NoSuchVirtualHostException

removeByC_L

VirtualHost removeByC_L(long companyId,
                        long layoutSetId)
                        throws NoSuchVirtualHostException,
                               SystemException
Removes the virtual host where companyId = ? and layoutSetId = ? from the database.

Parameters:
companyId - the company ID
layoutSetId - the layout set ID
Returns:
the virtual host that was removed
Throws:
SystemException - if a system exception occurred
NoSuchVirtualHostException

removeAll

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

Throws:
SystemException - if a system exception occurred

countByHostname

int countByHostname(String hostname)
                    throws SystemException
Returns the number of virtual hosts where hostname = ?.

Parameters:
hostname - the hostname
Returns:
the number of matching virtual hosts
Throws:
SystemException - if a system exception occurred

countByC_L

int countByC_L(long companyId,
               long layoutSetId)
               throws SystemException
Returns the number of virtual hosts where companyId = ? and layoutSetId = ?.

Parameters:
companyId - the company ID
layoutSetId - the layout set ID
Returns:
the number of matching virtual hosts
Throws:
SystemException - if a system exception occurred

countAll

int countAll()
             throws SystemException
Returns the number of virtual hosts.

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

Liferay 6.1.2-ce-ga3