public interface RecordTokenType extends Namespace<Field>, TokenType, RecordTyped
Field
objects. Record typed objects can typically be decomposed into their
constituent scalar typed components.
Although decomposable, record typed flows and ports behave as if
actual records flow through them. A consequence of this is that each
component subflow is expected to have the same total number of elements.
A dataflow stemming from a
RecordOutput
is guaranteed to have this property, as it is enforced by the
RecordOutput
interface. However, for a dataflow
created from an aggregation of scalar flows, it is the responsibility
of the aggregator to ensure this.
Modifier and Type | Method and Description |
---|---|
void |
checkComparable(TokenType type)
Tests whether tokens of the specified type can be
compared to tokens of this type.
|
void |
checkFieldTypeConstraint(TokenType constraint)
Checks that all fields of this type are compatible
with the specified constraining type.
|
DataRepresentation |
getRepresentation()
Returns the representation associated with this type.
|
boolean |
isAssignableFrom(TokenType source)
Indicates whether tokens of the specified type are
compatible with or implicitly convertible to this type.
|
RecordTokenType |
toRepresentation(DataRepresentation representation)
Returns a RecordTokenType, equivalent to this, but whose representation
is that specified.
|
get, get, getBinding, getBindings, getName, getNames, indexOf, isEmpty, nameSet, size, toList, toList, toMap, verifyNames, verifyNames
forEach, iterator, spliterator
dispatchByType, getEncodedByteSize, isAbstract, isComposite, isGeneric, isScalar, name
getType
boolean isAssignableFrom(TokenType source)
For a record type be convertible to this record type, its schema must contain exactly the same field names and the types of each field in the source schema must be convertible to the type of the correspondingly named field in this record schema. Thus the order of fields in the schemas is unimportant, but the names of fields are.
isAssignableFrom
in interface TokenType
source
- the token type of the source datatrue
if the source type can be
converted.void checkComparable(TokenType type)
For a record type be comparable to this record type,
the types of each field in the source schema must be
comparable with the type of the field in the same
position in this record schema.
Thus the names of fields in the schemas are unimportant,
but the order of fields is. This is quite
different from the behavior of isAssignableFrom(com.pervasive.datarush.types.TokenType)
.
Also implied is that, unlike with scalar types, the
comparability of two record types does not imply
convertibility from one of the types to the other.
checkComparable
in interface TokenType
type
- the token type of data to compareTypesNotComparableException
- if the two
types are not comparable.void checkFieldTypeConstraint(TokenType constraint)
See TokenType.isAssignableFrom(com.pervasive.datarush.types.TokenType)
for more
about compatibility.
constraint
- the type against which to test
if fields are constrainedFieldTypeNotSupportedException
- if a field
does not match the type constraintDataRepresentation getRepresentation()
RecordTokenType toRepresentation(DataRepresentation representation)
representation
- the new representation.Copyright © 2016 Actian Corporation. All rights reserved.