Class DataProperty
- All Implemented Interfaces:
AutoCloseable
DataType.
A property has a name, a value type and a collection type. The value type indicates whether the value is a simple primitive or another data object. The collection type indicates whether the property holds a single value or a list of values of the value type (see DataCollectionKind).
Additional metadata can be attached to a property in the form of a DataAnnotation (see getAnnotations()).
New properties can be defined using a DataProperty.Builder (see newBuilder()).
Instances of this class are thread-safe. Once an instance has been created, there is no public API to modify it.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilderthat allowsDataPropertyinstances to be created. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanprotected voidfinalize()List<@NotNull DataAnnotation> Returns the annotations attached to this data property.Returns the collection type of this data property.getName()Returns the name of the data property.Returns the type of the value of this data property.inthashCode()Returns the hash code.static DataProperty.BuilderCreates a newDataPropertybuilder.toString()
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
newBuilder
Creates a newDataPropertybuilder.- Returns:
- a new
DataPropertybuilder.
-
getName
Returns the name of the data property.- Returns:
- the name of the data property.
-
getValueType
Returns the type of the value of this data property.For a list-typed property (see
getCollectionKind()), this is the type of the elements in the list.- Returns:
- the type of the value of this data property.
-
getCollectionKind
Returns the collection type of this data property.Defaults to
DataCollectionKind#Scalar. A property built withDataCollectionKind#Listholds a list of values ofgetValueType()rather than a single value.- Returns:
- the collection type of this data property.
- Since:
- 2026.1
-
getAnnotations
Returns the annotations attached to this data property.- Returns:
- the annotations attached to this data property.
- Since:
- 2026.1
-
toString
-
hashCode
public int hashCode()Returns the hash code. -
equals
-