Coverage Report - org.kuali.rice.krad.util.KualiPersistenceBrokerImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
KualiPersistenceBrokerImpl
0%
0/17
N/A
1
 
 1  
 /**
 2  
  * Copyright 2005-2011 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.krad.util;
 17  
 
 18  
 import org.apache.log4j.Logger;
 19  
 import org.apache.ojb.broker.PBKey;
 20  
 import org.apache.ojb.broker.TransactionAbortedException;
 21  
 import org.apache.ojb.broker.TransactionInProgressException;
 22  
 import org.apache.ojb.broker.TransactionNotInProgressException;
 23  
 import org.apache.ojb.broker.core.PersistenceBrokerFactoryIF;
 24  
 import org.apache.ojb.broker.core.PersistenceBrokerImpl;
 25  
 
 26  
 public class KualiPersistenceBrokerImpl extends PersistenceBrokerImpl {
 27  0
     private static final Logger LOG = Logger.getLogger(KualiPersistenceBrokerImpl.class);
 28  
 
 29  
 
 30  0
     private boolean fresh = true;
 31  
 
 32  
     public KualiPersistenceBrokerImpl(PBKey key, PersistenceBrokerFactoryIF pbf) {
 33  0
         super(key, pbf);
 34  0
     }
 35  
 
 36  
     public boolean isFresh() {
 37  0
         return fresh;
 38  
     }
 39  
 
 40  
 
 41  
     /**
 42  
      * @see org.apache.ojb.broker.core.PersistenceBrokerImpl#beginTransaction()
 43  
      */
 44  
     public synchronized void beginTransaction() throws TransactionInProgressException, TransactionAbortedException {
 45  0
         LOG.debug("beginning transaction for persistenceBroker " + getClass().getName() + "@" + hashCode());
 46  
 
 47  0
         super.beginTransaction();
 48  0
     }
 49  
 
 50  
     /**
 51  
      * @see org.apache.ojb.broker.core.PersistenceBrokerImpl#abortTransaction()
 52  
      */
 53  
     public synchronized void abortTransaction() throws TransactionNotInProgressException {
 54  0
         LOG.debug("aborting transaction for persistenceBroker " + getClass().getName() + "@" + hashCode());
 55  
 
 56  0
         super.abortTransaction();
 57  0
     }
 58  
 
 59  
     /**
 60  
      * @see org.apache.ojb.broker.core.PersistenceBrokerImpl#commitTransaction()
 61  
      */
 62  
     public synchronized void commitTransaction() throws TransactionNotInProgressException, TransactionAbortedException {
 63  0
         LOG.debug("committing transaction for persistenceBroker " + getClass().getName() + "@" + hashCode());
 64  
 
 65  0
         super.commitTransaction();
 66  0
     }
 67  
 
 68  
     /**
 69  
      * @see org.apache.ojb.broker.core.PersistenceBrokerImpl#close()
 70  
      */
 71  
     public boolean close() {
 72  0
         LOG.debug("closing persistenceBroker " + getClass().getName() + "@" + hashCode());
 73  0
         fresh = false;
 74  
 
 75  0
         return super.close();
 76  
     }
 77  
 }