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