TEntity
- The type of entity.public class RawEntityData<TEntity> extends Object
TrackingArchive
. The data
may contain multiple distinct entities, multiple updates to a single entity, or both.Modifier and Type | Method and Description |
---|---|
TEntity |
createEntity(int recordIndex,
Transaction transaction)
Creates an entity with the data from a specified record in the data set.
|
void |
fillArray(int recordIndex,
Object[] values)
Fills an array from a specified record in the data set.
|
void |
fillEntity(int recordIndex,
Transaction transaction,
TEntity entity)
Fills a given entity instance with the data from a specified record in the data set.
|
Object |
getEntityIdentifier(int recordIndex)
Gets the entity identifier from a specified record in the data set.
|
List<EntitySchemaProperty<TEntity>> |
getProperties()
Gets the properties included in this data set.
|
int |
getRecordCount()
Gets the number of entity records in the data set.
|
Object[] |
getValues(int recordIndex)
Gets the values from a specified record in the data set.
|
public final int getRecordCount()
@Nonnull public final List<EntitySchemaProperty<TEntity>> getProperties()
public final Object getEntityIdentifier(int recordIndex)
recordIndex
- The index of the entity record from which to get the identifier.IllegalStateException
- The data set does not contain the EntityIdentifier
(get
) property.@Nonnull public final Object[] getValues(int recordIndex)
Properties
(get
) and will be in the same order.recordIndex
- The index of the entity record from which to get the values.Properties
(get
).public final void fillArray(int recordIndex, @Nonnull Object[] values)
Properties
(get
) and on return of the array will
be filled with values in the same order.recordIndex
- The index of the entity record from which to get the values.values
- On input, an array of the same length as Properties
(get
). On return, the values
in the record corresponding to the Properties
(get
).ArgumentNullException
- Thrown when values
is null
.public final void fillEntity(int recordIndex, Transaction transaction, TEntity entity)
EntityIdentifier
(get
) property, if it exists in the data set,
is ignored; it is not required to match the entity to be filled.recordIndex
- The index of the entity record from which to fill the entity.transaction
- The transaction to use to set properties of the entity.entity
- The entity to fill.public final TEntity createEntity(int recordIndex, @Nonnull Transaction transaction)
recordIndex
- The index of the entity record from which to create the entity.transaction
- The transaction to use to set properties of the entity.IllegalStateException
- The data set does not contain the EntityIdentifier
(get
) property,
which is required in order to create an entity.ArgumentNullException
- Thrown when transaction
is null
.