EntityProperty Class
- java.
lang. Object - com.
microsoft. azure. storage. table. EntityProperty
- com.
public class EntityProperty
A class which represents a single typed property value in a table entity. An EntityProperty stores the data type as an EdmType. The value, which may be for object types, but not for primitive types, is serialized and stored as a .
EntityProperty provides overloaded constructors and overloads of the method for supported value types. Each overloaded constructor or method sets the EdmType and serializes the value appropriately based on the parameter type.
Use one of the Type 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 Summary
Constructor | Description |
---|---|
EntityProperty(final boolean value) |
Constructs an EntityProperty instance from a value. |
EntityProperty(final Boolean value) |
Constructs an EntityProperty instance from a value. |
EntityProperty(final byte[] value) |
Constructs an EntityProperty instance from a value. |
EntityProperty(final Byte[] value) |
Constructs an EntityProperty instance from a . |
EntityProperty(final Date value) |
Constructs an EntityProperty instance from a value. |
EntityProperty(final double value) |
Constructs an EntityProperty instance from a value. |
EntityProperty(final Double value) |
Constructs an EntityProperty instance from a value. |
EntityProperty(final int value) |
Constructs an EntityProperty instance from an value. |
EntityProperty(final Integer value) |
Constructs an EntityProperty instance from an value. |
EntityProperty(final long value) |
Constructs an EntityProperty instance from a value. |
EntityProperty(final Long value) |
Constructs an EntityProperty instance from a value. |
EntityProperty(final Object value, final Class<?> type) |
Reserved for internal use. Constructs an EntityProperty instance from a value and a data type, and verifies that the value can be interpreted as the specified data type. |
EntityProperty(final String value) |
Constructs an EntityProperty instance from a value. |
EntityProperty(final String value, final Class<?> type) |
Reserved for internal use. Constructs an EntityProperty instance from a value type, and verifies that the value can be interpreted as the specified data type. |
EntityProperty(final String value, final EdmType edmType) |
Reserved for internal use. Constructs an EntityProperty instance from a value and a data type, and verifies that the value can be interpreted as the specified data type. |
EntityProperty(final UUID value) |
Constructs an EntityProperty instance from a value. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Edm |
getEdmType()
Gets the EdmType storage data type for the EntityProperty. |
boolean |
getIsNull()
Gets a flag indicating that the EntityProperty value is . |
Class<?> |
getType()
Gets the class type of the EntityProperty. |
boolean |
getValueAsBoolean()
Gets the value of this EntityProperty as a . |
Boolean |
getValueAsBooleanObject()
Gets the value of this EntityProperty as a . |
byte [] |
getValueAsByteArray()
Gets the value of this EntityProperty as a array. |
Byte [] |
getValueAsByteObjectArray()
Gets the value of this EntityProperty as a array. |
Date |
getValueAsDate()
Gets the value of this EntityProperty as a . |
double |
getValueAsDouble()
Gets the value of this EntityProperty as a . |
Double |
getValueAsDoubleObject()
Gets the value of this EntityProperty as a . |
int |
getValueAsInteger()
Gets the value of this EntityProperty as an . |
Integer |
getValueAsIntegerObject()
Gets the value of this EntityProperty as an . |
long |
getValueAsLong()
Gets the value of this EntityProperty as a . |
Long |
getValueAsLongObject()
Gets the value of this EntityProperty as a . |
String |
getValueAsString()
Gets the value of this EntityProperty as a . |
UUID |
getValueAsUUID()
Gets the value of this EntityProperty as a . |
boolean |
isEncrypted()
Gets a flag indicating whether the EntityProperty value is encrypted. |
void |
setIsEncrypted(boolean isEncrypted)
Sets a flag indicating whether the EntityProperty value is encrypted. |
synchronized final void |
setValue(final boolean value)
Sets this EntityProperty using the serialized value. |
synchronized final void |
setValue(final Boolean value)
Sets this EntityProperty using the serialized value. |
synchronized final void |
setValue(final byte[] value)
Sets this EntityProperty using the serialized value. |
synchronized final void |
setValue(final Byte[] value)
Sets this EntityProperty using the serialized value. |
synchronized final void |
setValue(final Date value)
Sets this EntityProperty using the serialized value. |
synchronized final void |
setValue(final double value)
Sets this EntityProperty using the serialized value. |
synchronized final void |
setValue(final Double value)
Sets this EntityProperty using the serialized value. |
synchronized final void |
setValue(final int value)
Sets this EntityProperty using the serialized value. |
synchronized final void |
setValue(final Integer value)
Sets this EntityProperty using the serialized value. |
synchronized final void |
setValue(final long value)
Sets this EntityProperty using the serialized value. |
synchronized final void |
setValue(final Long value)
Sets this EntityProperty using the serialized value. |
synchronized final void |
setValue(final String value)
Sets this EntityProperty using the value. |
synchronized final void |
setValue(final UUID value)
Sets this EntityProperty using the serialized value. |
Constructor Details
EntityProperty
public EntityProperty(final boolean value)
Constructs an EntityProperty instance from a value.
Parameters:
boolean
value of the entity property to set.
EntityProperty
public EntityProperty(final Boolean value)
Constructs an EntityProperty instance from a value.
Parameters:
Boolean
value of the entity property to set.
EntityProperty
public EntityProperty(final byte[] value)
Constructs an EntityProperty instance from a value.
Parameters:
byte[]
value of the entity property to set.
EntityProperty
public EntityProperty(final Byte[] value)
Constructs an EntityProperty instance from a .
Parameters:
Byte[]
to set as the entity property value.
EntityProperty
public EntityProperty(final Date value)
Constructs an EntityProperty instance from a value.
Parameters:
java.util.Date
to set as the entity property value.
EntityProperty
public EntityProperty(final double value)
Constructs an EntityProperty instance from a value.
Parameters:
double
value of the entity property to set.
EntityProperty
public EntityProperty(final Double value)
Constructs an EntityProperty instance from a value.
Parameters:
Double
value of the entity property to set.
EntityProperty
public EntityProperty(final int value)
Constructs an EntityProperty instance from an value.
Parameters:
int
value of the entity property to set.
EntityProperty
public EntityProperty(final Integer value)
Constructs an EntityProperty instance from an value.
Parameters:
Integer
value of the entity property to set.
EntityProperty
public EntityProperty(final long value)
Constructs an EntityProperty instance from a value.
Parameters:
long
value of the entity property to set.
EntityProperty
public EntityProperty(final Long value)
Constructs an EntityProperty instance from a value.
Parameters:
Long
value of the entity property to set.
EntityProperty
protected EntityProperty(final Object value, final Class type)
Reserved for internal use. Constructs an EntityProperty instance from a value and a data type, and verifies that the value can be interpreted as the specified data type.
Parameters:
Object
to convert to a string and store.
Class<?>
type of the value to construct.
EntityProperty
public EntityProperty(final String value)
Constructs an EntityProperty instance from a value.
Parameters:
String
to set as the entity property value.
EntityProperty
protected EntityProperty(final String value, final Class type)
Reserved for internal use. Constructs an EntityProperty instance from a value type, and verifies that the value can be interpreted as the specified data type.
Parameters:
Object
to convert to a string and store.
EntityProperty
protected EntityProperty(final String value, final EdmType edmType)
Reserved for internal use. Constructs an EntityProperty instance from a value and a data type, and verifies that the value can be interpreted as the specified data type.
Parameters:
String
representation of the value to construct.
EntityProperty
public EntityProperty(final UUID value)
Constructs an EntityProperty instance from a value.
Parameters:
java.util.UUID
to set as the entity property value.
Method Details
getEdmType
public EdmType getEdmType()
Gets the EdmType storage data type for the EntityProperty.
Returns:
getIsNull
getType
public Class getType()
Gets the class type of the EntityProperty.
Returns:
Class<?>
of the EntityProperty.getValueAsBoolean
public boolean getValueAsBoolean()
Gets the value of this EntityProperty as a .
Returns:
boolean
representation of the EntityProperty value.Throws:
null
or cannot be parsed as a Boolean
.
getValueAsBooleanObject
public Boolean getValueAsBooleanObject()
Gets the value of this EntityProperty as a .
Returns:
Boolean
representation of the EntityProperty value.Throws:
null
or cannot be parsed as a Boolean
.
getValueAsByteArray
getValueAsByteObjectArray
public Byte [] getValueAsByteObjectArray()
Gets the value of this EntityProperty as a array.
Returns:
getValueAsDate
public Date getValueAsDate()
Gets the value of this EntityProperty as a .
Returns:
Throws:
null
and cannot be parsed as a java.util.Date
.
getValueAsDouble
public double getValueAsDouble()
Gets the value of this EntityProperty as a .
Returns:
double
representation of the EntityProperty value.Throws:
null
or cannot be parsed as a double
.
getValueAsDoubleObject
public Double getValueAsDoubleObject()
Gets the value of this EntityProperty as a .
Returns:
double
representation of the EntityProperty value.Throws:
null
or cannot be parsed as a double
.
getValueAsInteger
public int getValueAsInteger()
Gets the value of this EntityProperty as an .
Returns:
int
representation of the EntityProperty value.Throws:
null
or cannot be parsed as an int
.
getValueAsIntegerObject
public Integer getValueAsIntegerObject()
Gets the value of this EntityProperty as an .
Returns:
Integer
representation of the EntityProperty value.Throws:
null
or cannot be parsed as an int
.
getValueAsLong
public long getValueAsLong()
Gets the value of this EntityProperty as a .
Returns:
long
representation of the EntityProperty value.Throws:
null
or cannot be parsed as a long
.
getValueAsLongObject
public Long getValueAsLongObject()
Gets the value of this EntityProperty as a .
Returns:
long
representation of the EntityProperty value.Throws:
null
or cannot be parsed as a long
.
getValueAsString
getValueAsUUID
public UUID getValueAsUUID()
Gets the value of this EntityProperty as a .
Returns:
Throws:
java.util.UUID
.
isEncrypted
protected boolean isEncrypted()
Gets a flag indicating whether the EntityProperty value is encrypted.
Returns:
boolean
flag indicating whether the EntityProperty value is encrypted.setIsEncrypted
protected void setIsEncrypted(boolean isEncrypted)
Sets a flag indicating whether the EntityProperty value is encrypted.
Parameters:
setValue
public synchronized final void setValue(final boolean value)
Sets this EntityProperty using the serialized value.
Parameters:
setValue
public synchronized final void setValue(final Boolean value)
Sets this EntityProperty using the serialized value.
Parameters:
setValue
public synchronized final void setValue(final byte[] value)
Sets this EntityProperty using the serialized value.
Parameters:
setValue
public synchronized final void setValue(final Byte[] value)
Sets this EntityProperty using the serialized value.
Parameters:
setValue
public synchronized final void setValue(final Date value)
Sets this EntityProperty using the serialized value.
Parameters:
setValue
public synchronized final void setValue(final double value)
Sets this EntityProperty using the serialized value.
Parameters:
setValue
public synchronized final void setValue(final Double value)
Sets this EntityProperty using the serialized value.
Parameters:
setValue
public synchronized final void setValue(final int value)
Sets this EntityProperty using the serialized value.
Parameters:
setValue
public synchronized final void setValue(final Integer value)
Sets this EntityProperty using the serialized value.
Parameters:
setValue
public synchronized final void setValue(final long value)
Sets this EntityProperty using the serialized value.
Parameters:
setValue
public synchronized final void setValue(final Long value)
Sets this EntityProperty using the serialized value.
Parameters:
setValue
public synchronized final void setValue(final String value)
Sets this EntityProperty using the value.
Parameters:
setValue
public synchronized final void setValue(final UUID value)
Sets this EntityProperty using the serialized value.
Parameters: