org.ektorp
Class ComplexKey

java.lang.Object
  extended by org.ektorp.ComplexKey

public class ComplexKey
extends java.lang.Object

Class for creating complex keys for view queries. The keys's components can consists of any JSON-encodeable objects, but are most likely to be Strings and Integers.

Author:
henrik lundgren

Method Summary
static java.lang.Object[] emptyArray()
          Add this array to the key if an empty array definition is desired: [[],"foo"]
static java.lang.Object emptyObject()
          Add this Object to the key if an empty object definition is desired: ["foo",{}]
static ComplexKey of(java.lang.Object... components)
           
 org.codehaus.jackson.JsonNode toJson()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

of

public static ComplexKey of(java.lang.Object... components)

emptyObject

public static java.lang.Object emptyObject()
Add this Object to the key if an empty object definition is desired: ["foo",{}]

Returns:
an object that will serialize to {}

emptyArray

public static java.lang.Object[] emptyArray()
Add this array to the key if an empty array definition is desired: [[],"foo"]

Returns:
an object array that will serialize to []

toJson

public org.codehaus.jackson.JsonNode toJson()


Copyright © 2011. All Rights Reserved.