- 
Field SummaryFields 
protected int
   protected boolean
 
Defines whether this column value is generated by the database. 
 protected boolean
 
Defines whether the attribute allows nulls. 
 protected int
   protected boolean
 
Defines whether the attribute is a part of the table primary key. 
 protected int
   protected int
 
Defines JDBC type of the column. 
 
 
- 
Constructor SummaryConstructors 
- 
Method Summary
<T> T
   void
 
Prints itself as XML to the provided XMLEncoder. 
   int
   
Returns parent entity that holds this attribute. 
   int
 
Returns the length of database column described by this attribute. 
 int
 
Returns the number of digits after period for decimal attributes. 
 int
 
Returns the SQL type of the column. 
 boolean
 
Returns trueif the DB column represented by this attribute
 is a foreign key, referencing another table.
 
 boolean
 
Returns true if this column value is generated by the database. 
 boolean
   boolean
   void
   void
 
Updates attribute "generated" property. 
 void
   void
 
Sets the length of character or binary type or max num of digits for
 DECIMAL. 
 void
 
Updates attribute "primaryKey" property. 
 void
   void
 
Sets the SQL type for the column. 
   
 
 
 
- 
Field Details
- 
typeprotected int type Defines JDBC type of the column. 
- 
mandatoryprotected boolean mandatory Defines whether the attribute allows nulls. 
- 
primaryKeyprotected boolean primaryKey Defines whether the attribute is a part of the table primary key. 
- 
generatedprotected boolean generated Defines whether this column value is generated by the database. Other
 terms for such columns are "auto-increment" or "identity". 
- Since:
- 1.2
 
- 
maxLengthprotected int maxLength 
- 
scaleprotected int scale 
- Since:
- 3.0
 
- 
attributePrecisionprotected int attributePrecision 
- Since:
- 3.0
 
 
- 
Constructor Details
- 
DbAttributepublic DbAttribute() 
- 
DbAttributepublic DbAttribute(String name) 
- 
 
- 
Method Details
- 
- 
- 
- 
- 
getTypepublic int getType() Returns the SQL type of the column. 
- See Also:
- 
 
- 
setTypepublic void setType(int type) Sets the SQL type for the column. 
- See Also:
- 
 
- 
isPrimaryKeypublic boolean isPrimaryKey() 
- 
isForeignKeypublic boolean isForeignKey() Returns trueif the DB column represented by this attribute
 is a foreign key, referencing another table.
 
- Since:
- 1.1
 
- 
setPrimaryKeypublic void setPrimaryKey(boolean primaryKey) Updates attribute "primaryKey" property. 
- 
isMandatorypublic boolean isMandatory() 
- 
setMandatorypublic void setMandatory(boolean mandatory) 
- 
getMaxLengthpublic int getMaxLength() Returns the length of database column described by this attribute. 
- 
setMaxLengthpublic void setMaxLength(int maxLength) Sets the length of character or binary type or max num of digits for
 DECIMAL. 
- 
isGeneratedpublic boolean isGenerated() Returns true if this column value is generated by the database. Other
 terms for such columns are "auto-increment" or "identity". 
- Since:
- 1.2
 
- 
setGeneratedpublic void setGenerated(boolean generated) Updates attribute "generated" property. 
- Since:
- 1.2
 
- 
getAttributePrecisionpublic int getAttributePrecision() 
- Since:
- 3.0
 
- 
setAttributePrecisionpublic void setAttributePrecision(int attributePrecision) 
- Since:
- 3.0
 
- 
getScalepublic int getScale() Returns the number of digits after period for decimal attributes. Returns
 "-1" if not set. 
- Since:
- 3.0
 
- 
setScalepublic void setScale(int scale) 
- Since:
- 3.0
 
- 
getJavaClass
- Returns:
- java class guessed by the JDBC type of this attribute
- Since:
- 5.0
 
-