1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.counter.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="CounterLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link CounterLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       CounterLocalService
37   * @generated
38   */
39  public class CounterLocalServiceUtil {
40      public static com.liferay.counter.model.Counter addCounter(
41          com.liferay.counter.model.Counter counter)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addCounter(counter);
44      }
45  
46      public static com.liferay.counter.model.Counter createCounter(
47          java.lang.String name) {
48          return getService().createCounter(name);
49      }
50  
51      public static void deleteCounter(java.lang.String name)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deleteCounter(name);
55      }
56  
57      public static void deleteCounter(com.liferay.counter.model.Counter counter)
58          throws com.liferay.portal.kernel.exception.SystemException {
59          getService().deleteCounter(counter);
60      }
61  
62      @SuppressWarnings("unchecked")
63      public static java.util.List dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.kernel.exception.SystemException {
66          return getService().dynamicQuery(dynamicQuery);
67      }
68  
69      @SuppressWarnings("unchecked")
70      public static java.util.List dynamicQuery(
71          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
72          int end) throws com.liferay.portal.kernel.exception.SystemException {
73          return getService().dynamicQuery(dynamicQuery, start, end);
74      }
75  
76      @SuppressWarnings("unchecked")
77      public static java.util.List dynamicQuery(
78          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
79          int end,
80          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
81          throws com.liferay.portal.kernel.exception.SystemException {
82          return getService()
83                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
84      }
85  
86      public static long dynamicQueryCount(
87          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
88          throws com.liferay.portal.kernel.exception.SystemException {
89          return getService().dynamicQueryCount(dynamicQuery);
90      }
91  
92      public static com.liferay.counter.model.Counter getCounter(
93          java.lang.String name)
94          throws com.liferay.portal.kernel.exception.PortalException,
95              com.liferay.portal.kernel.exception.SystemException {
96          return getService().getCounter(name);
97      }
98  
99      public static java.util.List<com.liferay.counter.model.Counter> getCounters(
100         int start, int end)
101         throws com.liferay.portal.kernel.exception.SystemException {
102         return getService().getCounters(start, end);
103     }
104 
105     public static int getCountersCount()
106         throws com.liferay.portal.kernel.exception.SystemException {
107         return getService().getCountersCount();
108     }
109 
110     public static com.liferay.counter.model.Counter updateCounter(
111         com.liferay.counter.model.Counter counter)
112         throws com.liferay.portal.kernel.exception.SystemException {
113         return getService().updateCounter(counter);
114     }
115 
116     public static com.liferay.counter.model.Counter updateCounter(
117         com.liferay.counter.model.Counter counter, boolean merge)
118         throws com.liferay.portal.kernel.exception.SystemException {
119         return getService().updateCounter(counter, merge);
120     }
121 
122     public static java.util.List<java.lang.String> getNames()
123         throws com.liferay.portal.kernel.exception.SystemException {
124         return getService().getNames();
125     }
126 
127     public static long increment()
128         throws com.liferay.portal.kernel.exception.SystemException {
129         return getService().increment();
130     }
131 
132     public static long increment(java.lang.String name)
133         throws com.liferay.portal.kernel.exception.SystemException {
134         return getService().increment(name);
135     }
136 
137     public static long increment(java.lang.String name, int size)
138         throws com.liferay.portal.kernel.exception.SystemException {
139         return getService().increment(name, size);
140     }
141 
142     public static void rename(java.lang.String oldName, java.lang.String newName)
143         throws com.liferay.portal.kernel.exception.SystemException {
144         getService().rename(oldName, newName);
145     }
146 
147     public static void reset(java.lang.String name)
148         throws com.liferay.portal.kernel.exception.SystemException {
149         getService().reset(name);
150     }
151 
152     public static void reset(java.lang.String name, long size)
153         throws com.liferay.portal.kernel.exception.SystemException {
154         getService().reset(name, size);
155     }
156 
157     public static CounterLocalService getService() {
158         if (_service == null) {
159             _service = (CounterLocalService)PortalBeanLocatorUtil.locate(CounterLocalService.class.getName());
160         }
161 
162         return _service;
163     }
164 
165     public void setService(CounterLocalService service) {
166         _service = service;
167     }
168 
169     private static CounterLocalService _service;
170 }