-
- 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 aRecordTokenTypeschema.All record types have a schema, comprised of zero or more
Fieldobjects, which describes the structure of the record type. EveryFieldhas both a name and a type. AFieldis uniquely identified by name within the containing schema's context.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FieldDomaingetDomain()Returns the domain of this field.StringgetName()Gets the name of the field.Map<String,String>getProperties()Returns a map of key-value pairs associated with this field.ScalarTokenTypegetType()Gets the token type of the field.booleanisPrimaryKey()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:
getTypein interfaceScalarTyped- Specified by:
getTypein 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 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
-
-