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.counter.service.persistence;
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     * @author Brian Wing Shun Chan
024     * @generated
025     */
026    @ProviderType
027    public class CounterFinderUtil {
028            public static java.util.List<java.lang.String> getNames() {
029                    return getFinder().getNames();
030            }
031    
032            public static java.lang.String getRegistryName() {
033                    return getFinder().getRegistryName();
034            }
035    
036            public static long increment() {
037                    return getFinder().increment();
038            }
039    
040            public static long increment(java.lang.String name) {
041                    return getFinder().increment(name);
042            }
043    
044            public static long increment(java.lang.String name, int size) {
045                    return getFinder().increment(name, size);
046            }
047    
048            public static void invalidate() {
049                    getFinder().invalidate();
050            }
051    
052            public static void rename(java.lang.String oldName, java.lang.String newName) {
053                    getFinder().rename(oldName, newName);
054            }
055    
056            public static void reset(java.lang.String name) {
057                    getFinder().reset(name);
058            }
059    
060            public static void reset(java.lang.String name, long size) {
061                    getFinder().reset(name, size);
062            }
063    
064            public static CounterFinder getFinder() {
065                    if (_finder == null) {
066                            _finder = (CounterFinder)PortalBeanLocatorUtil.locate(CounterFinder.class.getName());
067    
068                            ReferenceRegistry.registerReference(CounterFinderUtil.class,
069                                    "_finder");
070                    }
071    
072                    return _finder;
073            }
074    
075            public void setFinder(CounterFinder finder) {
076                    _finder = finder;
077    
078                    ReferenceRegistry.registerReference(CounterFinderUtil.class, "_finder");
079            }
080    
081            private static CounterFinder _finder;
082    }