|
JDBaccess API 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jdbaccess.transfer.Field
public class Field
Fields are similar to table columns. Fields are part of transfer objects and as a special case are part of rows. Fields have a type, a position, a name, a minimum value, a maximum value, a default value, a length, a flag for required, a flag for hidden, a flag for read only, a maximal precision and scale (if a number field), a sql type and an entity name.
Constructor Summary | |
---|---|
Field()
Constructs a field |
|
Field(java.lang.String name,
java.lang.Class type)
Constructs a field with a field name and a type |
Method Summary | |
---|---|
java.lang.Object |
getDefaultValue()
Returns the default value of this field |
java.lang.String |
getEntity()
Gets the entity name |
long |
getLength()
Returns the legth of this field |
int |
getMaxPrecision()
Returns the default maximum precision of this field |
int |
getMaxScale()
Returns the default maximum scale of this field |
java.lang.Object |
getMaxValue()
Returns the default maximum value of this field |
java.lang.Object |
getMinValue()
Returns the default minimum value of this field |
java.lang.String |
getName()
Returns the name of this field |
int |
getPosition()
Gets the position of this field in result (e.g. for table column ordering) beginning at 1 |
java.lang.Integer |
getSQLType()
Gets the sql type of this field |
java.lang.Class |
getType()
Returns the type of this field (e.g. |
boolean |
isHidden()
Returns true if hidden else false. |
boolean |
isReadOnly()
Returns true if read only else false |
boolean |
isRequired()
Returns true if required else false |
void |
setDefaultValue(java.lang.Object defaultValue)
Sets the default value of this field |
void |
setEntity(java.lang.String string)
Sets the entity name of this field |
void |
setHidden(boolean hidden)
Sets the hidden flag of this field |
void |
setLength(long length)
Sets the length for this field |
void |
setMaxPrecision(int maxPrecision)
Sets the maximum precision for this field |
void |
setMaxScale(int maxScale)
Sets the maximum scale for this field |
void |
setMaxValue(java.lang.Object maxValue)
Sets the maximum value for this field |
void |
setMinValue(java.lang.Object minValue)
Sets the minimum value for this field |
void |
setName(java.lang.String name)
Sets the name of this field |
void |
setPosition(int position)
Sets the position of this field in result (e.g. for table column ordering) beginning at 1 |
void |
setReadOnly(boolean readOnly)
Sets the read only flag of this field |
void |
setRequired(boolean required)
Sets the required flag of this field |
void |
setSQLType(java.lang.Integer sqlType)
Sets the sql type of this field |
void |
setType(java.lang.Class type)
Sets the type of this field |
java.lang.String |
toString()
Gets the String representation of this field |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Field()
public Field(java.lang.String name, java.lang.Class type)
name
- name of this fieldtype
- type of this field (e.g. Date.class for a Date-Field)Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object getDefaultValue()
public boolean isHidden()
public long getLength()
public int getMaxPrecision()
public int getMaxScale()
public java.lang.Object getMaxValue()
public java.lang.Object getMinValue()
public java.lang.String getName()
public boolean isReadOnly()
public boolean isRequired()
public java.lang.Class getType()
public void setDefaultValue(java.lang.Object defaultValue)
defaultValue
- default value of this fieldpublic void setHidden(boolean hidden)
hidden
- if true set field to hidden else it is visiblepublic void setLength(long length)
length
- length for this fieldpublic void setMaxPrecision(int maxPrecision)
maxPrecision
- maximum precision for this fieldpublic void setMaxScale(int maxScale)
maxScale
- maximum scale for this fieldpublic void setMaxValue(java.lang.Object maxValue)
maxValue
- maximum value for this fieldpublic void setMinValue(java.lang.Object minValue)
minValue
- minimum value for this fieldpublic void setName(java.lang.String name)
name
- name of this fieldpublic void setReadOnly(boolean readOnly)
readOnly
- if true set field to read only else it is also writablepublic void setRequired(boolean required)
required
- if true set field to required else it is optionalpublic void setType(java.lang.Class type)
type
- type the type of this field (e.g. Date.class for a Date-Field)public void setSQLType(java.lang.Integer sqlType)
sqlType
- sql type of this field as an Integerpublic java.lang.Integer getSQLType()
public java.lang.String getEntity()
public void setEntity(java.lang.String string)
string
- table name of this fieldpublic int getPosition()
public void setPosition(int position)
position
- position to set
|
JDBaccess API 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |