Interface FieldMetaData
- All Known Implementing Classes:
CompositeFieldMetaData
,ElementaryFieldMetaData
public interface FieldMetaData
Purpose: This interface defines behavior for a field meta data be they elementary or
composite. This allows reference to either type field indiscriminatly. It also defines some
statics for use in the type attribute of field meta data.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptiondeepCopy()
this method returns an new instance with the same valuesboolean
this method returns true if the array size depends on another fieldextractValueFromArray
(byte[] recordData) this method will extract the field's value from a byte arrayint
this method returns the array sizeint
this method returns the decimal position indexthis method returns the name of the dependent field namethis method returns the field that is redefinedgetName()
this method will return the name of the fieldint
this method returns the offset, in bytes, of the field in the recordthis method will return the associated recordint
getSize()
this method will return the size in bytes of the fieldint
getType()
this method returns the type of the fieldboolean
this method returns true is the field has a preset decimal positionboolean
isArray()
this method returns true if this field is an arrayboolean
this method returns true if the field is composite, false otherwiseboolean
this method sets whether this is a field redefine or notboolean
isSigned()
this method returns true if the field is signedvoid
setArraySize
(int newSize) this method sets the array size for the fieldvoid
setDecimalPosition
(int newPosition) this method sets the decimal position to the new indexvoid
setDependentFieldName
(String fieldName) this method sets the dependent field namevoid
setFieldRedefined
(FieldMetaData field) this method sets the redefined fieldvoid
setIsFieldRedefine
(boolean status) this method sets the boolean for field redefine to truevoid
setIsSigned
(boolean signed) this method sets the signed attribute for the fieldvoid
this method will set the name of the fieldvoid
setOffset
(int offset) this method sets the offset of the fieldvoid
setRecord
(RecordMetaData newRecord) this method will set the assoicated recordvoid
setSize
(int size) this method will set the size of the fieldvoid
setType
(int type) this method sets the type of the fieldvoid
writeOnArray
(CobolRow row, byte[] recordData) this method will write itself on the given byte array from the data in the rowvoid
writeOnRow
(CobolRow row, byte[] recordData) this method will write itself on the give row extracting the data from the given byte array
-
Field Details
-
NUMERIC
static final int NUMERIC- See Also:
-
ALPHA_NUMERIC
static final int ALPHA_NUMERIC- See Also:
-
COMPOSITE
static final int COMPOSITE- See Also:
-
ALPHABETIC
static final int ALPHABETIC- See Also:
-
BINARY
static final int BINARY- See Also:
-
MANTISSA
static final int MANTISSA- See Also:
-
PACKED_DECIMAL
static final int PACKED_DECIMAL- See Also:
-
VOID
static final int VOID- See Also:
-
-
Method Details
-
deepCopy
FieldMetaData deepCopy()this method returns an new instance with the same values -
isSigned
boolean isSigned()this method returns true if the field is signed -
setIsSigned
void setIsSigned(boolean signed) this method sets the signed attribute for the field -
getName
String getName()this method will return the name of the field -
setName
this method will set the name of the field -
getRecord
RecordMetaData getRecord()this method will return the associated record -
setRecord
this method will set the assoicated record -
getSize
int getSize()this method will return the size in bytes of the field -
setSize
void setSize(int size) this method will set the size of the field -
isComposite
boolean isComposite()this method returns true if the field is composite, false otherwise -
getOffset
int getOffset()this method returns the offset, in bytes, of the field in the record -
setOffset
void setOffset(int offset) this method sets the offset of the field -
getType
int getType()this method returns the type of the field -
setType
void setType(int type) this method sets the type of the field -
isFieldRedefine
boolean isFieldRedefine()this method sets whether this is a field redefine or not -
setIsFieldRedefine
void setIsFieldRedefine(boolean status) this method sets the boolean for field redefine to true -
setFieldRedefined
this method sets the redefined field -
getFieldRedefined
FieldMetaData getFieldRedefined()this method returns the field that is redefined -
hasDecimal
boolean hasDecimal()this method returns true is the field has a preset decimal position -
getDecimalPosition
int getDecimalPosition()this method returns the decimal position index -
setDecimalPosition
void setDecimalPosition(int newPosition) this method sets the decimal position to the new index -
isArray
boolean isArray()this method returns true if this field is an array -
getArraySize
int getArraySize()this method returns the array size -
setArraySize
void setArraySize(int newSize) this method sets the array size for the field -
dependsOn
boolean dependsOn()this method returns true if the array size depends on another field -
getDependentFieldName
String getDependentFieldName()this method returns the name of the dependent field name -
setDependentFieldName
this method sets the dependent field name -
extractValueFromArray
this method will extract the field's value from a byte array -
writeOnRow
this method will write itself on the give row extracting the data from the given byte array -
writeOnArray
this method will write itself on the given byte array from the data in the row
-