KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > tuple > Property


1 // $Id: Property.java,v 1.3 2005/02/21 02:08:45 oneovthafew Exp $
2
package org.hibernate.tuple;
3
4 import org.hibernate.type.Type;
5
6 import java.io.Serializable JavaDoc;
7
8 /**
9  * Defines the basic contract of a Property within the runtime metamodel.
10  *
11  * @author Steve Ebersole
12  */

13 public abstract class Property implements Serializable JavaDoc {
14     private String JavaDoc name;
15     private String JavaDoc 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 JavaDoc name, String JavaDoc node, Type type) {
28         this.name = name;
29         this.node = node;
30         this.type = type;
31     }
32
33     public String JavaDoc getName() {
34         return name;
35     }
36
37     public String JavaDoc getNode() {
38         return node;
39     }
40
41     public Type getType() {
42         return type;
43     }
44     
45     public String JavaDoc toString() {
46         return "Property(" + name + ':' + type.getName() + ')';
47     }
48
49 }
50
Popular Tags