01: // $Id: Property.java 5814 2005-02-21 02:08:46Z oneovthafew $
02: package org.hibernate.tuple;
03:
04: import org.hibernate.type.Type;
05:
06: import java.io.Serializable;
07:
08: /**
09: * Defines the basic contract of a Property within the runtime metamodel.
10: *
11: * @author Steve Ebersole
12: */
13: public abstract class Property implements Serializable {
14: private String name;
15: private String node;
16: private Type type;
17:
18: /**
19: * Constructor for Property instances.
20: *
21: * @param name The name by which the property can be referenced within
22: * its owner.
23: * @param node The node name to use for XML-based representation of this
24: * property.
25: * @param type The Hibernate Type of this property.
26: */
27: protected Property(String name, String node, Type type) {
28: this .name = name;
29: this .node = node;
30: this .type = type;
31: }
32:
33: public String getName() {
34: return name;
35: }
36:
37: public String getNode() {
38: return node;
39: }
40:
41: public Type getType() {
42: return type;
43: }
44:
45: public String toString() {
46: return "Property(" + name + ':' + type.getName() + ')';
47: }
48:
49: }
|