public class PropertyValue extends Object implements org.apache.flink.types.Value, Serializable, Comparable<PropertyValue>
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_BINARY_LENGTH
We use a short as length prefix in binary representations of this property.
|
static PropertyValue |
NULL_VALUE
Represents a property value that is
null. |
static byte |
OFFSET
Value offset in byte
|
static byte |
TYPE_BIG_DECIMAL
<property-type> for String |
static byte |
TYPE_BOOLEAN
<property-type> for Boolean |
static byte |
TYPE_DATE
<property-type> for List |
static byte |
TYPE_DATETIME
<property-type> for List |
static byte |
TYPE_DOUBLE
<property-type> for Double |
static byte |
TYPE_FLOAT
<property-type> for Float |
static byte |
TYPE_GRADOOP_ID
<property-type> for GradoopId |
static byte |
TYPE_INTEGER
<property-type> for Integer |
static byte |
TYPE_LIST
<property-type> for List |
static byte |
TYPE_LONG
<property-type> for Long |
static byte |
TYPE_MAP
<property-type> for HashMap |
static byte |
TYPE_NULL
<property-type> for empty property value (i.e. |
static byte |
TYPE_STRING
<property-type> for String |
static byte |
TYPE_TIME
<property-type> for List |
| Constructor and Description |
|---|
PropertyValue()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
byteSize()
Returns the byte size of the properties internal representation
|
int |
compareTo(PropertyValue o) |
static PropertyValue |
create(Object value)
Creates a new Property Value from the given object.
|
boolean |
equals(Object o) |
static PropertyValue |
fromRawBytes(byte[] rawBytes)
Create a
PropertyValue that wraps a byte array |
BigDecimal |
getBigDecimal()
Returns the wrapped value as
BigDecimal. |
boolean |
getBoolean()
Returns the wrapped value as
boolean. |
int |
getByteSize() |
java.time.LocalDate |
getDate()
Returns the wrapped List as
LocalDate. |
java.time.LocalDateTime |
getDateTime()
Returns the wrapped List as
LocalDateTime. |
double |
getDouble()
Returns the wrapped value as
double. |
float |
getFloat()
Returns the wrapped value as
float. |
GradoopId |
getGradoopId()
Returns the wrapped value as
GradoopId. |
int |
getInt()
Returns the wrapped value as
int. |
List<PropertyValue> |
getList()
Returns the wrapped List as
List<PropertyValue>. |
long |
getLong()
Returns the wrapped value as
long. |
Map<PropertyValue,PropertyValue> |
getMap()
Returns the wrapped Map as
Map<PropertyValue, PropertyValue>. |
Object |
getObject()
Returns the wrapped value as object.
|
byte[] |
getRawBytes() |
String |
getString()
Returns the wrapped value as
String. |
java.time.LocalTime |
getTime()
Returns the wrapped List as
LocalTime. |
Class<?> |
getType() |
int |
hashCode() |
boolean |
isBigDecimal()
True, if the wrapped value is of type
BigDecimal. |
boolean |
isBoolean()
True, if the wrapped value is of type
boolean. |
boolean |
isDate()
True, if the wrapped value is of type
LocalDate. |
boolean |
isDateTime()
True, if the wrapped value is of type
LocalDateTime. |
boolean |
isDouble()
True, if the wrapped value is of type
double. |
boolean |
isFloat()
True, if the wrapped value is of type
float. |
boolean |
isGradoopId()
True, if the wrapped value is of type
GradoopId. |
boolean |
isInt()
True, if the wrapped value is of type
int. |
boolean |
isList()
True, if the wrapped value is of type
List. |
boolean |
isLong()
True, if the wrapped value is of type
long. |
boolean |
isMap()
True, if the wrapped value is of type
Map. |
boolean |
isNull()
True, if the value represents
null. |
boolean |
isString()
True, if the wrapped value is of type
String. |
boolean |
isTime()
True, if the wrapped value is of type
LocalTime. |
void |
read(org.apache.flink.core.memory.DataInputView inputView) |
void |
setBigDecimal(BigDecimal bigDecimalValue)
Sets the wrapped value as
BigDecimal value. |
void |
setBoolean(boolean booleanValue)
Sets the wrapped value as
boolean value. |
void |
setBytes(byte[] bytes)
Set internal byte representation
|
void |
setDate(java.time.LocalDate date)
Sets the wrapped value as
LocalDate value. |
void |
setDateTime(java.time.LocalDateTime dateTime)
Sets the wrapped value as
LocalDateTime value. |
void |
setDouble(double doubleValue)
Sets the wrapped value as
double value. |
void |
setFloat(float floatValue)
Sets the wrapped value as
float value. |
void |
setGradoopId(GradoopId gradoopIdValue)
Sets the wrapped value as
GradoopId value. |
void |
setInt(int intValue)
Sets the wrapped value as
int value. |
void |
setList(List<PropertyValue> list)
Sets the wrapped value as
List value. |
void |
setLong(long longValue)
Sets the wrapped value as
long value. |
void |
setMap(Map<PropertyValue,PropertyValue> map)
Sets the wrapped value as
Map value. |
void |
setObject(Object value)
Sets the given value as internal value if it has a supported type.
|
void |
setString(String stringValue)
Sets the wrapped value as
String value. |
void |
setTime(java.time.LocalTime time)
Sets the wrapped value as
LocalTime value. |
String |
toString() |
void |
write(org.apache.flink.core.memory.DataOutputView outputView)
Byte representation:
byte 1 : type info
for dynamic length types (e.g.
|
public static final PropertyValue NULL_VALUE
null.public static final transient byte TYPE_NULL
<property-type> for empty property value (i.e. null)public static final transient byte TYPE_BOOLEAN
<property-type> for Booleanpublic static final transient byte TYPE_INTEGER
<property-type> for Integerpublic static final transient byte TYPE_LONG
<property-type> for Longpublic static final transient byte TYPE_FLOAT
<property-type> for Floatpublic static final transient byte TYPE_DOUBLE
<property-type> for Doublepublic static final transient byte TYPE_STRING
<property-type> for Stringpublic static final transient byte TYPE_BIG_DECIMAL
<property-type> for Stringpublic static final transient byte TYPE_GRADOOP_ID
<property-type> for GradoopIdpublic static final transient byte TYPE_MAP
<property-type> for HashMappublic static final transient byte TYPE_LIST
<property-type> for Listpublic static final transient byte TYPE_DATE
<property-type> for Listpublic static final transient byte TYPE_TIME
<property-type> for Listpublic static final transient byte TYPE_DATETIME
<property-type> for Listpublic static final transient byte OFFSET
public static final int MAX_BINARY_LENGTH
public static PropertyValue create(Object value)
UnsupportedTypeException will be thrown.value - value with supported typepublic boolean isNull()
null.null valuepublic boolean isBoolean()
boolean.boolean valuepublic boolean isInt()
int.int valuepublic boolean isLong()
long.long valuepublic boolean isFloat()
float.float valuepublic boolean isDouble()
double.double valuepublic boolean isString()
String.String valuepublic boolean isBigDecimal()
BigDecimal.BigDecimal valueBigDecimalpublic boolean isGradoopId()
GradoopId.GradoopId valuepublic boolean isMap()
Map.Map valuepublic boolean isList()
List.List valuepublic boolean isDate()
LocalDate.LocalDate valuepublic boolean isTime()
LocalTime.LocalTime valuepublic boolean isDateTime()
LocalDateTime.LocalDateTime valuepublic Object getObject()
null if the value is emptypublic boolean getBoolean()
boolean.boolean valuepublic int getInt()
int.int valuepublic long getLong()
long.long valuepublic float getFloat()
float.float valuepublic double getDouble()
double.double valuepublic String getString()
String.String valuepublic BigDecimal getBigDecimal()
BigDecimal.BigDecimal valueBigDecimalpublic GradoopId getGradoopId()
GradoopId.GradoopId valuepublic Map<PropertyValue,PropertyValue> getMap()
Map<PropertyValue, PropertyValue>.Map<PropertyValue, PropertyValue> valuepublic List<PropertyValue> getList()
List<PropertyValue>.List<PropertyValue> valuepublic java.time.LocalDate getDate()
LocalDate.LocalDate valuepublic java.time.LocalTime getTime()
LocalTime.LocalTime valuepublic java.time.LocalDateTime getDateTime()
LocalDateTime.LocalDateTime valuepublic void setObject(Object value)
value - valueUnsupportedTypeExceptionpublic void setBoolean(boolean booleanValue)
boolean value.booleanValue - valuepublic void setInt(int intValue)
int value.intValue - intValuepublic void setLong(long longValue)
long value.longValue - valuepublic void setFloat(float floatValue)
float value.floatValue - valuepublic void setDouble(double doubleValue)
double value.doubleValue - valuepublic void setString(String stringValue)
String value.stringValue - valuepublic void setBigDecimal(BigDecimal bigDecimalValue)
BigDecimal value.bigDecimalValue - valuepublic void setGradoopId(GradoopId gradoopIdValue)
GradoopId value.gradoopIdValue - valuepublic void setMap(Map<PropertyValue,PropertyValue> map)
Map value.map - valuepublic void setList(List<PropertyValue> list)
List value.list - valuepublic void setDate(java.time.LocalDate date)
LocalDate value.date - valuepublic void setTime(java.time.LocalTime time)
LocalTime value.time - valuepublic void setDateTime(java.time.LocalDateTime dateTime)
LocalDateTime value.dateTime - valuepublic Class<?> getType()
public int getByteSize()
public byte[] getRawBytes()
public void setBytes(byte[] bytes)
bytes - arraypublic static PropertyValue fromRawBytes(byte[] rawBytes)
PropertyValue that wraps a byte arrayrawBytes - array to wrapPropertyValuepublic int compareTo(PropertyValue o)
compareTo in interface Comparable<PropertyValue>public int byteSize()
public void write(org.apache.flink.core.memory.DataOutputView outputView)
throws IOException
write in interface org.apache.flink.core.io.IOReadableWritableoutputView - data output to write data toIOExceptionpublic void read(org.apache.flink.core.memory.DataInputView inputView)
throws IOException
read in interface org.apache.flink.core.io.IOReadableWritableIOExceptionCopyright © 2014 - 2018–2018 University of Leipzig. All rights reserved.