001    /**
002     * Copyright (c) 2000-2010 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.counter.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link CounterLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       CounterLocalService
030     * @generated
031     */
032    public class CounterLocalServiceUtil {
033            public static com.liferay.counter.model.Counter addCounter(
034                    com.liferay.counter.model.Counter counter)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addCounter(counter);
037            }
038    
039            public static com.liferay.counter.model.Counter createCounter(
040                    java.lang.String name) {
041                    return getService().createCounter(name);
042            }
043    
044            public static void deleteCounter(java.lang.String name)
045                    throws com.liferay.portal.kernel.exception.PortalException,
046                            com.liferay.portal.kernel.exception.SystemException {
047                    getService().deleteCounter(name);
048            }
049    
050            public static void deleteCounter(com.liferay.counter.model.Counter counter)
051                    throws com.liferay.portal.kernel.exception.SystemException {
052                    getService().deleteCounter(counter);
053            }
054    
055            @SuppressWarnings("unchecked")
056            public static java.util.List dynamicQuery(
057                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
058                    throws com.liferay.portal.kernel.exception.SystemException {
059                    return getService().dynamicQuery(dynamicQuery);
060            }
061    
062            @SuppressWarnings("unchecked")
063            public static java.util.List dynamicQuery(
064                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
065                    int end) throws com.liferay.portal.kernel.exception.SystemException {
066                    return getService().dynamicQuery(dynamicQuery, start, end);
067            }
068    
069            @SuppressWarnings("unchecked")
070            public static java.util.List dynamicQuery(
071                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
072                    int end,
073                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
074                    throws com.liferay.portal.kernel.exception.SystemException {
075                    return getService()
076                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
077            }
078    
079            public static long dynamicQueryCount(
080                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
081                    throws com.liferay.portal.kernel.exception.SystemException {
082                    return getService().dynamicQueryCount(dynamicQuery);
083            }
084    
085            public static com.liferay.counter.model.Counter getCounter(
086                    java.lang.String name)
087                    throws com.liferay.portal.kernel.exception.PortalException,
088                            com.liferay.portal.kernel.exception.SystemException {
089                    return getService().getCounter(name);
090            }
091    
092            public static java.util.List<com.liferay.counter.model.Counter> getCounters(
093                    int start, int end)
094                    throws com.liferay.portal.kernel.exception.SystemException {
095                    return getService().getCounters(start, end);
096            }
097    
098            public static int getCountersCount()
099                    throws com.liferay.portal.kernel.exception.SystemException {
100                    return getService().getCountersCount();
101            }
102    
103            public static com.liferay.counter.model.Counter updateCounter(
104                    com.liferay.counter.model.Counter counter)
105                    throws com.liferay.portal.kernel.exception.SystemException {
106                    return getService().updateCounter(counter);
107            }
108    
109            public static com.liferay.counter.model.Counter updateCounter(
110                    com.liferay.counter.model.Counter counter, boolean merge)
111                    throws com.liferay.portal.kernel.exception.SystemException {
112                    return getService().updateCounter(counter, merge);
113            }
114    
115            public static java.util.List<java.lang.String> getNames()
116                    throws com.liferay.portal.kernel.exception.SystemException {
117                    return getService().getNames();
118            }
119    
120            public static long increment()
121                    throws com.liferay.portal.kernel.exception.SystemException {
122                    return getService().increment();
123            }
124    
125            public static long increment(java.lang.String name)
126                    throws com.liferay.portal.kernel.exception.SystemException {
127                    return getService().increment(name);
128            }
129    
130            public static long increment(java.lang.String name, int size)
131                    throws com.liferay.portal.kernel.exception.SystemException {
132                    return getService().increment(name, size);
133            }
134    
135            public static void rename(java.lang.String oldName, java.lang.String newName)
136                    throws com.liferay.portal.kernel.exception.SystemException {
137                    getService().rename(oldName, newName);
138            }
139    
140            public static void reset(java.lang.String name)
141                    throws com.liferay.portal.kernel.exception.SystemException {
142                    getService().reset(name);
143            }
144    
145            public static void reset(java.lang.String name, long size)
146                    throws com.liferay.portal.kernel.exception.SystemException {
147                    getService().reset(name, size);
148            }
149    
150            public static CounterLocalService getService() {
151                    if (_service == null) {
152                            _service = (CounterLocalService)PortalBeanLocatorUtil.locate(CounterLocalService.class.getName());
153                    }
154    
155                    return _service;
156            }
157    
158            public void setService(CounterLocalService service) {
159                    _service = service;
160            }
161    
162            private static CounterLocalService _service;
163    }