001    /**
002     * Copyright (c) 2000-2011 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.kernel.exception.SystemException;
018    import com.liferay.portal.model.VirtualHost;
019    
020    /**
021     * The persistence interface for the virtual host service.
022     *
023     * <p>
024     * Caching information and settings can be found in <code>portal.properties</code>
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see VirtualHostPersistenceImpl
029     * @see VirtualHostUtil
030     * @generated
031     */
032    public interface VirtualHostPersistence extends BasePersistence<VirtualHost> {
033            /*
034             * NOTE FOR DEVELOPERS:
035             *
036             * 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.
037             */
038    
039            /**
040            * Caches the virtual host in the entity cache if it is enabled.
041            *
042            * @param virtualHost the virtual host
043            */
044            public void cacheResult(com.liferay.portal.model.VirtualHost virtualHost);
045    
046            /**
047            * Caches the virtual hosts in the entity cache if it is enabled.
048            *
049            * @param virtualHosts the virtual hosts
050            */
051            public void cacheResult(
052                    java.util.List<com.liferay.portal.model.VirtualHost> virtualHosts);
053    
054            /**
055            * Creates a new virtual host with the primary key. Does not add the virtual host to the database.
056            *
057            * @param virtualHostId the primary key for the new virtual host
058            * @return the new virtual host
059            */
060            public com.liferay.portal.model.VirtualHost create(long virtualHostId);
061    
062            /**
063            * Removes the virtual host with the primary key from the database. Also notifies the appropriate model listeners.
064            *
065            * @param virtualHostId the primary key of the virtual host
066            * @return the virtual host that was removed
067            * @throws com.liferay.portal.NoSuchVirtualHostException if a virtual host with the primary key could not be found
068            * @throws SystemException if a system exception occurred
069            */
070            public com.liferay.portal.model.VirtualHost remove(long virtualHostId)
071                    throws com.liferay.portal.NoSuchVirtualHostException,
072                            com.liferay.portal.kernel.exception.SystemException;
073    
074            public com.liferay.portal.model.VirtualHost updateImpl(
075                    com.liferay.portal.model.VirtualHost virtualHost, boolean merge)
076                    throws com.liferay.portal.kernel.exception.SystemException;
077    
078            /**
079            * Returns the virtual host with the primary key or throws a {@link com.liferay.portal.NoSuchVirtualHostException} if it could not be found.
080            *
081            * @param virtualHostId the primary key of the virtual host
082            * @return the virtual host
083            * @throws com.liferay.portal.NoSuchVirtualHostException if a virtual host with the primary key could not be found
084            * @throws SystemException if a system exception occurred
085            */
086            public com.liferay.portal.model.VirtualHost findByPrimaryKey(
087                    long virtualHostId)
088                    throws com.liferay.portal.NoSuchVirtualHostException,
089                            com.liferay.portal.kernel.exception.SystemException;
090    
091            /**
092            * Returns the virtual host with the primary key or returns <code>null</code> if it could not be found.
093            *
094            * @param virtualHostId the primary key of the virtual host
095            * @return the virtual host, or <code>null</code> if a virtual host with the primary key could not be found
096            * @throws SystemException if a system exception occurred
097            */
098            public com.liferay.portal.model.VirtualHost fetchByPrimaryKey(
099                    long virtualHostId)
100                    throws com.liferay.portal.kernel.exception.SystemException;
101    
102            /**
103            * Returns the virtual host where hostname = &#63; or throws a {@link com.liferay.portal.NoSuchVirtualHostException} if it could not be found.
104            *
105            * @param hostname the hostname
106            * @return the matching virtual host
107            * @throws com.liferay.portal.NoSuchVirtualHostException if a matching virtual host could not be found
108            * @throws SystemException if a system exception occurred
109            */
110            public com.liferay.portal.model.VirtualHost findByHostname(
111                    java.lang.String hostname)
112                    throws com.liferay.portal.NoSuchVirtualHostException,
113                            com.liferay.portal.kernel.exception.SystemException;
114    
115            /**
116            * Returns the virtual host where hostname = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
117            *
118            * @param hostname the hostname
119            * @return the matching virtual host, or <code>null</code> if a matching virtual host could not be found
120            * @throws SystemException if a system exception occurred
121            */
122            public com.liferay.portal.model.VirtualHost fetchByHostname(
123                    java.lang.String hostname)
124                    throws com.liferay.portal.kernel.exception.SystemException;
125    
126            /**
127            * Returns the virtual host where hostname = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
128            *
129            * @param hostname the hostname
130            * @param retrieveFromCache whether to use the finder cache
131            * @return the matching virtual host, or <code>null</code> if a matching virtual host could not be found
132            * @throws SystemException if a system exception occurred
133            */
134            public com.liferay.portal.model.VirtualHost fetchByHostname(
135                    java.lang.String hostname, boolean retrieveFromCache)
136                    throws com.liferay.portal.kernel.exception.SystemException;
137    
138            /**
139            * Returns the virtual host where companyId = &#63; and layoutSetId = &#63; or throws a {@link com.liferay.portal.NoSuchVirtualHostException} if it could not be found.
140            *
141            * @param companyId the company ID
142            * @param layoutSetId the layout set ID
143            * @return the matching virtual host
144            * @throws com.liferay.portal.NoSuchVirtualHostException if a matching virtual host could not be found
145            * @throws SystemException if a system exception occurred
146            */
147            public com.liferay.portal.model.VirtualHost findByC_L(long companyId,
148                    long layoutSetId)
149                    throws com.liferay.portal.NoSuchVirtualHostException,
150                            com.liferay.portal.kernel.exception.SystemException;
151    
152            /**
153            * 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.
154            *
155            * @param companyId the company ID
156            * @param layoutSetId the layout set ID
157            * @return the matching virtual host, or <code>null</code> if a matching virtual host could not be found
158            * @throws SystemException if a system exception occurred
159            */
160            public com.liferay.portal.model.VirtualHost fetchByC_L(long companyId,
161                    long layoutSetId)
162                    throws com.liferay.portal.kernel.exception.SystemException;
163    
164            /**
165            * 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.
166            *
167            * @param companyId the company ID
168            * @param layoutSetId the layout set ID
169            * @param retrieveFromCache whether to use the finder cache
170            * @return the matching virtual host, or <code>null</code> if a matching virtual host could not be found
171            * @throws SystemException if a system exception occurred
172            */
173            public com.liferay.portal.model.VirtualHost fetchByC_L(long companyId,
174                    long layoutSetId, boolean retrieveFromCache)
175                    throws com.liferay.portal.kernel.exception.SystemException;
176    
177            /**
178            * Returns all the virtual hosts.
179            *
180            * @return the virtual hosts
181            * @throws SystemException if a system exception occurred
182            */
183            public java.util.List<com.liferay.portal.model.VirtualHost> findAll()
184                    throws com.liferay.portal.kernel.exception.SystemException;
185    
186            /**
187            * Returns a range of all the virtual hosts.
188            *
189            * <p>
190            * 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.
191            * </p>
192            *
193            * @param start the lower bound of the range of virtual hosts
194            * @param end the upper bound of the range of virtual hosts (not inclusive)
195            * @return the range of virtual hosts
196            * @throws SystemException if a system exception occurred
197            */
198            public java.util.List<com.liferay.portal.model.VirtualHost> findAll(
199                    int start, int end)
200                    throws com.liferay.portal.kernel.exception.SystemException;
201    
202            /**
203            * Returns an ordered range of all the virtual hosts.
204            *
205            * <p>
206            * 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.
207            * </p>
208            *
209            * @param start the lower bound of the range of virtual hosts
210            * @param end the upper bound of the range of virtual hosts (not inclusive)
211            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
212            * @return the ordered range of virtual hosts
213            * @throws SystemException if a system exception occurred
214            */
215            public java.util.List<com.liferay.portal.model.VirtualHost> findAll(
216                    int start, int end,
217                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
218                    throws com.liferay.portal.kernel.exception.SystemException;
219    
220            /**
221            * Removes the virtual host where hostname = &#63; from the database.
222            *
223            * @param hostname the hostname
224            * @throws SystemException if a system exception occurred
225            */
226            public void removeByHostname(java.lang.String hostname)
227                    throws com.liferay.portal.NoSuchVirtualHostException,
228                            com.liferay.portal.kernel.exception.SystemException;
229    
230            /**
231            * Removes the virtual host where companyId = &#63; and layoutSetId = &#63; from the database.
232            *
233            * @param companyId the company ID
234            * @param layoutSetId the layout set ID
235            * @throws SystemException if a system exception occurred
236            */
237            public void removeByC_L(long companyId, long layoutSetId)
238                    throws com.liferay.portal.NoSuchVirtualHostException,
239                            com.liferay.portal.kernel.exception.SystemException;
240    
241            /**
242            * Removes all the virtual hosts from the database.
243            *
244            * @throws SystemException if a system exception occurred
245            */
246            public void removeAll()
247                    throws com.liferay.portal.kernel.exception.SystemException;
248    
249            /**
250            * Returns the number of virtual hosts where hostname = &#63;.
251            *
252            * @param hostname the hostname
253            * @return the number of matching virtual hosts
254            * @throws SystemException if a system exception occurred
255            */
256            public int countByHostname(java.lang.String hostname)
257                    throws com.liferay.portal.kernel.exception.SystemException;
258    
259            /**
260            * Returns the number of virtual hosts where companyId = &#63; and layoutSetId = &#63;.
261            *
262            * @param companyId the company ID
263            * @param layoutSetId the layout set ID
264            * @return the number of matching virtual hosts
265            * @throws SystemException if a system exception occurred
266            */
267            public int countByC_L(long companyId, long layoutSetId)
268                    throws com.liferay.portal.kernel.exception.SystemException;
269    
270            /**
271            * Returns the number of virtual hosts.
272            *
273            * @return the number of virtual hosts
274            * @throws SystemException if a system exception occurred
275            */
276            public int countAll()
277                    throws com.liferay.portal.kernel.exception.SystemException;
278    
279            public VirtualHost remove(VirtualHost virtualHost)
280                    throws SystemException;
281    }