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