001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.model.VirtualHost;
018    
019    /**
020     * The persistence interface for the virtual host service.
021     *
022     * <p>
023     * Caching information and settings can be found in <code>portal.properties</code>
024     * </p>
025     *
026     * @author Brian Wing Shun Chan
027     * @see VirtualHostPersistenceImpl
028     * @see VirtualHostUtil
029     * @generated
030     */
031    public interface VirtualHostPersistence extends BasePersistence<VirtualHost> {
032            /*
033             * NOTE FOR DEVELOPERS:
034             *
035             * Never modify or reference this interface directly. Always use {@link VirtualHostUtil} to access the virtual host persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
036             */
037    
038            /**
039            * Caches the virtual host in the entity cache if it is enabled.
040            *
041            * @param virtualHost the virtual host
042            */
043            public void cacheResult(com.liferay.portal.model.VirtualHost virtualHost);
044    
045            /**
046            * Caches the virtual hosts in the entity cache if it is enabled.
047            *
048            * @param virtualHosts the virtual hosts
049            */
050            public void cacheResult(
051                    java.util.List<com.liferay.portal.model.VirtualHost> virtualHosts);
052    
053            /**
054            * Creates a new virtual host with the primary key. Does not add the virtual host to the database.
055            *
056            * @param virtualHostId the primary key for the new virtual host
057            * @return the new virtual host
058            */
059            public com.liferay.portal.model.VirtualHost create(long virtualHostId);
060    
061            /**
062            * Removes the virtual host with the primary key from the database. Also notifies the appropriate model listeners.
063            *
064            * @param virtualHostId the primary key of the virtual host
065            * @return the virtual host that was removed
066            * @throws com.liferay.portal.NoSuchVirtualHostException if a virtual host with the primary key could not be found
067            * @throws SystemException if a system exception occurred
068            */
069            public com.liferay.portal.model.VirtualHost remove(long virtualHostId)
070                    throws com.liferay.portal.NoSuchVirtualHostException,
071                            com.liferay.portal.kernel.exception.SystemException;
072    
073            public com.liferay.portal.model.VirtualHost updateImpl(
074                    com.liferay.portal.model.VirtualHost virtualHost, boolean merge)
075                    throws com.liferay.portal.kernel.exception.SystemException;
076    
077            /**
078            * Returns the virtual host with the primary key or throws a {@link com.liferay.portal.NoSuchVirtualHostException} if it could not be found.
079            *
080            * @param virtualHostId the primary key of the virtual host
081            * @return the virtual host
082            * @throws com.liferay.portal.NoSuchVirtualHostException if a virtual host with the primary key could not be found
083            * @throws SystemException if a system exception occurred
084            */
085            public com.liferay.portal.model.VirtualHost findByPrimaryKey(
086                    long virtualHostId)
087                    throws com.liferay.portal.NoSuchVirtualHostException,
088                            com.liferay.portal.kernel.exception.SystemException;
089    
090            /**
091            * Returns the virtual host with the primary key or returns <code>null</code> if it could not be found.
092            *
093            * @param virtualHostId the primary key of the virtual host
094            * @return the virtual host, or <code>null</code> if a virtual host with the primary key could not be found
095            * @throws SystemException if a system exception occurred
096            */
097            public com.liferay.portal.model.VirtualHost fetchByPrimaryKey(
098                    long virtualHostId)
099                    throws com.liferay.portal.kernel.exception.SystemException;
100    
101            /**
102            * Returns the virtual host where hostname = &#63; or throws a {@link com.liferay.portal.NoSuchVirtualHostException} if it could not be found.
103            *
104            * @param hostname the hostname
105            * @return the matching virtual host
106            * @throws com.liferay.portal.NoSuchVirtualHostException if a matching virtual host could not be found
107            * @throws SystemException if a system exception occurred
108            */
109            public com.liferay.portal.model.VirtualHost findByHostname(
110                    java.lang.String hostname)
111                    throws com.liferay.portal.NoSuchVirtualHostException,
112                            com.liferay.portal.kernel.exception.SystemException;
113    
114            /**
115            * Returns the virtual host where hostname = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
116            *
117            * @param hostname the hostname
118            * @return the matching virtual host, or <code>null</code> if a matching virtual host could not be found
119            * @throws SystemException if a system exception occurred
120            */
121            public com.liferay.portal.model.VirtualHost fetchByHostname(
122                    java.lang.String hostname)
123                    throws com.liferay.portal.kernel.exception.SystemException;
124    
125            /**
126            * Returns the virtual host where hostname = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
127            *
128            * @param hostname the hostname
129            * @param retrieveFromCache whether to use the finder cache
130            * @return the matching virtual host, or <code>null</code> if a matching virtual host could not be found
131            * @throws SystemException if a system exception occurred
132            */
133            public com.liferay.portal.model.VirtualHost fetchByHostname(
134                    java.lang.String hostname, boolean retrieveFromCache)
135                    throws com.liferay.portal.kernel.exception.SystemException;
136    
137            /**
138            * Returns the virtual host where companyId = &#63; and layoutSetId = &#63; or throws a {@link com.liferay.portal.NoSuchVirtualHostException} if it could not be found.
139            *
140            * @param companyId the company ID
141            * @param layoutSetId the layout set ID
142            * @return the matching virtual host
143            * @throws com.liferay.portal.NoSuchVirtualHostException if a matching virtual host could not be found
144            * @throws SystemException if a system exception occurred
145            */
146            public com.liferay.portal.model.VirtualHost findByC_L(long companyId,
147                    long layoutSetId)
148                    throws com.liferay.portal.NoSuchVirtualHostException,
149                            com.liferay.portal.kernel.exception.SystemException;
150    
151            /**
152            * Returns the virtual host where companyId = &#63; and layoutSetId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
153            *
154            * @param companyId the company ID
155            * @param layoutSetId the layout set ID
156            * @return the matching virtual host, or <code>null</code> if a matching virtual host could not be found
157            * @throws SystemException if a system exception occurred
158            */
159            public com.liferay.portal.model.VirtualHost fetchByC_L(long companyId,
160                    long layoutSetId)
161                    throws com.liferay.portal.kernel.exception.SystemException;
162    
163            /**
164            * Returns the virtual host where companyId = &#63; and layoutSetId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
165            *
166            * @param companyId the company ID
167            * @param layoutSetId the layout set ID
168            * @param retrieveFromCache whether to use the finder cache
169            * @return the matching virtual host, or <code>null</code> if a matching virtual host could not be found
170            * @throws SystemException if a system exception occurred
171            */
172            public com.liferay.portal.model.VirtualHost fetchByC_L(long companyId,
173                    long layoutSetId, boolean retrieveFromCache)
174                    throws com.liferay.portal.kernel.exception.SystemException;
175    
176            /**
177            * Returns all the virtual hosts.
178            *
179            * @return the virtual hosts
180            * @throws SystemException if a system exception occurred
181            */
182            public java.util.List<com.liferay.portal.model.VirtualHost> findAll()
183                    throws com.liferay.portal.kernel.exception.SystemException;
184    
185            /**
186            * Returns a range of all the virtual hosts.
187            *
188            * <p>
189            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
190            * </p>
191            *
192            * @param start the lower bound of the range of virtual hosts
193            * @param end the upper bound of the range of virtual hosts (not inclusive)
194            * @return the range of virtual hosts
195            * @throws SystemException if a system exception occurred
196            */
197            public java.util.List<com.liferay.portal.model.VirtualHost> findAll(
198                    int start, int end)
199                    throws com.liferay.portal.kernel.exception.SystemException;
200    
201            /**
202            * Returns an ordered range of all the virtual hosts.
203            *
204            * <p>
205            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
206            * </p>
207            *
208            * @param start the lower bound of the range of virtual hosts
209            * @param end the upper bound of the range of virtual hosts (not inclusive)
210            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
211            * @return the ordered range of virtual hosts
212            * @throws SystemException if a system exception occurred
213            */
214            public java.util.List<com.liferay.portal.model.VirtualHost> findAll(
215                    int start, int end,
216                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
217                    throws com.liferay.portal.kernel.exception.SystemException;
218    
219            /**
220            * Removes the virtual host where hostname = &#63; from the database.
221            *
222            * @param hostname the hostname
223            * @throws SystemException if a system exception occurred
224            */
225            public void removeByHostname(java.lang.String hostname)
226                    throws com.liferay.portal.NoSuchVirtualHostException,
227                            com.liferay.portal.kernel.exception.SystemException;
228    
229            /**
230            * Removes the virtual host where companyId = &#63; and layoutSetId = &#63; from the database.
231            *
232            * @param companyId the company ID
233            * @param layoutSetId the layout set ID
234            * @throws SystemException if a system exception occurred
235            */
236            public void removeByC_L(long companyId, long layoutSetId)
237                    throws com.liferay.portal.NoSuchVirtualHostException,
238                            com.liferay.portal.kernel.exception.SystemException;
239    
240            /**
241            * Removes all the virtual hosts from the database.
242            *
243            * @throws SystemException if a system exception occurred
244            */
245            public void removeAll()
246                    throws com.liferay.portal.kernel.exception.SystemException;
247    
248            /**
249            * Returns the number of virtual hosts where hostname = &#63;.
250            *
251            * @param hostname the hostname
252            * @return the number of matching virtual hosts
253            * @throws SystemException if a system exception occurred
254            */
255            public int countByHostname(java.lang.String hostname)
256                    throws com.liferay.portal.kernel.exception.SystemException;
257    
258            /**
259            * Returns the number of virtual hosts where companyId = &#63; and layoutSetId = &#63;.
260            *
261            * @param companyId the company ID
262            * @param layoutSetId the layout set ID
263            * @return the number of matching virtual hosts
264            * @throws SystemException if a system exception occurred
265            */
266            public int countByC_L(long companyId, long layoutSetId)
267                    throws com.liferay.portal.kernel.exception.SystemException;
268    
269            /**
270            * Returns the number of virtual hosts.
271            *
272            * @return the number of virtual hosts
273            * @throws SystemException if a system exception occurred
274            */
275            public int countAll()
276                    throws com.liferay.portal.kernel.exception.SystemException;
277    }