public final class EntityProperty extends Object
EntityProperty stores the data
type as an EdmType. The value, which may be null for object types, but not for primitive types,
is serialized and stored as a String.
EntityProperty provides overloaded constructors and overloads of the setValue method for
supported value types. Each overloaded constructor or setValue method sets the EdmType and
serializes the value appropriately based on the parameter type.
Use one of the getValueAsType methods to deserialize an EntityProperty as the
appropriate Java type. The method will throw a ParseException or IllegalArgumentException if the
EntityProperty cannot be deserialized as the Java type.
| Constructor and Description |
|---|
EntityProperty(boolean value)
Constructs an
EntityProperty instance from a boolean value. |
EntityProperty(Boolean value)
Constructs an
EntityProperty instance from a Boolean value. |
EntityProperty(byte[] value)
Constructs an
EntityProperty instance from a byte[] value. |
EntityProperty(Byte[] value)
Constructs an
EntityProperty instance from a Byte[]. |
EntityProperty(Date value)
Constructs an
EntityProperty instance from a java.util.Date value. |
EntityProperty(double value)
Constructs an
EntityProperty instance from a double value. |
EntityProperty(Double value)
Constructs an
EntityProperty instance from a Double value. |
EntityProperty(int value)
Constructs an
EntityProperty instance from an int value. |
EntityProperty(Integer value)
Constructs an
EntityProperty instance from an Integer value. |
EntityProperty(long value)
Constructs an
EntityProperty instance from a long value. |
EntityProperty(Long value)
Constructs an
EntityProperty instance from a Long value. |
EntityProperty(String value)
Constructs an
EntityProperty instance from a String value. |
EntityProperty(UUID value)
Constructs an
EntityProperty instance from a java.util.UUID value. |
| Modifier and Type | Method and Description |
|---|---|
EdmType |
getEdmType()
Gets the
EdmType storage data type for the EntityProperty. |
boolean |
getIsNull()
Gets a flag indicating that the
EntityProperty value is null. |
Class<?> |
getType()
Gets the class type of the
EntityProperty. |
boolean |
getValueAsBoolean()
Gets the value of this
EntityProperty as a boolean. |
Boolean |
getValueAsBooleanObject()
Gets the value of this
EntityProperty as a Boolean. |
byte[] |
getValueAsByteArray()
Gets the value of this
EntityProperty as a byte array. |
Byte[] |
getValueAsByteObjectArray()
Gets the value of this
EntityProperty as a Byte array. |
Date |
getValueAsDate()
Gets the value of this
EntityProperty as a java.util.Date. |
double |
getValueAsDouble()
Gets the value of this
EntityProperty as a double. |
Double |
getValueAsDoubleObject()
Gets the value of this
EntityProperty as a double. |
int |
getValueAsInteger()
Gets the value of this
EntityProperty as an int. |
Integer |
getValueAsIntegerObject()
Gets the value of this
EntityProperty as an Integer. |
long |
getValueAsLong()
Gets the value of this
EntityProperty as a long. |
Long |
getValueAsLongObject()
Gets the value of this
EntityProperty as a Long. |
String |
getValueAsString()
Gets the value of this
EntityProperty as a String. |
UUID |
getValueAsUUID()
Gets the value of this
EntityProperty as a java.util.UUID. |
void |
setValue(boolean value)
Sets this
EntityProperty using the serialized boolean value. |
void |
setValue(Boolean value)
Sets this
EntityProperty using the serialized Boolean value. |
void |
setValue(byte[] value)
Sets this
EntityProperty using the serialized byte[] value. |
void |
setValue(Byte[] value)
Sets this
EntityProperty using the serialized Byte[] value. |
void |
setValue(Date value)
Sets this
EntityProperty using the serialized java.util.Date value. |
void |
setValue(double value)
Sets this
EntityProperty using the serialized double value. |
void |
setValue(Double value)
Sets this
EntityProperty using the serialized Double value. |
void |
setValue(int value)
Sets this
EntityProperty using the serialized int value. |
void |
setValue(Integer value)
Sets this
EntityProperty using the serialized Integer value. |
void |
setValue(long value)
Sets this
EntityProperty using the serialized long value. |
void |
setValue(Long value)
Sets this
EntityProperty using the serialized Long value. |
void |
setValue(String value)
Sets this
EntityProperty using the String value. |
void |
setValue(UUID value)
Sets this
EntityProperty using the serialized java.util.UUID value. |
public EntityProperty(boolean value)
EntityProperty instance from a boolean value.value - The boolean value of the entity property to set.public EntityProperty(Boolean value)
EntityProperty instance from a Boolean value.value - The Boolean value of the entity property to set.public EntityProperty(byte[] value)
EntityProperty instance from a byte[] value.value - The byte[] value of the entity property to set.public EntityProperty(Byte[] value)
EntityProperty instance from a Byte[].value - The Byte[] to set as the entity property value.public EntityProperty(Date value)
EntityProperty instance from a java.util.Date value.value - The java.util.Date to set as the entity property value.public EntityProperty(double value)
EntityProperty instance from a double value.value - The double value of the entity property to set.public EntityProperty(Double value)
EntityProperty instance from a Double value.value - The Double value of the entity property to set.public EntityProperty(int value)
EntityProperty instance from an int value.value - The int value of the entity property to set.public EntityProperty(Integer value)
EntityProperty instance from an Integer value.value - The Integer value of the entity property to set.public EntityProperty(long value)
EntityProperty instance from a long value.value - The long value of the entity property to set.public EntityProperty(Long value)
EntityProperty instance from a Long value.value - The Long value of the entity property to set.public EntityProperty(String value)
EntityProperty instance from a String value.value - The String to set as the entity property value.public EntityProperty(UUID value)
EntityProperty instance from a java.util.UUID value.value - The java.util.UUID to set as the entity property value.public EdmType getEdmType()
EdmType storage data type for the EntityProperty.EdmType enumeration value for the data type of the EntityProperty.public boolean getIsNull()
EntityProperty value is null.boolean flag indicating that the EntityProperty value is null.public Class<?> getType()
EntityProperty.Class<?> of the EntityProperty.public boolean getValueAsBoolean()
EntityProperty as a boolean.boolean representation of the EntityProperty value.IllegalArgumentException - If the value is null or cannot be parsed as a Boolean.public Boolean getValueAsBooleanObject()
EntityProperty as a Boolean.Boolean representation of the EntityProperty value.IllegalArgumentException - If the value is null or cannot be parsed as a Boolean.public byte[] getValueAsByteArray()
EntityProperty as a byte array.byte[] representation of the EntityProperty value, or null.public Byte[] getValueAsByteObjectArray()
EntityProperty as a Byte array.Byte[] representation of the EntityProperty value, or null.public Date getValueAsDate()
EntityProperty as a java.util.Date.java.util.Date representation of the EntityProperty value, or null.IllegalArgumentException - If the value is not null and cannot be parsed as a java.util.Date.public double getValueAsDouble()
EntityProperty as a double.double representation of the EntityProperty value.IllegalArgumentException - If the value is null or cannot be parsed as a double.public Double getValueAsDoubleObject()
EntityProperty as a double.double representation of the EntityProperty value.IllegalArgumentException - If the value is null or cannot be parsed as a double.public int getValueAsInteger()
EntityProperty as an int.int representation of the EntityProperty value.IllegalArgumentException - If the value is null or cannot be parsed as an int.public Integer getValueAsIntegerObject()
EntityProperty as an Integer.Integer representation of the EntityProperty value.IllegalArgumentException - If the value is null or cannot be parsed as an int.public long getValueAsLong()
EntityProperty as a long.long representation of the EntityProperty value.IllegalArgumentException - If the value is null or cannot be parsed as a long.public Long getValueAsLongObject()
EntityProperty as a Long.long representation of the EntityProperty value.IllegalArgumentException - If the value is null or cannot be parsed as a long.public String getValueAsString()
EntityProperty as a String.String representation of the EntityProperty value, or null.public UUID getValueAsUUID()
EntityProperty as a java.util.UUID.java.util.UUID representation of the EntityProperty value, or null.IllegalArgumentException - If the value cannot be parsed as a java.util.UUID.public final void setValue(boolean value)
EntityProperty using the serialized boolean value.value - The boolean value to set as the EntityProperty value.public final void setValue(Boolean value)
EntityProperty using the serialized Boolean value.value - The Boolean value to set as the EntityProperty value.public final void setValue(byte[] value)
EntityProperty using the serialized byte[] value.value - The byte[] value to set as the EntityProperty value. This value may be
null.public final void setValue(Byte[] value)
EntityProperty using the serialized Byte[] value.value - The Byte[] value to set as the EntityProperty value. This value may be
null.public final void setValue(Date value)
EntityProperty using the serialized java.util.Date value.value - The java.util.Date value to set as the EntityProperty value. This value may be
null.public final void setValue(double value)
EntityProperty using the serialized double value.value - The double value to set as the EntityProperty value.public final void setValue(Double value)
EntityProperty using the serialized Double value.value - The Double value to set as the EntityProperty value.public final void setValue(int value)
EntityProperty using the serialized int value.value - The int value to set as the EntityProperty value.public final void setValue(Integer value)
EntityProperty using the serialized Integer value.value - The Integer value to set as the EntityProperty value.public final void setValue(long value)
EntityProperty using the serialized long value.value - The long value to set as the EntityProperty value.public final void setValue(Long value)
EntityProperty using the serialized Long value.value - The Long value to set as the EntityProperty value.public final void setValue(String value)
EntityProperty using the String value.value - The String value to set as the EntityProperty value. This value may be
null.public final void setValue(UUID value)
EntityProperty using the serialized java.util.UUID value.value - The java.util.UUID value to set as the EntityProperty value.
This value may be null.Copyright © 2018. All Rights Reserved.