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