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 ClusterGroup. This utility wraps
024     * {@link com.liferay.portal.service.impl.ClusterGroupLocalServiceImpl} 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 ClusterGroupLocalService
032     * @see com.liferay.portal.service.base.ClusterGroupLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.ClusterGroupLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class ClusterGroupLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.ClusterGroupLocalServiceImpl} 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            * Adds the cluster group to the database. Also notifies the appropriate model listeners.
057            *
058            * @param clusterGroup the cluster group
059            * @return the cluster group that was added
060            */
061            public static com.liferay.portal.kernel.model.ClusterGroup addClusterGroup(
062                    com.liferay.portal.kernel.model.ClusterGroup clusterGroup) {
063                    return getService().addClusterGroup(clusterGroup);
064            }
065    
066            public static com.liferay.portal.kernel.model.ClusterGroup addClusterGroup(
067                    java.lang.String name, java.util.List<java.lang.String> clusterNodeIds) {
068                    return getService().addClusterGroup(name, clusterNodeIds);
069            }
070    
071            public static com.liferay.portal.kernel.model.ClusterGroup addWholeClusterGroup(
072                    java.lang.String name) {
073                    return getService().addWholeClusterGroup(name);
074            }
075    
076            /**
077            * Creates a new cluster group with the primary key. Does not add the cluster group to the database.
078            *
079            * @param clusterGroupId the primary key for the new cluster group
080            * @return the new cluster group
081            */
082            public static com.liferay.portal.kernel.model.ClusterGroup createClusterGroup(
083                    long clusterGroupId) {
084                    return getService().createClusterGroup(clusterGroupId);
085            }
086    
087            /**
088            * Deletes the cluster group from the database. Also notifies the appropriate model listeners.
089            *
090            * @param clusterGroup the cluster group
091            * @return the cluster group that was removed
092            */
093            public static com.liferay.portal.kernel.model.ClusterGroup deleteClusterGroup(
094                    com.liferay.portal.kernel.model.ClusterGroup clusterGroup) {
095                    return getService().deleteClusterGroup(clusterGroup);
096            }
097    
098            /**
099            * Deletes the cluster group with the primary key from the database. Also notifies the appropriate model listeners.
100            *
101            * @param clusterGroupId the primary key of the cluster group
102            * @return the cluster group that was removed
103            * @throws PortalException if a cluster group with the primary key could not be found
104            */
105            public static com.liferay.portal.kernel.model.ClusterGroup deleteClusterGroup(
106                    long clusterGroupId)
107                    throws com.liferay.portal.kernel.exception.PortalException {
108                    return getService().deleteClusterGroup(clusterGroupId);
109            }
110    
111            public static com.liferay.portal.kernel.model.ClusterGroup fetchClusterGroup(
112                    long clusterGroupId) {
113                    return getService().fetchClusterGroup(clusterGroupId);
114            }
115    
116            /**
117            * Returns the cluster group with the primary key.
118            *
119            * @param clusterGroupId the primary key of the cluster group
120            * @return the cluster group
121            * @throws PortalException if a cluster group with the primary key could not be found
122            */
123            public static com.liferay.portal.kernel.model.ClusterGroup getClusterGroup(
124                    long clusterGroupId)
125                    throws com.liferay.portal.kernel.exception.PortalException {
126                    return getService().getClusterGroup(clusterGroupId);
127            }
128    
129            /**
130            * Updates the cluster group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
131            *
132            * @param clusterGroup the cluster group
133            * @return the cluster group that was updated
134            */
135            public static com.liferay.portal.kernel.model.ClusterGroup updateClusterGroup(
136                    com.liferay.portal.kernel.model.ClusterGroup clusterGroup) {
137                    return getService().updateClusterGroup(clusterGroup);
138            }
139    
140            /**
141            * @throws PortalException
142            */
143            public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
144                    com.liferay.portal.kernel.model.PersistedModel persistedModel)
145                    throws com.liferay.portal.kernel.exception.PortalException {
146                    return getService().deletePersistedModel(persistedModel);
147            }
148    
149            public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
150                    java.io.Serializable primaryKeyObj)
151                    throws com.liferay.portal.kernel.exception.PortalException {
152                    return getService().getPersistedModel(primaryKeyObj);
153            }
154    
155            /**
156            * Returns the number of cluster groups.
157            *
158            * @return the number of cluster groups
159            */
160            public static int getClusterGroupsCount() {
161                    return getService().getClusterGroupsCount();
162            }
163    
164            /**
165            * Returns the OSGi service identifier.
166            *
167            * @return the OSGi service identifier
168            */
169            public static java.lang.String getOSGiServiceIdentifier() {
170                    return getService().getOSGiServiceIdentifier();
171            }
172    
173            /**
174            * Performs a dynamic query on the database and returns the matching rows.
175            *
176            * @param dynamicQuery the dynamic query
177            * @return the matching rows
178            */
179            public static <T> java.util.List<T> dynamicQuery(
180                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
181                    return getService().dynamicQuery(dynamicQuery);
182            }
183    
184            /**
185            * Performs a dynamic query on the database and returns a range of the matching rows.
186            *
187            * <p>
188            * 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.ClusterGroupModelImpl}. 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.
189            * </p>
190            *
191            * @param dynamicQuery the dynamic query
192            * @param start the lower bound of the range of model instances
193            * @param end the upper bound of the range of model instances (not inclusive)
194            * @return the range of matching rows
195            */
196            public static <T> java.util.List<T> dynamicQuery(
197                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
198                    int end) {
199                    return getService().dynamicQuery(dynamicQuery, start, end);
200            }
201    
202            /**
203            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
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. 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.ClusterGroupModelImpl}. 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.
207            * </p>
208            *
209            * @param dynamicQuery the dynamic query
210            * @param start the lower bound of the range of model instances
211            * @param end the upper bound of the range of model instances (not inclusive)
212            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
213            * @return the ordered range of matching rows
214            */
215            public static <T> java.util.List<T> dynamicQuery(
216                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
217                    int end,
218                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
219                    return getService()
220                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
221            }
222    
223            /**
224            * Returns a range of all the cluster groups.
225            *
226            * <p>
227            * 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.ClusterGroupModelImpl}. 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.
228            * </p>
229            *
230            * @param start the lower bound of the range of cluster groups
231            * @param end the upper bound of the range of cluster groups (not inclusive)
232            * @return the range of cluster groups
233            */
234            public static java.util.List<com.liferay.portal.kernel.model.ClusterGroup> getClusterGroups(
235                    int start, int end) {
236                    return getService().getClusterGroups(start, end);
237            }
238    
239            /**
240            * Returns the number of rows matching the dynamic query.
241            *
242            * @param dynamicQuery the dynamic query
243            * @return the number of rows matching the dynamic query
244            */
245            public static long dynamicQueryCount(
246                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
247                    return getService().dynamicQueryCount(dynamicQuery);
248            }
249    
250            /**
251            * Returns the number of rows matching the dynamic query.
252            *
253            * @param dynamicQuery the dynamic query
254            * @param projection the projection to apply to the query
255            * @return the number of rows matching the dynamic query
256            */
257            public static long dynamicQueryCount(
258                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
259                    com.liferay.portal.kernel.dao.orm.Projection projection) {
260                    return getService().dynamicQueryCount(dynamicQuery, projection);
261            }
262    
263            public static ClusterGroupLocalService getService() {
264                    if (_service == null) {
265                            _service = (ClusterGroupLocalService)PortalBeanLocatorUtil.locate(ClusterGroupLocalService.class.getName());
266    
267                            ReferenceRegistry.registerReference(ClusterGroupLocalServiceUtil.class,
268                                    "_service");
269                    }
270    
271                    return _service;
272            }
273    
274            private static ClusterGroupLocalService _service;
275    }