public static class ValueSet.Row.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder(ValueSet.Definition definition,
java.util.Date timestamp)
Construct a row builder for a particular valueset definition and timestamp.
|
Builder(ValueSet.Definition definition,
org.opendof.core.oal.DOFInterfaceID snapshotVersion,
org.opendof.core.oal.DOFValue snapshot)
Create a row builder from a snapshot.
|
| Modifier and Type | Method and Description |
|---|---|
ValueSet.Row.Builder |
add(org.opendof.core.oal.DOFValue value)
Add a value with the current default count of samples to the row.
|
ValueSet.Row.Builder |
add(int sampleCount,
org.opendof.core.oal.DOFValue value)
Add an aggregate value to the row.
|
ValueSet.Row |
build()
Build the row.
|
ValueSet.Row.Builder |
setDefaultSampleCount(int sampleCount)
Set the number of aggregate data points for each value in this row.
|
public Builder(ValueSet.Definition definition, java.util.Date timestamp)
definition - The valueset definition for the row.timestamp - The timestamp for the row.public Builder(ValueSet.Definition definition, org.opendof.core.oal.DOFInterfaceID snapshotVersion, org.opendof.core.oal.DOFValue snapshot)
add(org.opendof.core.oal.DOFValue) will result in an
exception.definition - The definition of the row which corresponds to the snapshot data. Must not be null.snapshotVersion - The version of the snapshot data.snapshot - The snapshot. Must not be null.ValueSet.DEFAULT_SNAPSHOT_VERSIONpublic ValueSet.Row.Builder add(org.opendof.core.oal.DOFValue value)
setDefaultSampleCount(int) will not
retroactively update the sample count of any rows already added using this method.
The type of the value must match the corresponding property in the definition. The number of values
added to the row must not exceed the number of properties in the definition.value - The value to add. A null value is interpreted as a null, and the corresponding
property must allow nulls. The type of the value must match the corresponding property type or an exception
will be thrown.setDefaultSampleCount(int)public ValueSet.Row.Builder add(int sampleCount, org.opendof.core.oal.DOFValue value)
sampleCount - The number of samples represented by this value. Must not be less than 0. A count of 0
may only be used with a value of ValueSet.NO_VALUE.value - The value to add. A null value is interpreted as a null, and the corresponding
property must allow nulls. The type of the value must match the corresponding property type or an exception
will be thrown.public ValueSet.Row.Builder setDefaultSampleCount(int sampleCount)
sampleCount - The number of data points that are aggregated for each value. The ValueSet Definition
determines if aggregate values are passed, and this must be uniform for all Properties. The
aggregate parameter has meaning only for aggregate Properties, and should be 1 otherwise.public ValueSet.Row build() throws java.lang.Exception
java.lang.Exception - Thrown if a valid Row cannot be created.