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