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