01: package net.sourceforge.squirrel_sql.plugins.hibernate.mapping;
02:
03: public class HibernatePropertyInfo {
04: private String _propertyName;
05: private String _className;
06: private String _tableName;
07: private String[] _columnNames;
08: private String _toString;
09: private String _collectionClassName;
10: private boolean _identifier;
11: private String _classNameRegardingCollection;
12:
13: public HibernatePropertyInfo(String propertyName, String className,
14: String tableName, String[] columnNames) {
15: _propertyName = propertyName;
16: _className = className;
17: _tableName = tableName;
18: _columnNames = columnNames;
19: initStrings();
20: }
21:
22: public void setCollectionClassName(String collectionClassName) {
23: _collectionClassName = collectionClassName;
24: initStrings();
25: }
26:
27: private void initStrings() {
28: _classNameRegardingCollection = null == _collectionClassName ? _className
29: : _collectionClassName + "<" + _className + ">";
30:
31: _toString = _propertyName + " " + _classNameRegardingCollection;
32: }
33:
34: public String getPropertyName() {
35: return _propertyName;
36: }
37:
38: public String getClassName() {
39: return _className;
40: }
41:
42: public String toString() {
43: return _toString;
44: }
45:
46: public String getCollectionClassName() {
47: return _collectionClassName;
48: }
49:
50: public void setIdentifier(boolean identifier) {
51: _identifier = identifier;
52: }
53:
54: public boolean isIdentifier() {
55: return _identifier;
56: }
57:
58: public String getTableName() {
59: return _tableName;
60: }
61:
62: public String[] getColumnNames() {
63: return _columnNames;
64: }
65:
66: public String getClassNameRegardingCollection() {
67: return _classNameRegardingCollection;
68: }
69: }
|