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