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 ResourceAction. This utility wraps 024 * {@link com.liferay.portal.service.impl.ResourceActionLocalServiceImpl} 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 ResourceActionLocalService 032 * @see com.liferay.portal.service.base.ResourceActionLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.ResourceActionLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class ResourceActionLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.ResourceActionLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 public static com.liferay.portal.model.ResourceAction addResourceAction( 044 java.lang.String name, java.lang.String actionId, long bitwiseValue) { 045 return getService().addResourceAction(name, actionId, bitwiseValue); 046 } 047 048 /** 049 * Adds the resource action to the database. Also notifies the appropriate model listeners. 050 * 051 * @param resourceAction the resource action 052 * @return the resource action that was added 053 */ 054 public static com.liferay.portal.model.ResourceAction addResourceAction( 055 com.liferay.portal.model.ResourceAction resourceAction) { 056 return getService().addResourceAction(resourceAction); 057 } 058 059 public static void checkResourceActions() { 060 getService().checkResourceActions(); 061 } 062 063 public static void checkResourceActions(java.lang.String name, 064 java.util.List<java.lang.String> actionIds) { 065 getService().checkResourceActions(name, actionIds); 066 } 067 068 public static void checkResourceActions(java.lang.String name, 069 java.util.List<java.lang.String> actionIds, boolean addDefaultActions) { 070 getService().checkResourceActions(name, actionIds, addDefaultActions); 071 } 072 073 /** 074 * Creates a new resource action with the primary key. Does not add the resource action to the database. 075 * 076 * @param resourceActionId the primary key for the new resource action 077 * @return the new resource action 078 */ 079 public static com.liferay.portal.model.ResourceAction createResourceAction( 080 long resourceActionId) { 081 return getService().createResourceAction(resourceActionId); 082 } 083 084 /** 085 * @throws PortalException 086 */ 087 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 088 com.liferay.portal.model.PersistedModel persistedModel) 089 throws com.liferay.portal.kernel.exception.PortalException { 090 return getService().deletePersistedModel(persistedModel); 091 } 092 093 /** 094 * Deletes the resource action from the database. Also notifies the appropriate model listeners. 095 * 096 * @param resourceAction the resource action 097 * @return the resource action that was removed 098 */ 099 public static com.liferay.portal.model.ResourceAction deleteResourceAction( 100 com.liferay.portal.model.ResourceAction resourceAction) { 101 return getService().deleteResourceAction(resourceAction); 102 } 103 104 /** 105 * Deletes the resource action with the primary key from the database. Also notifies the appropriate model listeners. 106 * 107 * @param resourceActionId the primary key of the resource action 108 * @return the resource action that was removed 109 * @throws PortalException if a resource action with the primary key could not be found 110 */ 111 public static com.liferay.portal.model.ResourceAction deleteResourceAction( 112 long resourceActionId) 113 throws com.liferay.portal.kernel.exception.PortalException { 114 return getService().deleteResourceAction(resourceActionId); 115 } 116 117 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 118 return getService().dynamicQuery(); 119 } 120 121 /** 122 * Performs a dynamic query on the database and returns the matching rows. 123 * 124 * @param dynamicQuery the dynamic query 125 * @return the matching rows 126 */ 127 public static <T> java.util.List<T> dynamicQuery( 128 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 129 return getService().dynamicQuery(dynamicQuery); 130 } 131 132 /** 133 * Performs a dynamic query on the database and returns a range of the matching rows. 134 * 135 * <p> 136 * 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.ResourceActionModelImpl}. 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. 137 * </p> 138 * 139 * @param dynamicQuery the dynamic query 140 * @param start the lower bound of the range of model instances 141 * @param end the upper bound of the range of model instances (not inclusive) 142 * @return the range of matching rows 143 */ 144 public static <T> java.util.List<T> dynamicQuery( 145 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 146 int end) { 147 return getService().dynamicQuery(dynamicQuery, start, end); 148 } 149 150 /** 151 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 152 * 153 * <p> 154 * 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.ResourceActionModelImpl}. 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. 155 * </p> 156 * 157 * @param dynamicQuery the dynamic query 158 * @param start the lower bound of the range of model instances 159 * @param end the upper bound of the range of model instances (not inclusive) 160 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 161 * @return the ordered range of matching rows 162 */ 163 public static <T> java.util.List<T> dynamicQuery( 164 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 165 int end, 166 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 167 return getService() 168 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 169 } 170 171 /** 172 * Returns the number of rows matching the dynamic query. 173 * 174 * @param dynamicQuery the dynamic query 175 * @return the number of rows matching the dynamic query 176 */ 177 public static long dynamicQueryCount( 178 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 179 return getService().dynamicQueryCount(dynamicQuery); 180 } 181 182 /** 183 * Returns the number of rows matching the dynamic query. 184 * 185 * @param dynamicQuery the dynamic query 186 * @param projection the projection to apply to the query 187 * @return the number of rows matching the dynamic query 188 */ 189 public static long dynamicQueryCount( 190 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 191 com.liferay.portal.kernel.dao.orm.Projection projection) { 192 return getService().dynamicQueryCount(dynamicQuery, projection); 193 } 194 195 public static com.liferay.portal.model.ResourceAction fetchResourceAction( 196 java.lang.String name, java.lang.String actionId) { 197 return getService().fetchResourceAction(name, actionId); 198 } 199 200 public static com.liferay.portal.model.ResourceAction fetchResourceAction( 201 long resourceActionId) { 202 return getService().fetchResourceAction(resourceActionId); 203 } 204 205 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 206 return getService().getActionableDynamicQuery(); 207 } 208 209 /** 210 * Returns the Spring bean ID for this bean. 211 * 212 * @return the Spring bean ID for this bean 213 */ 214 public static java.lang.String getBeanIdentifier() { 215 return getService().getBeanIdentifier(); 216 } 217 218 public static com.liferay.portal.model.PersistedModel getPersistedModel( 219 java.io.Serializable primaryKeyObj) 220 throws com.liferay.portal.kernel.exception.PortalException { 221 return getService().getPersistedModel(primaryKeyObj); 222 } 223 224 public static com.liferay.portal.model.ResourceAction getResourceAction( 225 java.lang.String name, java.lang.String actionId) 226 throws com.liferay.portal.kernel.exception.PortalException { 227 return getService().getResourceAction(name, actionId); 228 } 229 230 /** 231 * Returns the resource action with the primary key. 232 * 233 * @param resourceActionId the primary key of the resource action 234 * @return the resource action 235 * @throws PortalException if a resource action with the primary key could not be found 236 */ 237 public static com.liferay.portal.model.ResourceAction getResourceAction( 238 long resourceActionId) 239 throws com.liferay.portal.kernel.exception.PortalException { 240 return getService().getResourceAction(resourceActionId); 241 } 242 243 public static java.util.List<com.liferay.portal.model.ResourceAction> getResourceActions( 244 java.lang.String name) { 245 return getService().getResourceActions(name); 246 } 247 248 /** 249 * Returns a range of all the resource actions. 250 * 251 * <p> 252 * 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.ResourceActionModelImpl}. 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. 253 * </p> 254 * 255 * @param start the lower bound of the range of resource actions 256 * @param end the upper bound of the range of resource actions (not inclusive) 257 * @return the range of resource actions 258 */ 259 public static java.util.List<com.liferay.portal.model.ResourceAction> getResourceActions( 260 int start, int end) { 261 return getService().getResourceActions(start, end); 262 } 263 264 /** 265 * Returns the number of resource actions. 266 * 267 * @return the number of resource actions 268 */ 269 public static int getResourceActionsCount() { 270 return getService().getResourceActionsCount(); 271 } 272 273 public static int getResourceActionsCount(java.lang.String name) { 274 return getService().getResourceActionsCount(name); 275 } 276 277 /** 278 * Sets the Spring bean ID for this bean. 279 * 280 * @param beanIdentifier the Spring bean ID for this bean 281 */ 282 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 283 getService().setBeanIdentifier(beanIdentifier); 284 } 285 286 /** 287 * Updates the resource action in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 288 * 289 * @param resourceAction the resource action 290 * @return the resource action that was updated 291 */ 292 public static com.liferay.portal.model.ResourceAction updateResourceAction( 293 com.liferay.portal.model.ResourceAction resourceAction) { 294 return getService().updateResourceAction(resourceAction); 295 } 296 297 public static ResourceActionLocalService getService() { 298 if (_service == null) { 299 _service = (ResourceActionLocalService)PortalBeanLocatorUtil.locate(ResourceActionLocalService.class.getName()); 300 301 ReferenceRegistry.registerReference(ResourceActionLocalServiceUtil.class, 302 "_service"); 303 } 304 305 return _service; 306 } 307 308 /** 309 * @deprecated As of 6.2.0 310 */ 311 @Deprecated 312 public void setService(ResourceActionLocalService service) { 313 } 314 315 private static ResourceActionLocalService _service; 316 }