001: package com.bm.introspectors;
002:
003: import com.bm.introspectors.relations.EntityReleationInfo;
004:
005: /**
006: * This class represents all informations about persitent fields.
007: *
008: * @author Daniel Wiese
009: * @since 07.10.2005
010: */
011: public class PersistentPropertyInfo {
012:
013: private int length = 255;
014:
015: private boolean isNullable = false;
016:
017: private boolean isEmbeddedClass = false;
018:
019: private boolean isReleation = false;
020:
021: private EntityReleationInfo entityReleationInfo = null;
022:
023: private String dbName;
024:
025: /**
026: * Returns the isNullable.
027: *
028: * @return Returns the isNullable.
029: */
030: public boolean isNullable() {
031: return isNullable;
032: }
033:
034: /**
035: * Sets the isNullable.
036: *
037: * @param isNullable
038: * The isNullable to set.
039: */
040: public void setNullable(boolean isNullable) {
041: this .isNullable = isNullable;
042: }
043:
044: /**
045: * Returns the length.
046: *
047: * @return Returns the length.
048: */
049: public int getLength() {
050: return length;
051: }
052:
053: /**
054: * The length to set.
055: *
056: * @param length
057: * The length to set.
058: */
059: public void setLength(int length) {
060: this .length = length;
061: }
062:
063: /**
064: * Returns the dbName.
065: *
066: * @return Returns the dbName.
067: */
068: public String getDbName() {
069: return dbName;
070: }
071:
072: /**
073: * The dbName to set.
074: *
075: * @param dbName
076: * The dbName to set.
077: */
078: public void setDbName(String dbName) {
079: this .dbName = dbName;
080: }
081:
082: /**
083: * Returns the isEmbeddedClass.
084: *
085: * @return Returns the isEmbeddedClass.
086: */
087: public boolean isEmbeddedClass() {
088: return isEmbeddedClass;
089: }
090:
091: /**
092: * The isEmbeddedClass to set.
093: *
094: * @param isEmbeddedClass
095: * The isEmbeddedClass to set.
096: */
097: public void setEmbeddedClass(boolean isEmbeddedClass) {
098: this .isEmbeddedClass = isEmbeddedClass;
099: }
100:
101: /**
102: * Returns true if thisproperty represents a relation and returns true if
103: * this is a case (the EntityReleationInfo is not null and contains the
104: * relevant informations).
105: *
106: * @return Returns the isReleation.
107: */
108: public boolean isReleation() {
109: return isReleation;
110: }
111:
112: /**
113: * Returns the entityReleationInfo.
114: *
115: * @return Returns the entityReleationInfo.
116: */
117: public EntityReleationInfo getEntityReleationInfo() {
118: return entityReleationInfo;
119: }
120:
121: /**
122: * The entityReleationInfo to set.
123: *
124: * @param entityReleationInfo
125: * The entityReleationInfo to set.
126: */
127: public void setEntityReleationInfo(
128: EntityReleationInfo entityReleationInfo) {
129: this .entityReleationInfo = entityReleationInfo;
130: if (this .entityReleationInfo == null) {
131: this .isReleation = false;
132: } else {
133: this .isReleation = true;
134: }
135: }
136:
137: }
|