001    /**
002     * Copyright (c) 2000-2010 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.annotation.Isolation;
020    import com.liferay.portal.kernel.annotation.Propagation;
021    import com.liferay.portal.kernel.annotation.Transactional;
022    import com.liferay.portal.kernel.exception.SystemException;
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            public List<String> getNames() throws SystemException {
034                    return counterFinder.getNames();
035            }
036    
037            @Transactional(
038                    isolation = Isolation.COUNTER, propagation = Propagation.REQUIRES_NEW)
039            public long increment() throws SystemException {
040                    return counterFinder.increment();
041            }
042    
043            @Transactional(
044                    isolation = Isolation.COUNTER, propagation = Propagation.REQUIRES_NEW)
045            public long increment(String name) throws SystemException {
046                    return counterFinder.increment(name);
047            }
048    
049            @Transactional(
050                    isolation = Isolation.COUNTER, propagation = Propagation.REQUIRES_NEW)
051            public long increment(String name, int size) throws SystemException {
052                    return counterFinder.increment(name, size);
053            }
054    
055            @Transactional(
056                    isolation = Isolation.COUNTER, propagation = Propagation.REQUIRES_NEW)
057            public void rename(String oldName, String newName) throws SystemException {
058                    counterFinder.rename(oldName, newName);
059            }
060    
061            @Transactional(
062                    isolation = Isolation.COUNTER, propagation = Propagation.REQUIRES_NEW)
063            public void reset(String name) throws SystemException {
064                    counterFinder.reset(name);
065            }
066    
067            @Transactional(
068                    isolation = Isolation.COUNTER, propagation = Propagation.REQUIRES_NEW)
069            public void reset(String name, long size) throws SystemException {
070                    counterFinder.reset(name, size);
071            }
072    
073    }