KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > bridge > util > NodeWrapper


1 /*
2
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8
9 */

10
11 package org.mmbase.bridge.util;
12
13 import org.mmbase.bridge.*;
14 import java.util.*;
15 import org.w3c.dom.Element JavaDoc;
16 import org.w3c.dom.Document JavaDoc;
17 import org.mmbase.util.functions.Function;
18 import org.mmbase.util.functions.Parameters;
19
20 /**
21  * Wraps another Node. You can use this if you want to implement Node, and want to base that
22  * implementation on a existing <code>Node</code> instance.
23  *
24  * @author Michiel Meeuwissen
25  * @version $Id: NodeWrapper.java,v 1.15 2006/07/18 13:03:19 michiel Exp $
26  * @since MMBase-1.8
27  */

28
29 public abstract class NodeWrapper implements Node, Comparable JavaDoc {
30     protected final Node node;
31     public NodeWrapper(Node node) {
32         assert node != null;
33         this.node = node;
34     }
35     public Cloud getCloud() { return node.getCloud(); }
36     public NodeManager getNodeManager() { return node.getNodeManager(); }
37     public int getNumber() { return node.getNumber(); }
38     public boolean isRelation() { return node.isRelation(); }
39     public Relation toRelation() { return node.toRelation(); }
40     public boolean isNodeManager() { return node.isNodeManager();}
41     public NodeManager toNodeManager() { return node.toNodeManager(); }
42     public boolean isRelationManager() { return node.isRelationManager(); }
43     public RelationManager toRelationManager() { return node.toRelationManager(); }
44     public void setValue(String JavaDoc fieldName, Object JavaDoc value) { node.setValue(fieldName, value); }
45     public void setValueWithoutProcess(String JavaDoc fieldName, Object JavaDoc value) { node.setValueWithoutProcess(fieldName, value); }
46     public void setObjectValue(String JavaDoc fieldName, Object JavaDoc value) { node.setObjectValue(fieldName, value); }
47     public void setBooleanValue(String JavaDoc fieldName, boolean value) { node.setBooleanValue(fieldName, value); }
48     public void setNodeValue(String JavaDoc fieldName, Node value) { node.setNodeValue(fieldName, value); }
49     public void setIntValue(String JavaDoc fieldName, int value) { node.setIntValue(fieldName, value); }
50     public void setFloatValue(String JavaDoc fieldName, float value) { node.setFloatValue(fieldName, value); }
51     public void setDoubleValue(String JavaDoc fieldName, double value) { node.setDoubleValue(fieldName, value); }
52     public void setByteValue(String JavaDoc fieldName, byte[] value) { node.setByteValue(fieldName, value); }
53     public void setInputStreamValue(String JavaDoc fieldName, java.io.InputStream JavaDoc value, long size) { node.setInputStreamValue(fieldName, value, size); }
54     public void setLongValue(String JavaDoc fieldName, long value) { node.setLongValue(fieldName, value); }
55     public void setStringValue(String JavaDoc fieldName, String JavaDoc value) { node.setStringValue(fieldName, value); }
56     public void setDateValue(String JavaDoc fieldName, Date value) { node.setDateValue(fieldName, value); }
57     public void setListValue(String JavaDoc fieldName, List value) { node.setListValue(fieldName, value); }
58     public boolean isNull(String JavaDoc fieldName) { return node.isNull(fieldName); }
59     public long getSize(String JavaDoc fieldName) { return node.getSize(fieldName); }
60     public Object JavaDoc getValue(String JavaDoc fieldName) { return node.getValue(fieldName); }
61     public Object JavaDoc getValueWithoutProcess(String JavaDoc fieldName) { return node.getValueWithoutProcess(fieldName); }
62     public Object JavaDoc getObjectValue(String JavaDoc fieldName) { return node.getObjectValue(fieldName); }
63     public boolean getBooleanValue(String JavaDoc fieldName) { return node.getBooleanValue(fieldName); }
64     public Node getNodeValue(String JavaDoc fieldName) { return node.getNodeValue(fieldName); }
65     public int getIntValue(String JavaDoc fieldName) { return node.getIntValue(fieldName); }
66     public float getFloatValue(String JavaDoc fieldName) { return node.getFloatValue(fieldName); }
67     public long getLongValue(String JavaDoc fieldName) { return node.getLongValue(fieldName); }
68     public double getDoubleValue(String JavaDoc fieldName) { return node.getDoubleValue(fieldName); }
69     public byte[] getByteValue(String JavaDoc fieldName) { return node.getByteValue(fieldName); }
70     public java.io.InputStream JavaDoc getInputStreamValue(String JavaDoc fieldName) { return node.getInputStreamValue(fieldName); }
71     public String JavaDoc getStringValue(String JavaDoc fieldName) { return node.getStringValue(fieldName); }
72     public Date getDateValue(String JavaDoc fieldName) { return node.getDateValue(fieldName); }
73     public List getListValue(String JavaDoc fieldName) { return node.getListValue(fieldName); }
74     public FieldValue getFieldValue(String JavaDoc fieldName) throws NotFoundException {
75         return node.getFieldValue(fieldName);
76     }
77     public FieldValue getFieldValue(Field field) { return node.getFieldValue(field); }
78     public Collection validate() { return node.validate(); }
79     public void commit() { node.commit(); }
80     public void cancel() { node.cancel(); }
81     public boolean isNew() { return node.isNew(); }
82     public boolean isChanged(String JavaDoc fieldName) { return node.isChanged(fieldName); }
83     public boolean isChanged() { return node.isChanged(); }
84     public Set getChanged() { return node.getChanged(); }
85     public void delete() { node.delete(); }
86     public void delete(boolean deleteRelations) { node.delete(deleteRelations); }
87     public String JavaDoc toString() { return node.toString(); }
88     public Document JavaDoc getXMLValue(String JavaDoc fieldName) throws IllegalArgumentException JavaDoc {
89         return node.getXMLValue(fieldName);
90     }
91     public Element JavaDoc getXMLValue(String JavaDoc fieldName, Document JavaDoc tree) throws IllegalArgumentException JavaDoc {
92         return node.getXMLValue(fieldName, tree);
93     }
94     public void setXMLValue(String JavaDoc fieldName, Document JavaDoc value) { node.setXMLValue(fieldName, value); }
95     public boolean hasRelations() { return node.hasRelations(); }
96     public void deleteRelations() { node.deleteRelations(); };
97     public void deleteRelations(String JavaDoc relationManager) { node.deleteRelations(relationManager); }
98     public RelationList getRelations() { return node.getRelations(); }
99     public RelationList getRelations(String JavaDoc role) { return node.getRelations(role); }
100     public RelationList getRelations(String JavaDoc role, String JavaDoc nodeManager) { return node.getRelations(role, nodeManager); }
101     public RelationList getRelations(String JavaDoc role, NodeManager nodeManager) { return node.getRelations(role, nodeManager); }
102     public RelationList getRelations(String JavaDoc role, NodeManager nodeManager, String JavaDoc searchDir) { return node.getRelations(role, nodeManager, searchDir); }
103     public int countRelations() { return node.countRelations(); }
104     public int countRelations(String JavaDoc relationManager) { return node.countRelations(relationManager); }
105     public NodeList getRelatedNodes() { return node.getRelatedNodes(); }
106     public NodeList getRelatedNodes(String JavaDoc nodeManager) { return node.getRelatedNodes(nodeManager); }
107     public NodeList getRelatedNodes(NodeManager nodeManager) { return node.getRelatedNodes(nodeManager); }
108     public NodeList getRelatedNodes(String JavaDoc nodeManager, String JavaDoc role, String JavaDoc searchDir) { return node.getRelatedNodes(nodeManager, role, searchDir); }
109     public NodeList getRelatedNodes(NodeManager nodeManager, String JavaDoc role, String JavaDoc searchDir) { return node.getRelatedNodes(nodeManager, role, searchDir); }
110     public int countRelatedNodes(String JavaDoc nodeManager) { return node.countRelatedNodes(nodeManager); }
111     public int countRelatedNodes(NodeManager otherNodeManager, String JavaDoc role, String JavaDoc searchDir) { return node.countRelatedNodes(otherNodeManager, role, searchDir); }
112     public StringList getAliases() { return node.getAliases(); }
113     public void createAlias(String JavaDoc alias) { node.createAlias(alias); }
114     public void deleteAlias(String JavaDoc alias) { node.deleteAlias(alias); }
115     public Relation createRelation(Node destinationNode, RelationManager relationManager) { return node.createRelation(destinationNode, relationManager); }
116     public void setContext(String JavaDoc context) { node.setContext(context); }
117     public String JavaDoc getContext() { return node.getContext(); }
118     public StringList getPossibleContexts() { return node.getPossibleContexts(); }
119     public boolean mayWrite() { return node.mayWrite(); }
120     public boolean mayDelete() { return node.mayDelete(); }
121     public boolean mayChangeContext() { return node.mayChangeContext(); }
122     public Collection getFunctions() { return node.getFunctions(); }
123     public Function getFunction(String JavaDoc functionName) { return node.getFunction(functionName); }
124     public Parameters createParameters(String JavaDoc functionName) { return node.createParameters(functionName); }
125     public FieldValue getFunctionValue(String JavaDoc functionName, List parameters) { return node.getFunctionValue(functionName, parameters);}
126
127
128     public int hashCode() { return node.hashCode(); }
129     public boolean equals(Object JavaDoc o) { return node.equals(o); }
130     public int compareTo(Object JavaDoc o) { return node.compareTo(o); }
131
132     public Node getNode() {
133         return node;
134     }
135 }
136
Popular Tags