001    /**
002     * Copyright (c) 2000-2013 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.impl;
016    
017    import com.liferay.counter.service.CounterLocalService;
018    import com.liferay.counter.service.base.CounterLocalServiceBaseImpl;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.transaction.Isolation;
021    import com.liferay.portal.kernel.transaction.Propagation;
022    import com.liferay.portal.kernel.transaction.Transactional;
023    
024    import java.util.List;
025    
026    /**
027     * @author Brian Wing Shun Chan
028     * @author Edward Han
029     */
030    public class CounterLocalServiceImpl
031            extends CounterLocalServiceBaseImpl implements CounterLocalService {
032    
033            @Override
034            public List<String> getNames() throws SystemException {
035                    return counterFinder.getNames();
036            }
037    
038            @Override
039            @Transactional(
040                    isolation = Isolation.COUNTER, propagation = Propagation.REQUIRES_NEW)
041            public long increment() throws SystemException {
042                    return counterFinder.increment();
043            }
044    
045            @Override
046            @Transactional(
047                    isolation = Isolation.COUNTER, propagation = Propagation.REQUIRES_NEW)
048            public long increment(String name) throws SystemException {
049                    return counterFinder.increment(name);
050            }
051    
052            @Override
053            @Transactional(
054                    isolation = Isolation.COUNTER, propagation = Propagation.REQUIRES_NEW)
055            public long increment(String name, int size) throws SystemException {
056                    return counterFinder.increment(name, size);
057            }
058    
059            @Override
060            @Transactional(
061                    isolation = Isolation.COUNTER, propagation = Propagation.REQUIRES_NEW)
062            public void rename(String oldName, String newName) throws SystemException {
063                    counterFinder.rename(oldName, newName);
064            }
065    
066            @Override
067            @Transactional(
068                    isolation = Isolation.COUNTER, propagation = Propagation.REQUIRES_NEW)
069            public void reset(String name) throws SystemException {
070                    counterFinder.reset(name);
071            }
072    
073            @Override
074            @Transactional(
075                    isolation = Isolation.COUNTER, propagation = Propagation.REQUIRES_NEW)
076            public void reset(String name, long size) throws SystemException {
077                    counterFinder.reset(name, size);
078            }
079    
080    }