NebulaGraph Java Client  release-3.6
ValueWrapper Class Reference

Classes

class  NullType
 

Public Member Functions

 ValueWrapper (Value value, String decodeType)
 
 ValueWrapper (Value value, String decodeType, int timezoneOffset)
 
Value getValue ()
 get the original data structure, the Value is the return from nebula-graph More...
 
boolean isEmpty ()
 judge the Value is Empty type, the Empty type is the nebula's type More...
 
boolean isNull ()
 judge the Value is Null type,the Null type is the nebula's type More...
 
boolean isBoolean ()
 judge the Value is Boolean type More...
 
boolean isLong ()
 judge the Value is Long type More...
 
boolean isDouble ()
 judge the Value is Double type More...
 
boolean isString ()
 judge the Value is String type More...
 
boolean isList ()
 judge the Value is List type, the List type is the nebula's type More...
 
boolean isSet ()
 judge the Value is Set type, the Set type is the nebula's type More...
 
boolean isMap ()
 judge the Value is Map type, the Map type is the nebula's type More...
 
boolean isTime ()
 judge the Value is Time type, the Time type is the nebula's type More...
 
boolean isDate ()
 judge the Value is Date type, the Date type is the nebula's type More...
 
boolean isDateTime ()
 judge the Value is DateTime type, the DateTime type is the nebula's type More...
 
boolean isVertex ()
 judge the Value is Vertex type, the Vertex type is the nebula's type More...
 
boolean isEdge ()
 judge the Value is Edge type, the Edge type is the nebula's type More...
 
boolean isPath ()
 judge the Value is Path type, the Path type is the nebula's type More...
 
boolean isGeography ()
 judge the Value is Geography type, the Geography type is the nebula's type More...
 
boolean isDuration ()
 judge the Value is Duration type, the Duration type is the nebula's type More...
 
NullType asNull () throws InvalidValueException
 Convert the original data type Value to NullType. More...
 
boolean asBoolean () throws InvalidValueException
 Convert the original data type Value to boolean. More...
 
long asLong () throws InvalidValueException
 Convert the original data type Value to long. More...
 
String asString () throws InvalidValueException, UnsupportedEncodingException
 Convert the original data type Value to String. More...
 
double asDouble () throws InvalidValueException
 Convert the original data type Value to double. More...
 
ArrayList< ValueWrapperasList () throws InvalidValueException
 Convert the original data type Value to ArrayList. More...
 
HashSet< ValueWrapperasSet () throws InvalidValueException
 Convert the original data type Value to HashSet. More...
 
HashMap< String, ValueWrapperasMap () throws InvalidValueException, UnsupportedEncodingException
 Convert the original data type Value to HashMap. More...
 
TimeWrapper asTime () throws InvalidValueException
 Convert the original data type Value to TimeWrapper. More...
 
DateWrapper asDate () throws InvalidValueException
 Convert the original data type Value to DateWrapper. More...
 
DateTimeWrapper asDateTime () throws InvalidValueException
 Convert the original data type Value to DateTimeWrapper. More...
 
Node asNode () throws InvalidValueException, UnsupportedEncodingException
 Convert the original data type Value to Node. More...
 
Relationship asRelationship () throws InvalidValueException
 Convert the original data type Value to Relationship. More...
 
PathWrapper asPath () throws InvalidValueException, UnsupportedEncodingException
 Convert the original data type Value to Path. More...
 
GeographyWrapper asGeography () throws InvalidValueException
 Convert the original data type Value to geography. More...
 
DurationWrapper asDuration () throws InvalidValueException
 Convert the original data type Value to duration. More...
 
boolean equals (Object o)
 
int hashCode ()
 
String toString ()
 Convert Value to String format. More...
 

Detailed Description

Definition at line 17 of file ValueWrapper.java.

Constructor & Destructor Documentation

◆ ValueWrapper() [1/2]

ValueWrapper ( Value  value,
String  decodeType 
)
Parameters
valuethe Value get from service
decodeTypethe decodeType get from the service to decode the byte array, but now the service no return the decodeType, so use the utf-8

Definition at line 112 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ ValueWrapper() [2/2]

ValueWrapper ( Value  value,
String  decodeType,
int  timezoneOffset 
)
Parameters
valuethe Value get from service
decodeTypethe decodeType get from the service to decode the byte array, but now the service no return the decodeType, so use the utf-8
timezoneOffsetthe timezone offset get from the service to calculate local time

Definition at line 124 of file ValueWrapper.java.

Member Function Documentation

◆ asBoolean()

boolean asBoolean ( ) throws InvalidValueException

Convert the original data type Value to boolean.

Returns
boolean
Exceptions
InvalidValueExceptionif the value type is not boolean

Definition at line 313 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ asDate()

Convert the original data type Value to DateWrapper.

Returns
DateWrapper
Exceptions
InvalidValueExceptionif the value type is not date

Definition at line 444 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ asDateTime()

DateTimeWrapper asDateTime ( ) throws InvalidValueException

Convert the original data type Value to DateTimeWrapper.

Returns
DateTimeWrapper
Exceptions
InvalidValueExceptionif the value type is not datetime

Definition at line 458 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ asDouble()

double asDouble ( ) throws InvalidValueException

Convert the original data type Value to double.

Returns
double
Exceptions
InvalidValueExceptionif the value type is not double

Definition at line 357 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ asDuration()

DurationWrapper asDuration ( ) throws InvalidValueException

Convert the original data type Value to duration.

Returns
DurationWrapper
Exceptions
InvalidValueExceptionif the value type is not duration

Definition at line 540 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ asGeography()

GeographyWrapper asGeography ( ) throws InvalidValueException

Convert the original data type Value to geography.

Returns
GeographyWrapper
Exceptions
InvalidValueExceptionif the value type is not geography

Definition at line 524 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ asList()

ArrayList<ValueWrapper> asList ( ) throws InvalidValueException

Convert the original data type Value to ArrayList.

Returns
ArrayList of ValueWrapper
Exceptions
InvalidValueExceptionif the value type is not list

Definition at line 371 of file ValueWrapper.java.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ asLong()

long asLong ( ) throws InvalidValueException

Convert the original data type Value to long.

Returns
long
Exceptions
InvalidValueExceptionif the value type is not long

Definition at line 327 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ asMap()

HashMap<String, ValueWrapper> asMap ( ) throws InvalidValueException, UnsupportedEncodingException

Convert the original data type Value to HashMap.

Returns
HashMap, the key is String, value is ValueWrapper
Exceptions
InvalidValueExceptionif the value type is not map

Definition at line 407 of file ValueWrapper.java.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ asNode()

Node asNode ( ) throws InvalidValueException, UnsupportedEncodingException

Convert the original data type Value to Node.

Returns
Node
Exceptions
InvalidValueExceptionif the value type is not vertex
UnsupportedEncodingExceptionif decode binary failed

Definition at line 475 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ asNull()

NullType asNull ( ) throws InvalidValueException

Convert the original data type Value to NullType.

Returns
NullType
Exceptions
InvalidValueExceptionif the value type is not null

Definition at line 298 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ asPath()

PathWrapper asPath ( ) throws InvalidValueException, UnsupportedEncodingException

Convert the original data type Value to Path.

Returns
PathWrapper
Exceptions
InvalidValueExceptionif the value type is not path
UnsupportedEncodingExceptionif decode bianry failed

Definition at line 508 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ asRelationship()

Relationship asRelationship ( ) throws InvalidValueException

Convert the original data type Value to Relationship.

Returns
Relationship
Exceptions
InvalidValueExceptionif the value type is not edge

Definition at line 491 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ asSet()

HashSet<ValueWrapper> asSet ( ) throws InvalidValueException

Convert the original data type Value to HashSet.

Returns
HashSet of ValueWrapper
Exceptions
InvalidValueExceptionif the value type is not set

Definition at line 389 of file ValueWrapper.java.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ asString()

String asString ( ) throws InvalidValueException, UnsupportedEncodingException

Convert the original data type Value to String.

Returns
String
Exceptions
InvalidValueExceptionif the value type is not string
UnsupportedEncodingExceptionif decode bianry failed

Definition at line 343 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ asTime()

Convert the original data type Value to TimeWrapper.

Returns
TimeWrapper
Exceptions
InvalidValueExceptionif the value type is not time

Definition at line 428 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ getValue()

Value getValue ( )

get the original data structure, the Value is the return from nebula-graph

Returns
Value

Definition at line 135 of file ValueWrapper.java.

◆ isBoolean()

boolean isBoolean ( )

judge the Value is Boolean type

Returns
boolean

Definition at line 162 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ isDate()

boolean isDate ( )

judge the Value is Date type, the Date type is the nebula's type

Returns
boolean

Definition at line 234 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ isDateTime()

boolean isDateTime ( )

judge the Value is DateTime type, the DateTime type is the nebula's type

Returns
boolean

Definition at line 243 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ isDouble()

boolean isDouble ( )

judge the Value is Double type

Returns
boolean

Definition at line 180 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ isDuration()

boolean isDuration ( )

judge the Value is Duration type, the Duration type is the nebula's type

Returns
boolean

Definition at line 288 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ isEdge()

boolean isEdge ( )

judge the Value is Edge type, the Edge type is the nebula's type

Returns
boolean

Definition at line 261 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ isEmpty()

boolean isEmpty ( )

judge the Value is Empty type, the Empty type is the nebula's type

Returns
boolean

Definition at line 144 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ isGeography()

boolean isGeography ( )

judge the Value is Geography type, the Geography type is the nebula's type

Returns
boolean

Definition at line 279 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ isList()

boolean isList ( )

judge the Value is List type, the List type is the nebula's type

Returns
boolean

Definition at line 198 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ isLong()

boolean isLong ( )

judge the Value is Long type

Returns
boolean

Definition at line 171 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ isMap()

boolean isMap ( )

judge the Value is Map type, the Map type is the nebula's type

Returns
boolean

Definition at line 216 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ isNull()

boolean isNull ( )

judge the Value is Null type,the Null type is the nebula's type

Returns
boolean

Definition at line 153 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ isPath()

boolean isPath ( )

judge the Value is Path type, the Path type is the nebula's type

Returns
boolean

Definition at line 270 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ isSet()

boolean isSet ( )

judge the Value is Set type, the Set type is the nebula's type

Returns
boolean

Definition at line 207 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ isString()

boolean isString ( )

judge the Value is String type

Returns
boolean

Definition at line 189 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ isTime()

boolean isTime ( )

judge the Value is Time type, the Time type is the nebula's type

Returns
boolean

Definition at line 225 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ isVertex()

boolean isVertex ( )

judge the Value is Vertex type, the Vertex type is the nebula's type

Returns
boolean

Definition at line 252 of file ValueWrapper.java.

+ Here is the caller graph for this function:

◆ toString()

String toString ( )

Convert Value to String format.

Returns
String

Definition at line 574 of file ValueWrapper.java.

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: