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            )
041            public long increment() {
042                    return counterFinder.increment();
043            }
044    
045            @Override
046            @Transactional(
047                    isolation = Isolation.COUNTER, propagation = Propagation.REQUIRES_NEW
048            )
049            public long increment(String name) {
050                    return counterFinder.increment(name);
051            }
052    
053            @Override
054            @Transactional(
055                    isolation = Isolation.COUNTER, propagation = Propagation.REQUIRES_NEW
056            )
057            public long increment(String name, int size) {
058                    return counterFinder.increment(name, size);
059            }
060    
061            @Override
062            @Transactional(
063                    isolation = Isolation.COUNTER, propagation = Propagation.REQUIRES_NEW
064            )
065            public void rename(String oldName, String newName) {
066                    counterFinder.rename(oldName, newName);
067            }
068    
069            @Override
070            @Transactional(
071                    isolation = Isolation.COUNTER, propagation = Propagation.REQUIRES_NEW
072            )
073            public void reset(String name) {
074                    counterFinder.reset(name);
075            }
076    
077            @Override
078            @Transactional(
079                    isolation = Isolation.COUNTER, propagation = Propagation.REQUIRES_NEW
080            )
081            public void reset(String name, long size) {
082                    counterFinder.reset(name, size);
083            }
084    
085    }