Package helma.objectmodel.db
Class DbColumn
- java.lang.Object
-
- helma.objectmodel.db.DbColumn
-
public final class DbColumn extends java.lang.Object
A class that encapsulates the Column name and data type of a column in a relational table.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Get the column name.Relation
getRelation()
Return the relation associated with this column.int
getType()
Get this columns SQL data type.boolean
isIdField()
Returns true if this column serves as ID field for the prototype.boolean
isMapped()
Returns true if this field is mapped by the prototype's db mapping.boolean
isNameField()
Returns true if this column serves as name field for the prototype.boolean
isPrototypeField()
Returns true if this column serves as prototype field for the prototype.boolean
needsQuotes()
Checks whether values for this column need to be quoted in insert/update stmts
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the column name.
-
getType
public int getType()
Get this columns SQL data type.
-
getRelation
public Relation getRelation()
Return the relation associated with this column. May be null.
-
isIdField
public boolean isIdField()
Returns true if this column serves as ID field for the prototype.
-
isPrototypeField
public boolean isPrototypeField()
Returns true if this column serves as prototype field for the prototype.
-
isNameField
public boolean isNameField()
Returns true if this column serves as name field for the prototype.
-
isMapped
public boolean isMapped()
Returns true if this field is mapped by the prototype's db mapping.
-
needsQuotes
public boolean needsQuotes()
Checks whether values for this column need to be quoted in insert/update stmts- Returns:
- true if values need to be wrapped in quotes
-
-