KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > jdo > tools > enhancer > info > ClassInfo


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.jdo.tools.enhancer.info;
13
14 import java.util.*;
15 import java.io.*;
16
17
18
19 /**
20  *
21  */

22 public class ClassInfo {
23     private String JavaDoc className;
24     private String JavaDoc objectidClass;
25     private String JavaDoc persistenceCapableSuperclass;
26     private String JavaDoc topName;
27
28     private ClassInfo topPersistenceCapableSuperclass;
29
30     private Set fieldList = new TreeSet();
31
32     private int identityType;
33     private boolean hasKeyGen;
34     private boolean isInstanceCallbacks = false;
35
36     public boolean isInstanceCallbacks() {
37         return isInstanceCallbacks;
38     }
39
40     public void setInstanceCallbacks(boolean instanceCallbacks) {
41         isInstanceCallbacks = instanceCallbacks;
42     }
43
44     public String JavaDoc getTopName() {
45         return topName;
46     }
47
48     public void setTopName(String JavaDoc topName) {
49         this.topName = topName;
50     }
51
52     public boolean isKeyGen() {
53         return hasKeyGen;
54     }
55
56     public void setKeyGen(boolean hasKeyGen) {
57         this.hasKeyGen = hasKeyGen;
58     }
59
60
61     public ClassInfo() {}
62     /**
63      * Sets class name.
64      */

65     public void setTopPCSuperClass(ClassInfo topPersistenceCapableSuperclass){
66         this.topPersistenceCapableSuperclass = topPersistenceCapableSuperclass;
67     }
68     /**
69      * Gets class name.
70      */

71     public ClassInfo getTopPCSuperClass(){
72         return topPersistenceCapableSuperclass;
73     }
74     /**
75      * Sets class name.
76      */

77     public void setClassName(String JavaDoc className){
78         this.className = className;
79     }
80     /**
81      * Gets class name.
82      */

83     public String JavaDoc getClassName(){
84         return className;
85     }
86     /**
87      * Sets identity type.
88      */

89     public void setIdentityType(int identityType){
90         this.identityType = identityType;
91     }
92     /**
93      * Gets identity type.
94      */

95     public int getIdentityType(){
96         return identityType;
97     }
98     /**
99      * Sets object id class.
100      */

101     public void setObjectidClass(String JavaDoc objectidClass){
102         this.objectidClass = objectidClass;
103     }
104     /**
105      * Gets object id class.
106      */

107     public String JavaDoc getObjectidClass(){
108         return objectidClass;
109     }
110
111     /**
112      * Sets persistence capable super class.
113      */

114     public void setPersistenceCapableSuperclass(String JavaDoc persistenceCapableSuperclass){
115         this.persistenceCapableSuperclass = persistenceCapableSuperclass;
116     }
117     /**
118      * Gets persistence capable super class.
119      */

120     public String JavaDoc getPersistenceCapableSuperclass(){
121         return persistenceCapableSuperclass;
122     }
123
124     /**
125      * Sets field list.
126      */

127     public void setFieldList(Set fieldList){
128         this.fieldList = fieldList;
129     }
130     /**
131      * Gets field list.
132      */

133     public Set getFieldList(){
134         return fieldList;
135     }
136
137
138     public String JavaDoc toString(){
139         return "\n************ Class "+className+"************\n"+
140                 "className = "+className+"\n"+
141                 "identityType = "+identityType+"\n"+
142                 "objectidClass = "+objectidClass+"\n"+
143                 "persistenceCapableSuperclass = "+persistenceCapableSuperclass+"\n"+
144                 "topPersistenceCapableSuperclass= "+(topPersistenceCapableSuperclass == null ? null : topPersistenceCapableSuperclass.className)+"\n"+
145                 "fieldList = "+fieldList+"\n"+
146                 "********************************************\n";
147     }
148 }
149
Popular Tags