Record Class PropertyDomain
java.lang.Object
java.lang.Record
org.gcube.informationsystem.resourceregistry.queries.operators.PropertyDomain
- Record Components:
kind- the shape of the declared propertyvalueType- the base type of the compared values: the property itself forPropertyDomain.Kind.SCALAR, the elements forPropertyDomain.Kind.COLLECTION, the values forPropertyDomain.Kind.MAP;nullfor the other kinds
public record PropertyDomain(PropertyDomain.Kind kind, org.gcube.informationsystem.types.PropertyTypeName.BaseType valueType)
extends Record
The domain a Type definition declares for the property compared by a predicate.
A property the Type definition does not declare has no domain: it is represented by
null and no property-domain check applies to it.
- Author:
- Luca Frosini (ISTI - CNR)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe shape of a declared property. -
Constructor Summary
ConstructorsConstructorDescriptionPropertyDomain(PropertyDomain.Kind kind, org.gcube.informationsystem.types.PropertyTypeName.BaseType valueType) Creates an instance of aPropertyDomainrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertyDomaincollection(org.gcube.informationsystem.types.PropertyTypeName.BaseType elementType) Returns the domain of a List or Set.static PropertyDomainembedded()Returns the domain of an embedded Property value.static PropertyDomainReturns the domain of an Encrypted value.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.static PropertyDomainmap(org.gcube.informationsystem.types.PropertyTypeName.BaseType valueType) Returns the domain of a Map.static PropertyDomainscalar(org.gcube.informationsystem.types.PropertyTypeName.BaseType valueType) Returns the domain of a single value.final StringtoString()Returns a string representation of this record class.org.gcube.informationsystem.types.PropertyTypeName.BaseTypeReturns the value of thevalueTyperecord component.
-
Constructor Details
-
PropertyDomain
public PropertyDomain(PropertyDomain.Kind kind, org.gcube.informationsystem.types.PropertyTypeName.BaseType valueType) Creates an instance of aPropertyDomainrecord class.
-
-
Method Details
-
scalar
public static PropertyDomain scalar(org.gcube.informationsystem.types.PropertyTypeName.BaseType valueType) Returns the domain of a single value.- Parameters:
valueType- the base type of the value- Returns:
- the domain
-
collection
public static PropertyDomain collection(org.gcube.informationsystem.types.PropertyTypeName.BaseType elementType) Returns the domain of a List or Set.- Parameters:
elementType- the base type of the elements- Returns:
- the domain
-
map
public static PropertyDomain map(org.gcube.informationsystem.types.PropertyTypeName.BaseType valueType) Returns the domain of a Map.- Parameters:
valueType- the base type of the values- Returns:
- the domain
-
embedded
Returns the domain of an embedded Property value.- Returns:
- the domain
-
encrypted
Returns the domain of an Encrypted value.- Returns:
- the domain
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
valueType
public org.gcube.informationsystem.types.PropertyTypeName.BaseType valueType()Returns the value of thevalueTyperecord component.- Returns:
- the value of the
valueTyperecord component
-