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.kernel.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for VirtualHost. This utility wraps
024     * {@link com.liferay.portal.service.impl.VirtualHostLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see VirtualHostLocalService
032     * @see com.liferay.portal.service.base.VirtualHostLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.VirtualHostLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class VirtualHostLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.VirtualHostLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
044                    return getService().getActionableDynamicQuery();
045            }
046    
047            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
048                    return getService().dynamicQuery();
049            }
050    
051            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
052                    return getService().getIndexableActionableDynamicQuery();
053            }
054    
055            /**
056            * @throws PortalException
057            */
058            public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
059                    com.liferay.portal.kernel.model.PersistedModel persistedModel)
060                    throws com.liferay.portal.kernel.exception.PortalException {
061                    return getService().deletePersistedModel(persistedModel);
062            }
063    
064            public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
065                    java.io.Serializable primaryKeyObj)
066                    throws com.liferay.portal.kernel.exception.PortalException {
067                    return getService().getPersistedModel(primaryKeyObj);
068            }
069    
070            /**
071            * Adds the virtual host to the database. Also notifies the appropriate model listeners.
072            *
073            * @param virtualHost the virtual host
074            * @return the virtual host that was added
075            */
076            public static com.liferay.portal.kernel.model.VirtualHost addVirtualHost(
077                    com.liferay.portal.kernel.model.VirtualHost virtualHost) {
078                    return getService().addVirtualHost(virtualHost);
079            }
080    
081            /**
082            * Creates a new virtual host with the primary key. Does not add the virtual host to the database.
083            *
084            * @param virtualHostId the primary key for the new virtual host
085            * @return the new virtual host
086            */
087            public static com.liferay.portal.kernel.model.VirtualHost createVirtualHost(
088                    long virtualHostId) {
089                    return getService().createVirtualHost(virtualHostId);
090            }
091    
092            /**
093            * Deletes the virtual host from the database. Also notifies the appropriate model listeners.
094            *
095            * @param virtualHost the virtual host
096            * @return the virtual host that was removed
097            */
098            public static com.liferay.portal.kernel.model.VirtualHost deleteVirtualHost(
099                    com.liferay.portal.kernel.model.VirtualHost virtualHost) {
100                    return getService().deleteVirtualHost(virtualHost);
101            }
102    
103            /**
104            * Deletes the virtual host with the primary key from the database. Also notifies the appropriate model listeners.
105            *
106            * @param virtualHostId the primary key of the virtual host
107            * @return the virtual host that was removed
108            * @throws PortalException if a virtual host with the primary key could not be found
109            */
110            public static com.liferay.portal.kernel.model.VirtualHost deleteVirtualHost(
111                    long virtualHostId)
112                    throws com.liferay.portal.kernel.exception.PortalException {
113                    return getService().deleteVirtualHost(virtualHostId);
114            }
115    
116            public static com.liferay.portal.kernel.model.VirtualHost fetchVirtualHost(
117                    java.lang.String hostname) {
118                    return getService().fetchVirtualHost(hostname);
119            }
120    
121            public static com.liferay.portal.kernel.model.VirtualHost fetchVirtualHost(
122                    long companyId, long layoutSetId) {
123                    return getService().fetchVirtualHost(companyId, layoutSetId);
124            }
125    
126            public static com.liferay.portal.kernel.model.VirtualHost fetchVirtualHost(
127                    long virtualHostId) {
128                    return getService().fetchVirtualHost(virtualHostId);
129            }
130    
131            public static com.liferay.portal.kernel.model.VirtualHost getVirtualHost(
132                    java.lang.String hostname)
133                    throws com.liferay.portal.kernel.exception.PortalException {
134                    return getService().getVirtualHost(hostname);
135            }
136    
137            public static com.liferay.portal.kernel.model.VirtualHost getVirtualHost(
138                    long companyId, long layoutSetId)
139                    throws com.liferay.portal.kernel.exception.PortalException {
140                    return getService().getVirtualHost(companyId, layoutSetId);
141            }
142    
143            /**
144            * Returns the virtual host with the primary key.
145            *
146            * @param virtualHostId the primary key of the virtual host
147            * @return the virtual host
148            * @throws PortalException if a virtual host with the primary key could not be found
149            */
150            public static com.liferay.portal.kernel.model.VirtualHost getVirtualHost(
151                    long virtualHostId)
152                    throws com.liferay.portal.kernel.exception.PortalException {
153                    return getService().getVirtualHost(virtualHostId);
154            }
155    
156            /**
157            * Updates the virtual host in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
158            *
159            * @param virtualHost the virtual host
160            * @return the virtual host that was updated
161            */
162            public static com.liferay.portal.kernel.model.VirtualHost updateVirtualHost(
163                    com.liferay.portal.kernel.model.VirtualHost virtualHost) {
164                    return getService().updateVirtualHost(virtualHost);
165            }
166    
167            public static com.liferay.portal.kernel.model.VirtualHost updateVirtualHost(
168                    long companyId, long layoutSetId, java.lang.String hostname) {
169                    return getService().updateVirtualHost(companyId, layoutSetId, hostname);
170            }
171    
172            /**
173            * Returns the number of virtual hosts.
174            *
175            * @return the number of virtual hosts
176            */
177            public static int getVirtualHostsCount() {
178                    return getService().getVirtualHostsCount();
179            }
180    
181            /**
182            * Returns the OSGi service identifier.
183            *
184            * @return the OSGi service identifier
185            */
186            public static java.lang.String getOSGiServiceIdentifier() {
187                    return getService().getOSGiServiceIdentifier();
188            }
189    
190            /**
191            * Performs a dynamic query on the database and returns the matching rows.
192            *
193            * @param dynamicQuery the dynamic query
194            * @return the matching rows
195            */
196            public static <T> java.util.List<T> dynamicQuery(
197                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
198                    return getService().dynamicQuery(dynamicQuery);
199            }
200    
201            /**
202            * Performs a dynamic query on the database and returns a range of the matching rows.
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. 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.
206            * </p>
207            *
208            * @param dynamicQuery the dynamic query
209            * @param start the lower bound of the range of model instances
210            * @param end the upper bound of the range of model instances (not inclusive)
211            * @return the range of matching rows
212            */
213            public static <T> java.util.List<T> dynamicQuery(
214                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
215                    int end) {
216                    return getService().dynamicQuery(dynamicQuery, start, end);
217            }
218    
219            /**
220            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
221            *
222            * <p>
223            * 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.
224            * </p>
225            *
226            * @param dynamicQuery the dynamic query
227            * @param start the lower bound of the range of model instances
228            * @param end the upper bound of the range of model instances (not inclusive)
229            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
230            * @return the ordered range of matching rows
231            */
232            public static <T> java.util.List<T> dynamicQuery(
233                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
234                    int end,
235                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
236                    return getService()
237                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
238            }
239    
240            /**
241            * Returns a range of all the virtual hosts.
242            *
243            * <p>
244            * 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.
245            * </p>
246            *
247            * @param start the lower bound of the range of virtual hosts
248            * @param end the upper bound of the range of virtual hosts (not inclusive)
249            * @return the range of virtual hosts
250            */
251            public static java.util.List<com.liferay.portal.kernel.model.VirtualHost> getVirtualHosts(
252                    int start, int end) {
253                    return getService().getVirtualHosts(start, end);
254            }
255    
256            /**
257            * Returns the number of rows matching the dynamic query.
258            *
259            * @param dynamicQuery the dynamic query
260            * @return the number of rows matching the dynamic query
261            */
262            public static long dynamicQueryCount(
263                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
264                    return getService().dynamicQueryCount(dynamicQuery);
265            }
266    
267            /**
268            * Returns the number of rows matching the dynamic query.
269            *
270            * @param dynamicQuery the dynamic query
271            * @param projection the projection to apply to the query
272            * @return the number of rows matching the dynamic query
273            */
274            public static long dynamicQueryCount(
275                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
276                    com.liferay.portal.kernel.dao.orm.Projection projection) {
277                    return getService().dynamicQueryCount(dynamicQuery, projection);
278            }
279    
280            public static VirtualHostLocalService getService() {
281                    if (_service == null) {
282                            _service = (VirtualHostLocalService)PortalBeanLocatorUtil.locate(VirtualHostLocalService.class.getName());
283    
284                            ReferenceRegistry.registerReference(VirtualHostLocalServiceUtil.class,
285                                    "_service");
286                    }
287    
288                    return _service;
289            }
290    
291            private static VirtualHostLocalService _service;
292    }