public class FieldDescriptorJDONature extends BaseNature
FieldDescriptor
.FieldDescriptor
to include persistence-specific data such as
e.g. the column names, types and other SQL-related information.FieldDescriptor
, use the
following code fragment to ...
FieldDescriptor
in question.FieldDescriptor fieldDescriptor = ...; ... if (fieldDescriptor.hasNature(FieldDescriptorJDONature.class.getName()) { 1) FieldDescriptorJDONature nature = new FieldDescriptorJDONature(fieldDescriptor); 2) ... String columnName = nature.getColumnName; 3) }
Constructor and Description |
---|
FieldDescriptorJDONature(PropertyHolder holder)
Creates an instance of
FieldDescriptorJDONature . |
Modifier and Type | Method and Description |
---|---|
String |
getCascading()
Returns the cascading types for the given field.
|
TypeConvertor |
getConvertor()
Returns the convertor from the field type to an external type.
|
String |
getId() |
String[] |
getManyKey()
Returns the SQL many key of the field.
|
String |
getManyTable()
Returns the SQL many table of the field.
|
String[] |
getSQLName()
Returns the SQL (column) name of the field.
|
int[] |
getSQLType()
Returns the SQL type of this field.
|
boolean |
isDirtyCheck()
Returns true if dirty checking is required for this field.
|
boolean |
isReadonly()
Returns true if field access is read only.
|
boolean |
isTransient()
Returns true if transient is set for this field.
|
void |
setCascading(String cascading)
Sets the cascading values for the given field.
|
void |
setDirtyCheck(boolean dirtyCheck)
Sets whether dirty checking is required for this field.
|
void |
setManyKey(String[] manyKey)
Sets the SQL many key of the field.
|
void |
setManyTable(String manyTable)
Sets the SQL many table of the field.
|
void |
setReadOnly(boolean readOnly)
Sets whether field access if read-only.
|
void |
setSQLName(String[] sqlName)
Sets the SQL (column) name of the field.
|
void |
setSQLType(int[] sqlType)
Sets the SQL type of this field.
|
void |
setTransient(boolean isTransient)
Sets whether this field should be transient.
|
void |
setTypeConvertor(TypeConvertor typeConvertor)
Sets the
TypeConvertor used for converting from field types to
external types. |
getBooleanPropertyDefaultFalse, getHolder, getProperty, getPropertyAsList, getPropertyAsMap, setProperty
public FieldDescriptorJDONature(PropertyHolder holder)
FieldDescriptorJDONature
.holder
- The PropertyHolder
to 'view upon'.public String getId()
Nature.getId()
public String[] getSQLName()
public void setSQLName(String[] sqlName)
sqlName
- The SQL (column) name.public String[] getManyKey()
public void setManyKey(String[] manyKey)
manyKey
- The SQL (many key.public String getManyTable()
public void setManyTable(String manyTable)
manyTable
- The SQL many table.public boolean isReadonly()
public void setReadOnly(boolean readOnly)
readOnly
- True if field access is read-only.public boolean isDirtyCheck()
public void setDirtyCheck(boolean dirtyCheck)
dirtyCheck
- True if dirty checking is required for this field.public TypeConvertor getConvertor()
public void setTypeConvertor(TypeConvertor typeConvertor)
TypeConvertor
used for converting from field types to
external types.typeConvertor
- TypeConvertor
to be used.public int[] getSQLType()
public void setSQLType(int[] sqlType)
sqlType
- The SQL type of this field.public boolean isTransient()
public void setTransient(boolean isTransient)
lazy
- True if this field should be transient.public String getCascading()
public void setCascading(String cascading)
cascading
- The cascading values to be set.Copyright © 2018. All rights reserved.