-
- 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
public interface Field extends Named, ScalarTyped
An element of aRecordTokenType
schema.All record types have a schema, comprised of zero or more
Field
objects, which describes the structure of the record type. EveryField
has both a name and a type. AField
is uniquely identified by name within the containing schema's context.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FieldDomain
getDomain()
Returns the domain of this field.String
getName()
Gets the name of the field.Map<String,String>
getProperties()
Returns a map of key-value pairs associated with this field.ScalarTokenType
getType()
Gets the token type of the field.boolean
isPrimaryKey()
Returns whether this field is the primary key of the record.
-
-
-
Method Detail
-
getName
String getName()
Gets the name of the field.
-
getType
ScalarTokenType getType()
Gets the token type of the field.- Specified by:
getType
in interfaceScalarTyped
- Specified by:
getType
in interfaceTokenTyped
- Returns:
- the field type
-
getProperties
Map<String,String> 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 ofComparable
type 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
-
-