voldemort.serialization.json
Class JsonTypeDefinition

java.lang.Object
  extended by voldemort.serialization.json.JsonTypeDefinition
All Implemented Interfaces:
java.io.Serializable

public class JsonTypeDefinition
extends java.lang.Object
implements java.io.Serializable

A Java collections object that represents the expected type

See Also:
Serialized Form

Field Summary
static JsonTypeDefinition BOOLEAN
           
static JsonTypeDefinition DATE
           
static JsonTypeDefinition FLOAT32
           
static JsonTypeDefinition FLOAT64
           
static JsonTypeDefinition INT16
           
static JsonTypeDefinition INT32
           
static JsonTypeDefinition INT64
           
static JsonTypeDefinition INT8
           
static JsonTypeDefinition STRING
           
 
Constructor Summary
JsonTypeDefinition(java.lang.Object type)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
static java.lang.String format(java.lang.Object type)
           
static JsonTypeDefinition fromJson(java.lang.String typeSig)
           
 java.lang.Object getType()
           
 int hashCode()
           
 JsonTypeDefinition projectionType(java.lang.String... properties)
          Get the type created by selecting only a subset of properties from this type.
 JsonTypeDefinition subtype(java.lang.String field)
           
 java.lang.String toString()
           
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

INT8

public static final JsonTypeDefinition INT8

INT16

public static final JsonTypeDefinition INT16

INT32

public static final JsonTypeDefinition INT32

INT64

public static final JsonTypeDefinition INT64

FLOAT32

public static final JsonTypeDefinition FLOAT32

FLOAT64

public static final JsonTypeDefinition FLOAT64

STRING

public static final JsonTypeDefinition STRING

DATE

public static final JsonTypeDefinition DATE

BOOLEAN

public static final JsonTypeDefinition BOOLEAN
Constructor Detail

JsonTypeDefinition

public JsonTypeDefinition(java.lang.Object type)
Method Detail

fromJson

public static JsonTypeDefinition fromJson(java.lang.String typeSig)

projectionType

public JsonTypeDefinition projectionType(java.lang.String... properties)
Get the type created by selecting only a subset of properties from this type. The type must be a map for this to work

Parameters:
properties - The properties to select
Returns:
The new type definition

subtype

public JsonTypeDefinition subtype(java.lang.String field)

getType

public java.lang.Object getType()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

format

public static java.lang.String format(java.lang.Object type)

validate

public void validate()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu