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.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="CounterFinderUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * @author Brian Wing Shun Chan
23   */
24  public class CounterFinderUtil {
25      public static java.util.List<java.lang.String> getNames()
26          throws com.liferay.portal.kernel.exception.SystemException {
27          return getFinder().getNames();
28      }
29  
30      public static long increment()
31          throws com.liferay.portal.kernel.exception.SystemException {
32          return getFinder().increment();
33      }
34  
35      public static long increment(java.lang.String name)
36          throws com.liferay.portal.kernel.exception.SystemException {
37          return getFinder().increment(name);
38      }
39  
40      public static long increment(java.lang.String name, int size)
41          throws com.liferay.portal.kernel.exception.SystemException {
42          return getFinder().increment(name, size);
43      }
44  
45      public static void rename(java.lang.String oldName, java.lang.String newName)
46          throws com.liferay.portal.kernel.exception.SystemException {
47          getFinder().rename(oldName, newName);
48      }
49  
50      public static void reset(java.lang.String name)
51          throws com.liferay.portal.kernel.exception.SystemException {
52          getFinder().reset(name);
53      }
54  
55      public static void reset(java.lang.String name, long size)
56          throws com.liferay.portal.kernel.exception.SystemException {
57          getFinder().reset(name, size);
58      }
59  
60      public static CounterFinder getFinder() {
61          if (_finder == null) {
62              _finder = (CounterFinder)PortalBeanLocatorUtil.locate(CounterFinder.class.getName());
63          }
64  
65          return _finder;
66      }
67  
68      public void setFinder(CounterFinder finder) {
69          _finder = finder;
70      }
71  
72      private static CounterFinder _finder;
73  }