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