- All Superinterfaces:
Named,ScalarTyped,TokenTyped
- All Known Subinterfaces:
BinaryInputField,BinaryOutputField,BooleanInputField,BooleanOutputField,CharInputField,CharOutputField,DateInputField,DateOutputField,DoubleInputField,DoubleOutputField,DurationInputField,DurationOutputField,FloatInputField,FloatOutputField,IntInputField,IntOutputField,Ip4AddressInputField,Ip4AddressOutputField,Ip6AddressInputField,Ip6AddressOutputField,JDBCField,LongInputField,LongOutputField,MoneyInputField,MoneyOutputField,NumberOutputField,NumericInputField,NumericOutputField,ObjectInputField<T>,ObjectOutputField<T>,PeriodInputField,PeriodOutputField,ScalarInputField,ScalarOutputField,StringInputField,StringOutputField,TimeInputField,TimeOutputField,TimestampInputField,TimestampOutputField
An element of a
RecordTokenType schema.
All record types have a schema, comprised of zero or more Field
objects, which describes the structure of the record type. Every
Field has both a name and a type. A Field is
uniquely identified by name within the containing schema's context.
-
Method Details
-
getName
String getName()Gets the name of the field. -
getType
ScalarTokenType getType()Gets the token type of the field.- Specified by:
getTypein interfaceScalarTyped- Specified by:
getTypein interfaceTokenTyped- Returns:
- the field type
-
getProperties
Returns a map of key-value pairs associated with this field. The returned map will always be immutable.- Returns:
- a map of key-value pairs associated with this field.
-
getDomain
FieldDomain getDomain()Returns the domain of this field. This will never be null but may beFieldDomain.UNSPECIFIED.- Returns:
- the domain of this field
-
isPrimaryKey
boolean isPrimaryKey()Returns whether this field is the primary key of the record. In order to be a primary key, the field must be ofComparabletype and must be unique within the record. Note that the framework will not make any attempt to enforce uniqueness; rather this is purely a declaration. Finally, a given record may have at most one primary key.- Returns:
- whether this field is the primary key of the record
-