|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
LogDatabinder.java | - | 0% | 0% | 0% |
|
1 |
/*
|
|
2 |
* Joey and its relative products are published under the terms
|
|
3 |
* of the Apache Software License.
|
|
4 |
*/
|
|
5 |
/*
|
|
6 |
* Created on 2004/02/29
|
|
7 |
*/
|
|
8 |
package org.asyrinx.brownie.hibernate.logger;
|
|
9 |
|
|
10 |
import java.util.Collection;
|
|
11 |
|
|
12 |
import javax.xml.transform.TransformerException;
|
|
13 |
|
|
14 |
import net.sf.hibernate.Databinder;
|
|
15 |
import net.sf.hibernate.HibernateException;
|
|
16 |
|
|
17 |
import org.asyrinx.brownie.core.log.CascadeNamedLog;
|
|
18 |
import org.asyrinx.brownie.hibernate.wrapper.DatabinderWrapper;
|
|
19 |
import org.w3c.dom.Document;
|
|
20 |
|
|
21 |
/**
|
|
22 |
* @author akima
|
|
23 |
*/
|
|
24 |
public class LogDatabinder extends DatabinderWrapper { |
|
25 |
|
|
26 |
/**
|
|
27 |
* @param wrapped
|
|
28 |
* @param log
|
|
29 |
*/
|
|
30 | 0 |
public LogDatabinder(Databinder wrapped, CascadeNamedLog parentLog) {
|
31 | 0 |
super(wrapped);
|
32 | 0 |
this.log = parentLog.subLog(wrapped);
|
33 |
} |
|
34 |
|
|
35 |
protected final CascadeNamedLog log;
|
|
36 |
|
|
37 |
/**
|
|
38 |
* @see net.sf.hibernate.Databinder#bind(java.lang.Object)
|
|
39 |
*/
|
|
40 | 0 |
public Databinder bind(Object object) {
|
41 | 0 |
log.log("bind(" + object + ")"); |
42 | 0 |
return new LogDatabinder(super.bind(object), log); |
43 |
} |
|
44 |
|
|
45 |
/**
|
|
46 |
* @see net.sf.hibernate.Databinder#bindAll(java.util.Collection)
|
|
47 |
*/
|
|
48 | 0 |
public Databinder bindAll(Collection objects) {
|
49 | 0 |
log.log("bindAll(" + objects + ")"); |
50 | 0 |
return new LogDatabinder(super.bindAll(objects), log); |
51 |
} |
|
52 |
|
|
53 |
/**
|
|
54 |
* @see net.sf.hibernate.Databinder#setInitializeLazy(boolean)
|
|
55 |
*/
|
|
56 | 0 |
public void setInitializeLazy(boolean initializeLazy) { |
57 | 0 |
super.setInitializeLazy(initializeLazy);
|
58 |
} |
|
59 |
|
|
60 |
/**
|
|
61 |
* @see net.sf.hibernate.Databinder#toDOM()
|
|
62 |
*/
|
|
63 | 0 |
public Document toDOM() throws HibernateException, TransformerException { |
64 | 0 |
return super.toDOM(); |
65 |
} |
|
66 |
|
|
67 |
/**
|
|
68 |
* @see net.sf.hibernate.Databinder#toGenericDOM()
|
|
69 |
*/
|
|
70 | 0 |
public Document toGenericDOM() throws HibernateException { |
71 | 0 |
return super.toGenericDOM(); |
72 |
} |
|
73 |
|
|
74 |
/**
|
|
75 |
* @see net.sf.hibernate.Databinder#toGenericXML()
|
|
76 |
*/
|
|
77 | 0 |
public String toGenericXML() throws HibernateException { |
78 | 0 |
return super.toGenericXML(); |
79 |
} |
|
80 |
|
|
81 |
/**
|
|
82 |
* @see net.sf.hibernate.Databinder#toXML()
|
|
83 |
*/
|
|
84 | 0 |
public String toXML() throws HibernateException, TransformerException { |
85 | 0 |
return super.toXML(); |
86 |
} |
|
87 |
|
|
88 |
} |
|