001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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    }