|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.datacrow.core.objects.DcField
public class DcField
Fields are part of a Data Crow module. A field defines how it is represented in the UI, which label is used to describe it, if it can be searched on, if it is editable, the maximum length of its content and so on.
Constructor Summary | |
---|---|
DcField(int index,
int module,
java.lang.String label,
boolean uiOnly,
boolean enabled,
boolean readonly,
boolean searchable,
boolean techinfo,
int maximumLength,
int fieldType,
int modRef,
int valueType,
java.lang.String databaseFieldName)
Creates a new field. |
|
DcField(XmlField field,
int module)
Creates a new field based on a XML definition. |
Method Summary | |
---|---|
void |
addValueEnhancer(IValueEnhancer enhancer)
Register a new value enhancer. |
java.lang.String |
getDatabaseFieldName()
Set the database column name. |
java.lang.String |
getDataBaseFieldType()
Calculates the database field type definition. |
DcFieldDefinition |
getDefinition()
|
int |
getFieldType()
The component type. |
int |
getIndex()
The unique field index. |
java.lang.String |
getLabel()
The display label. |
int |
getMaximumLength()
Returns the maximum field length (characters positions). |
int |
getModule()
The module to which this field belongs. |
java.lang.String |
getOriginalLabel()
|
int |
getReferenceIdx()
The module reference index. |
java.lang.String |
getResourceKey()
The key used for setting the value in the resources. |
int |
getSourceModuleIdx()
The source module index. |
java.lang.String |
getSystemName()
The system name of this field. |
IValueEnhancer[] |
getValueEnhancers()
Retrieves all the registered value enhancers. |
int |
getValueType()
The value type. |
boolean |
isEnabled()
Indicates if the field is enabled. |
boolean |
isReadOnly()
Indicates if the value belonging to this field can be edited. |
boolean |
isRequired()
Mark the field as required. |
boolean |
isSearchable()
Indicates if the user can search on this field. |
boolean |
isTechnicalInfo()
Indicates if this field hold technical information. |
boolean |
isUiOnly()
When a field is marked as UI only its value will not be stored in the database. |
void |
removeEnhancers()
Remove all the registered value enhancers. |
void |
setDatabaseFieldName(java.lang.String s)
Sets the database column name. |
void |
setEnabled(boolean enabled)
Indicates if this field is enabled by default. |
void |
setFieldType(int index)
Sets the component type. |
void |
setIndex(int index)
Sets the unique field index. |
void |
setMaximumLength(int i)
The maximum length of the value of this field. |
void |
setModule(int module)
Set the module to which this field belongs. |
void |
setReadOnly(boolean b)
Indicate if the value of this field can edited. |
void |
setRequired(boolean b)
Mark the field as required. |
void |
setSearchable(boolean searchable)
Indicate if the user is allowed to search on this field. |
void |
setSourceModuleIdx(int modRef)
Sets the source module index. |
void |
setTechinfo(boolean techinfo)
Indicates if this field holds technical information. |
void |
setUiOnly(boolean uiOnly)
When a field is marked as UI only its value will not be stored in the database. |
void |
setValueType(int index)
Sets the value type. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DcField(XmlField field, int module)
field
- XML definition.module
- The module index to which this field belongs.public DcField(int index, int module, java.lang.String label, boolean uiOnly, boolean enabled, boolean readonly, boolean searchable, boolean techinfo, int maximumLength, int fieldType, int modRef, int valueType, java.lang.String databaseFieldName)
index
- The unique field index.module
- The module to which this field belongs.label
- The display label.uiOnly
- Indicates if this field is represented by a database column.enabled
- Indicates if the field will be used. Can be overridden by the user.readonly
- Indicates if the field can be edited.searchable
- Tells if the user can search on this field.techinfo
- Holds technical information?maximumLength
- The maximum value length.fieldType
- The (component) field type.modRef
- The module reference.valueType
- The value type DcRepository.ValueTypes
databaseFieldName
- The database column name.Method Detail |
---|
public void setSourceModuleIdx(int modRef)
modRef
- The module index.public int getSourceModuleIdx()
public int getReferenceIdx()
public void setIndex(int index)
index
- public int getIndex()
public void setModule(int module)
module
- The module index.public int getModule()
public void setTechinfo(boolean techinfo)
techinfo
- public void setUiOnly(boolean uiOnly)
uiOnly
- public boolean isUiOnly()
public void setEnabled(boolean enabled)
enabled
- public boolean isEnabled()
public void setSearchable(boolean searchable)
searchable
- public java.lang.String getDatabaseFieldName()
public int getFieldType()
public int getValueType()
DcRepository.ValueTypes
public java.lang.String getOriginalLabel()
public java.lang.String getLabel()
public DcFieldDefinition getDefinition()
public java.lang.String getResourceKey()
public java.lang.String getSystemName()
public boolean isTechnicalInfo()
setTechinfo(boolean)
public boolean isRequired()
public boolean isReadOnly()
public boolean isSearchable()
public int getMaximumLength()
public void setReadOnly(boolean b)
public void setRequired(boolean b)
b
- public void setMaximumLength(int i)
i
- public void setFieldType(int index)
index
- public void setValueType(int index)
index
- DcRepository.ValueTypes
public void setDatabaseFieldName(java.lang.String s)
s
- public java.lang.String toString()
toString
in class java.lang.Object
public void removeEnhancers()
public void addValueEnhancer(IValueEnhancer enhancer)
enhancer
- public IValueEnhancer[] getValueEnhancers()
public java.lang.String getDataBaseFieldType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |