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