Class CompositeFieldMetaData
java.lang.Object
org.eclipse.persistence.internal.eis.cobol.ElementaryFieldMetaData
org.eclipse.persistence.internal.eis.cobol.CompositeFieldMetaData
- All Implemented Interfaces:
- CompositeObject,- FieldMetaData
Purpose: This class represents metadata for composite fields.  It exetends
 
ElementaryFieldMetaData and adds teh attribute myCompositeFields
 which is a collection of subordinate fields.- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Vector<FieldMetaData> collection containing this fields subordinate fieldsFields inherited from class org.eclipse.persistence.internal.eis.cobol.ElementaryFieldMetaDatadecimalPosition, isRedefine, isSigned, myArraySize, myDependentFieldName, myFieldRedefined, myName, myOffset, myRecord, mySize, myTypeFields inherited from interface org.eclipse.persistence.internal.eis.cobol.FieldMetaDataALPHA_NUMERIC, ALPHABETIC, BINARY, COMPOSITE, MANTISSA, NUMERIC, PACKED_DECIMAL, VOID
- 
Constructor SummaryConstructorsConstructorDescriptionCompositeFieldMetaData(String fieldName, String recordName) CompositeFieldMetaData(String fieldName, RecordMetaData record) CompositeFieldMetaData(String fieldName, RecordMetaData record, Vector<FieldMetaData> fields) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddField(FieldMetaData newField) adds a field to the collectiondeepCopy()performs a deep copy of all subordiate fields in themyCompositeFieldsattributeextractValueFromArray(byte[] recordData) loops through the subordinate fields extracting the value from each.inta composite field can't have a decimal positiongetFieldNamed(String fieldName) returns the first subordinate field with a name matching the string infieldNamereturns a collection of subordinate fieldsintgetSize()overidesElementaryFieldMetaDatato calculate the fields size from all the sizes of its subordinate fields.intgetType()a composite field is by definition going to be compositebooleana composite field can't have a decimal positionprotected voidprotected voidinitialize(Vector<FieldMetaData> fields) booleana composite field is by definition going to be compositeprotected voidmethod resets offsets of subordinate fields, should be called when the offset of the parent is changed.voida composite field can't have a decimal positionvoidsetFields(Vector<FieldMetaData> newCompositeFields) sets the composite field attribute to the new collectionvoidsetSize(int size) we don't want to set the size for a composite field because its size is determined from its subordinate fields.voidsetType(int type) a composite field is by definition going to be composite, so this cannot be changedprotected voidwriteCompositeOnArray(CobolRow row, byte[] recordData) This method is used by fields that are array values to write themselves to arraysvoidwriteCompositeOnRow(CobolRow row, byte[] recordData) writes individual fields on given rowvoidwriteOnArray(CobolRow row, byte[] recordData) takes the value from the row for this field and writes it to the byte arrayvoidwriteOnRow(CobolRow row, byte[] recordData) extracts the value from the record data for the field and writes it to the row.Methods inherited from class org.eclipse.persistence.internal.eis.cobol.ElementaryFieldMetaDataadjustArraySize, dependsOn, getArraySize, getCompositeFields, getDependentFieldName, getFieldRedefined, getName, getOffset, getRecord, initialize, initialize, isArray, isFieldRedefine, isSigned, setArraySize, setDecimalPosition, setDependentFieldName, setFieldRedefined, setIsFieldRedefine, setIsSigned, setName, setOffset, setRecordMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.persistence.internal.eis.cobol.CompositeObjectgetName
- 
Field Details- 
myCompositeFieldscollection containing this fields subordinate fields
 
- 
- 
Constructor Details- 
CompositeFieldMetaDatapublic CompositeFieldMetaData()
- 
CompositeFieldMetaData
- 
CompositeFieldMetaData
- 
CompositeFieldMetaDatapublic CompositeFieldMetaData(String fieldName, RecordMetaData record, Vector<FieldMetaData> fields) 
 
- 
- 
Method Details- 
initializeprotected void initialize()- Overrides:
- initializein class- ElementaryFieldMetaData
 
- 
initialize
- 
deepCopyperforms a deep copy of all subordiate fields in themyCompositeFieldsattribute- Specified by:
- deepCopyin interface- FieldMetaData
- Overrides:
- deepCopyin class- ElementaryFieldMetaData
 
- 
getSizepublic int getSize()overidesElementaryFieldMetaDatato calculate the fields size from all the sizes of its subordinate fields.- Specified by:
- getSizein interface- FieldMetaData
- Overrides:
- getSizein class- ElementaryFieldMetaData
 
- 
setSizepublic void setSize(int size) we don't want to set the size for a composite field because its size is determined from its subordinate fields.- Specified by:
- setSizein interface- FieldMetaData
- Overrides:
- setSizein class- ElementaryFieldMetaData
 
- 
hasDecimalpublic boolean hasDecimal()a composite field can't have a decimal position- Specified by:
- hasDecimalin interface- FieldMetaData
- Overrides:
- hasDecimalin class- ElementaryFieldMetaData
 
- 
getDecimalPositionpublic int getDecimalPosition()a composite field can't have a decimal position- Specified by:
- getDecimalPositionin interface- FieldMetaData
- Overrides:
- getDecimalPositionin class- ElementaryFieldMetaData
 
- 
setDecimalPositionpublic void setDecimalPosition()a composite field can't have a decimal position
- 
isCompositepublic boolean isComposite()a composite field is by definition going to be composite- Specified by:
- isCompositein interface- FieldMetaData
- Overrides:
- isCompositein class- ElementaryFieldMetaData
 
- 
getTypepublic int getType()a composite field is by definition going to be composite- Specified by:
- getTypein interface- FieldMetaData
- Overrides:
- getTypein class- ElementaryFieldMetaData
 
- 
setTypepublic void setType(int type) a composite field is by definition going to be composite, so this cannot be changed- Specified by:
- setTypein interface- FieldMetaData
- Overrides:
- setTypein class- ElementaryFieldMetaData
 
- 
getFieldsreturns a collection of subordinate fields- Specified by:
- getFieldsin interface- CompositeObject
 
- 
setFieldssets the composite field attribute to the new collection- Specified by:
- setFieldsin interface- CompositeObject
 
- 
addFieldadds a field to the collection- Specified by:
- addFieldin interface- CompositeObject
 
- 
getFieldNamedreturns the first subordinate field with a name matching the string infieldName- Specified by:
- getFieldNamedin interface- CompositeObject
 
- 
extractValueFromArrayloops through the subordinate fields extracting the value from each.- Specified by:
- extractValueFromArrayin interface- FieldMetaData
- Overrides:
- extractValueFromArrayin class- ElementaryFieldMetaData
 
- 
writeCompositeOnRowwrites individual fields on given row
- 
writeOnRowextracts the value from the record data for the field and writes it to the row.- Specified by:
- writeOnRowin interface- FieldMetaData
- Overrides:
- writeOnRowin class- ElementaryFieldMetaData
 
- 
writeOnArraytakes the value from the row for this field and writes it to the byte array- Specified by:
- writeOnArrayin interface- FieldMetaData
- Overrides:
- writeOnArrayin class- ElementaryFieldMetaData
 
- 
writeCompositeOnArrayThis method is used by fields that are array values to write themselves to arrays
- 
resetChildOffsetsprotected void resetChildOffsets()method resets offsets of subordinate fields, should be called when the offset of the parent is changed.
 
-