public abstract class AbstractRecordImpl<ComponentType extends DataComponent> extends AbstractDataComponentImpl
Implementation of an heterogeneous list of data components This is the base type for DataRecord and Vector
Modifier and Type | Field and Description |
---|---|
protected DataComponentPropertyList<ComponentType> |
fieldList |
dataBlock, definition, encodingInfo, INDENT, MAX_ARRAY_ERRORS, optional, parent, scalarCount, updatable
description, identifier, label
extensionList, id
Constructor and Description |
---|
AbstractRecordImpl() |
AbstractRecordImpl(int size) |
Modifier and Type | Method and Description |
---|---|
void |
clearData()
Clear the datablock used by this component.
|
void |
combineDataBlocks()
Specific to DataGroup and used by ProcessChain
Allows to combine child blocks into one mixed block
when blocks are coming from different independant sources
|
AbstractDataBlock |
createDataBlock()
Create object adapted to carry data for this container
TODO could save the calculated structure and do a shallow copy for the nexts...
|
AbstractDataComponentImpl |
getComponent(int index)
Get the sub-component located at the specified index
|
AbstractDataComponentImpl |
getComponent(String name)
Get the sub-component registered with the specified name
|
int |
getComponentCount()
Returns number of sub-components in this component
|
int |
getComponentIndex(String name)
Get the index of the sub-component registered with this name
|
boolean |
hasConstraints()
Recursively checks if constraints are specified in this component or
any of its sub-components
|
AbstractDataComponentImpl |
removeComponent(int index)
Remove the sub-component at the specified index
|
AbstractDataComponentImpl |
removeComponent(String name)
Remove sub-component with the specified name
|
void |
setData(DataBlock dataBlock)
Assign a new datablock to this component.
|
protected void |
updateAtomCount(int childAtomCountDiff)
Update datablock atomCount (for resizable array support)
Needed to update atom count info in all parents of a
DataArray that has been resized!
|
protected void |
updateStartIndex(int startIndex)
Update datablock start index (for array support)
Needed when data is selected by DataArray getComponent(int)
and the DataArray is using a parallel or primitive DataBlock
|
void |
validateData(List<ValidationException> errorList)
Validates dataBlock against constraints if any.
|
addComponent, assignNewDataBlock, clone, copy, copyTo, getData, getDefinition, getEncodingInfo, getName, getOptional, getParent, getUpdatable, isSetDefinition, isSetOptional, isSetUpdatable, renewDataBlock, setDefinition, setEncodingInfo, setName, setOptional, setParent, setUpdatable, toString, toString, unSetOptional, unSetUpdatable
copyTo, getDescription, getIdentifier, getLabel, isSetDescription, isSetIdentifier, isSetLabel, setDescription, setIdentifier, setLabel
addExtension, copyTo, getExtensionList, getId, getNumExtensions, isSetId, setId
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
accept
getDescription, getIdentifier, getLabel, isSetDescription, isSetIdentifier, isSetLabel, setDescription, setIdentifier, setLabel
addExtension, getExtensionList, getId, getNumExtensions, isSetId, setId
protected DataComponentPropertyList<ComponentType extends DataComponent> fieldList
public AbstractRecordImpl()
public AbstractRecordImpl(int size)
protected void updateStartIndex(int startIndex)
AbstractDataComponentImpl
updateStartIndex
in class AbstractDataComponentImpl
protected void updateAtomCount(int childAtomCountDiff)
AbstractDataComponentImpl
updateAtomCount
in class AbstractDataComponentImpl
public AbstractDataComponentImpl getComponent(int index)
DataComponent
getComponent
in interface DataComponent
getComponent
in class AbstractDataComponentImpl
index
- index of component to lookuppublic AbstractDataComponentImpl getComponent(String name)
DataComponent
getComponent
in interface DataComponent
getComponent
in class AbstractDataComponentImpl
name
- name of component to lookuppublic int getComponentIndex(String name)
DataComponent
getComponentIndex
in interface DataComponent
getComponentIndex
in class AbstractDataComponentImpl
name
- name of component to lookuppublic AbstractDataComponentImpl removeComponent(int index)
DataComponent
public AbstractDataComponentImpl removeComponent(String name)
DataComponent
public void setData(DataBlock dataBlock)
DataComponent
setData
in interface DataComponent
setData
in class AbstractDataComponentImpl
public void clearData()
DataComponent
clearData
in interface DataComponent
clearData
in class AbstractDataComponentImpl
public void validateData(List<ValidationException> errorList)
DataComponent
validateData
in interface DataComponent
validateData
in class AbstractDataComponentImpl
errorList
- list to which validation exceptions will be appendedpublic AbstractDataBlock createDataBlock()
createDataBlock
in interface DataComponent
createDataBlock
in class AbstractDataComponentImpl
public void combineDataBlocks()
public int getComponentCount()
DataComponent
getComponentCount
in interface DataComponent
getComponentCount
in class AbstractDataComponentImpl
public boolean hasConstraints()
DataComponent
hasConstraints
in interface DataComponent
hasConstraints
in class AbstractDataComponentImpl
Copyright © 2016 Sensia Software LLC. All rights reserved.