001    /**
002     * Copyright (c) 2000-2012 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            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    }