Coverage Report - org.jtheque.primary.services.impl.SagasService
 
Classes in this File Line Coverage Branch Coverage Complexity
SagasService
0 %
0/13
N/A
1
 
 1  
 package org.jtheque.primary.services.impl;
 2  
 
 3  
 /*
 4  
  * This file is part of JTheque.
 5  
  *
 6  
  * JTheque is free software: you can redistribute it and/or modify
 7  
  * it under the terms of the GNU General Public License as published by
 8  
  * the Free Software Foundation, either version 3 of the License.
 9  
  *
 10  
  * JTheque is distributed in the hope that it will be useful,
 11  
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 13  
  * GNU General Public License for more details.
 14  
  *
 15  
  * You should have received a copy of the GNU General Public License
 16  
  * along with JTheque.  If not, see <http://www.gnu.org/licenses/>.
 17  
  */
 18  
 
 19  
 import org.jtheque.core.managers.persistence.able.DataListener;
 20  
 import org.jtheque.primary.dao.able.IDaoSagas;
 21  
 import org.jtheque.primary.od.able.Saga;
 22  
 import org.jtheque.primary.services.able.ISagasService;
 23  
 import org.springframework.transaction.annotation.Transactional;
 24  
 
 25  
 import javax.annotation.Resource;
 26  
 import java.util.Collection;
 27  
 
 28  
 /**
 29  
  * A sagas service implementation.
 30  
  *
 31  
  * @author Baptiste Wicht
 32  
  */
 33  0
 public final class SagasService implements ISagasService {
 34  
     @Resource
 35  
     private IDaoSagas daoSagas;
 36  
 
 37  
     @Override
 38  
     @Transactional
 39  
     public void create(Saga saga) {
 40  0
         daoSagas.create(saga);
 41  0
     }
 42  
 
 43  
     @Override
 44  
     @Transactional
 45  
     public void save(Saga saga) {
 46  0
         daoSagas.save(saga);
 47  0
     }
 48  
 
 49  
     @Override
 50  
     @Transactional
 51  
     public boolean delete(Saga saga) {
 52  0
         return daoSagas.delete(saga);
 53  
     }
 54  
 
 55  
     @Override
 56  
     public Saga getEmptySaga() {
 57  0
         return daoSagas.createSaga();
 58  
     }
 59  
 
 60  
     @Override
 61  
     public Collection<Saga> getDatas() {
 62  0
         return daoSagas.getSagas();
 63  
     }
 64  
 
 65  
     @Override
 66  
     public void addDataListener(DataListener listener) {
 67  0
         daoSagas.addDataListener(listener);
 68  0
     }
 69  
 
 70  
     @Override
 71  
     @Transactional
 72  
     public void clearAll() {
 73  0
         daoSagas.clearAll();
 74  0
     }
 75  
 
 76  
     @Override
 77  
     public String getDataType() {
 78  0
         return DATA_TYPE;
 79  
     }
 80  
 }