Class ElementaryFieldMetaData
java.lang.Object
org.eclipse.persistence.internal.eis.cobol.ElementaryFieldMetaData
- All Implemented Interfaces:
- FieldMetaData
- Direct Known Subclasses:
- CompositeFieldMetaData
Purpose: This class defines the 
FieldMetaData interface it defines
 various behavior associated with a field and stores meta-information about the field.
 ElementaryFieldMetaData represents a field that contains a direct value and
 no subordinate fields, a root in the hierarchy.- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected intThis is the offset of the decimal position within the digits of a numeric fieldprotected booleanThis is true if this field is redefinedprotected booleanThis is true if the field is a numeric field that is signedprotected intThis is the number of elements in the array if this field is an array typeprotected StringThis is populated if the arraySize is dependent on another fieldprotected FieldMetaDataThis is the field that this field redefinesprotected StringThis is the name of the fieldprotected intThis is the offset of the field within the record byte arrayprotected RecordMetaDataThis is the record that contains this fieldprotected intThis is the size of the fieldprotected intThis is the type of data the field containsFields inherited from interface org.eclipse.persistence.internal.eis.cobol.FieldMetaDataALPHA_NUMERIC, ALPHABETIC, BINARY, COMPOSITE, MANTISSA, NUMERIC, PACKED_DECIMAL, VOID
- 
Constructor SummaryConstructorsConstructorDescriptionElementaryFieldMetaData(String fieldName, String recordName) ElementaryFieldMetaData(String fieldName, RecordMetaData record) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidadjustArraySize(CobolRow row) this method adjusts the array size to the value in its dependent fielddeepCopy()performs a deep copy of all the attributes of the fieldbooleanreturns true if this field has a dependent fieldextractValueFromArray(byte[] recordData) this method extracts and returns the value for the field, if the field is an array, the value is anVectorintgetter for array sizereturns an empty vector since an elementary field should have no subordinate fieldsintgetter for decimalPositiongetter for myDependentFieldNamegetter for myFieldRedefinedgetName()getter for myNameintgetter for myOffsetgetter for myRecordintgetSize()getter for mySize, multiplies field size my array size if field is an array to get total sizeintgetType()getter for myTypebooleanreturns true if the field is a numeric field with a decimal markerprotected voidprotected voidinitialize(String fieldName, String recordName) protected voidinitialize(String fieldName, RecordMetaData record) booleanisArray()returns true if field is an arraybooleanreturns true if field is composite, since this is elementary, it always returns falsebooleanreturns true if field is a redefinebooleanisSigned()returns true if field is a signed numeric fieldvoidsetArraySize(int newSize) setter for myArraySizevoidsetDecimalPosition(int newPosition) setter for decimalPositionvoidsetDependentFieldName(String fieldName) setter for myDependentFieldNamevoidsetFieldRedefined(FieldMetaData field) setter for myFieldRedefinedvoidsetIsFieldRedefine(boolean status) setter for isRedefinevoidsetIsSigned(boolean signed) setter for isSignedvoidsetter for myNamevoidsetOffset(int offset) setter for myOffsetvoidsetRecord(RecordMetaData newRecord) setter for myRecordvoidsetSize(int size) setter for mySizevoidsetType(int type) setter for myTypevoidwriteOnArray(CobolRow row, byte[] recordData) this method will write its value from the row to the record data byte arrayvoidwriteOnRow(CobolRow row, byte[] recordData) this method will write its value to the row provided
- 
Field Details- 
myRecordThis is the record that contains this field
- 
myNameThis is the name of the field
- 
mySizeprotected int mySizeThis is the size of the field
- 
myOffsetprotected int myOffsetThis is the offset of the field within the record byte array
- 
myTypeprotected int myTypeThis is the type of data the field contains
- 
isRedefineprotected boolean isRedefineThis is true if this field is redefined
- 
decimalPositionprotected int decimalPositionThis is the offset of the decimal position within the digits of a numeric field
- 
myFieldRedefinedThis is the field that this field redefines
- 
myArraySizeprotected int myArraySizeThis is the number of elements in the array if this field is an array type
- 
myDependentFieldNameThis is populated if the arraySize is dependent on another field
- 
isSignedprotected boolean isSignedThis is true if the field is a numeric field that is signed
 
- 
- 
Constructor Details- 
ElementaryFieldMetaDatapublic ElementaryFieldMetaData()
- 
ElementaryFieldMetaData
- 
ElementaryFieldMetaData
 
- 
- 
Method Details- 
initializeprotected void initialize()
- 
initialize
- 
initialize
- 
deepCopyperforms a deep copy of all the attributes of the field- Specified by:
- deepCopyin interface- FieldMetaData
 
- 
isSignedpublic boolean isSigned()returns true if field is a signed numeric field- Specified by:
- isSignedin interface- FieldMetaData
 
- 
setIsSignedpublic void setIsSigned(boolean signed) setter for isSigned- Specified by:
- setIsSignedin interface- FieldMetaData
 
- 
hasDecimalpublic boolean hasDecimal()returns true if the field is a numeric field with a decimal marker- Specified by:
- hasDecimalin interface- FieldMetaData
 
- 
getDecimalPositionpublic int getDecimalPosition()getter for decimalPosition- Specified by:
- getDecimalPositionin interface- FieldMetaData
 
- 
setDecimalPositionpublic void setDecimalPosition(int newPosition) setter for decimalPosition- Specified by:
- setDecimalPositionin interface- FieldMetaData
 
- 
getNamegetter for myName- Specified by:
- getNamein interface- FieldMetaData
 
- 
setNamesetter for myName- Specified by:
- setNamein interface- FieldMetaData
 
- 
getRecordgetter for myRecord- Specified by:
- getRecordin interface- FieldMetaData
 
- 
setRecordsetter for myRecord- Specified by:
- setRecordin interface- FieldMetaData
 
- 
getSizepublic int getSize()getter for mySize, multiplies field size my array size if field is an array to get total size- Specified by:
- getSizein interface- FieldMetaData
 
- 
setSizepublic void setSize(int size) setter for mySize- Specified by:
- setSizein interface- FieldMetaData
 
- 
isCompositepublic boolean isComposite()returns true if field is composite, since this is elementary, it always returns false- Specified by:
- isCompositein interface- FieldMetaData
 
- 
getCompositeFieldsreturns an empty vector since an elementary field should have no subordinate fields
- 
getOffsetpublic int getOffset()getter for myOffset- Specified by:
- getOffsetin interface- FieldMetaData
 
- 
setOffsetpublic void setOffset(int offset) setter for myOffset- Specified by:
- setOffsetin interface- FieldMetaData
 
- 
getTypepublic int getType()getter for myType- Specified by:
- getTypein interface- FieldMetaData
 
- 
setTypepublic void setType(int type) setter for myType- Specified by:
- setTypein interface- FieldMetaData
 
- 
isFieldRedefinepublic boolean isFieldRedefine()returns true if field is a redefine- Specified by:
- isFieldRedefinein interface- FieldMetaData
 
- 
setIsFieldRedefinepublic void setIsFieldRedefine(boolean status) setter for isRedefine- Specified by:
- setIsFieldRedefinein interface- FieldMetaData
 
- 
setFieldRedefinedsetter for myFieldRedefined- Specified by:
- setFieldRedefinedin interface- FieldMetaData
 
- 
getFieldRedefinedgetter for myFieldRedefined- Specified by:
- getFieldRedefinedin interface- FieldMetaData
 
- 
isArraypublic boolean isArray()returns true if field is an array- Specified by:
- isArrayin interface- FieldMetaData
 
- 
getArraySizepublic int getArraySize()getter for array size- Specified by:
- getArraySizein interface- FieldMetaData
 
- 
setArraySizepublic void setArraySize(int newSize) setter for myArraySize- Specified by:
- setArraySizein interface- FieldMetaData
 
- 
dependsOnpublic boolean dependsOn()returns true if this field has a dependent field- Specified by:
- dependsOnin interface- FieldMetaData
 
- 
getDependentFieldNamegetter for myDependentFieldName- Specified by:
- getDependentFieldNamein interface- FieldMetaData
 
- 
setDependentFieldNamesetter for myDependentFieldName- Specified by:
- setDependentFieldNamein interface- FieldMetaData
 
- 
extractValueFromArraythis method extracts and returns the value for the field, if the field is an array, the value is anVector- Specified by:
- extractValueFromArrayin interface- FieldMetaData
 
- 
adjustArraySizethis method adjusts the array size to the value in its dependent field
- 
writeOnRowthis method will write its value to the row provided- Specified by:
- writeOnRowin interface- FieldMetaData
 
- 
writeOnArraythis method will write its value from the row to the record data byte array- Specified by:
- writeOnArrayin interface- FieldMetaData
 
 
-