001    /**
002     * Copyright (c) 2000-2010 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.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.SERIALIZABLE,
039                    propagation = Propagation.REQUIRES_NEW)
040            public long increment() throws SystemException {
041                    return counterFinder.increment();
042            }
043    
044            @Transactional(
045                    isolation = Isolation.SERIALIZABLE,
046                    propagation = Propagation.REQUIRES_NEW)
047            public long increment(String name) throws SystemException {
048                    return counterFinder.increment(name);
049            }
050    
051            @Transactional(
052                    isolation = Isolation.SERIALIZABLE,
053                    propagation = Propagation.REQUIRES_NEW)
054            public long increment(String name, int size) throws SystemException {
055                    return counterFinder.increment(name, size);
056            }
057    
058            @Transactional(
059                    isolation = Isolation.SERIALIZABLE,
060                    propagation = Propagation.REQUIRES_NEW)
061            public void rename(String oldName, String newName) throws SystemException {
062                    counterFinder.rename(oldName, newName);
063            }
064    
065            @Transactional(
066                    isolation = Isolation.SERIALIZABLE,
067                    propagation = Propagation.REQUIRES_NEW)
068            public void reset(String name) throws SystemException {
069                    counterFinder.reset(name);
070            }
071    
072            @Transactional(
073                    isolation = Isolation.SERIALIZABLE,
074                    propagation = Propagation.REQUIRES_NEW)
075            public void reset(String name, long size) throws SystemException {
076                    counterFinder.reset(name, size);
077            }
078    
079    }