Clover Coverage Report - Implementation 2.0.0-SNAPSHOT
Coverage timestamp: Wed Dec 31 1969 19:00:00 EST
../../../../../../img/srcFileCovDistChart0.png 0% of files have more coverage
6   66   4   1.5
0   24   0.67   4
4     1  
1    
 
  DocumentHeaderDaoOjb       Line # 28 6 0% 4 10 0% 0.0
 
No Tests
 
1    /*
2    * Copyright 2005-2007 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.kns.dao.impl;
17   
18    import org.apache.ojb.broker.query.Criteria;
19    import org.apache.ojb.broker.query.QueryFactory;
20    import org.kuali.rice.kns.bo.DocumentHeader;
21    import org.kuali.rice.kns.dao.DocumentHeaderDao;
22    import org.kuali.rice.kns.util.KNSPropertyConstants;
23   
24    /**
25    * This class is the OJB implementation of the DocumentHeaderDao interface.
26    *
27    */
 
28    public class DocumentHeaderDaoOjb extends PlatformAwareDaoBaseOjb implements DocumentHeaderDao {
29    private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(DocumentHeaderDaoOjb.class);
30   
31    private Class documentHeaderBaseClass = DocumentHeader.class;
32   
33    /**
34    * Default constructor
35    */
 
36  0 toggle public DocumentHeaderDaoOjb() {
37  0 super();
38    }
39   
40    /**
41    * @see org.kuali.rice.kns.dao.DocumentHeaderDao#getByDocumentHeaderId(java.lang.String)
42    */
 
43  0 toggle public DocumentHeader getByDocumentHeaderId(String id) {
44  0 Criteria criteria = new Criteria();
45  0 criteria.addEqualTo(KNSPropertyConstants.DOCUMENT_NUMBER, id);
46   
47  0 return (DocumentHeader) getPersistenceBrokerTemplate().getObjectByQuery(QueryFactory.newQuery(getDocumentHeaderBaseClass(), criteria));
48    }
49   
50    /**
51    * Method used to define the {@link DocumentHeader} object to use in case clients need to override the class. Default value is {@link DocumentHeader}.
52    *
53    * @see org.kuali.rice.kns.dao.DocumentHeaderDao#getDocumentHeaderBaseClass()
54    */
 
55  0 toggle public Class getDocumentHeaderBaseClass() {
56  0 return this.documentHeaderBaseClass;
57    }
58   
59    /**
60    * @param documentHeaderBaseClass the documentHeaderBaseClass to set
61    */
 
62  0 toggle public void setDocumentHeaderBaseClass(Class documentHeaderBaseClass) {
63  0 this.documentHeaderBaseClass = documentHeaderBaseClass;
64    }
65   
66    }