org.ektorp
Class ComplexKey

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

public class ComplexKey
extends 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 Object[] emptyArray()
          Add this array to the key if an empty array definition is desired: [[],"foo"]
static Object emptyObject()
          Add this Object to the key if an empty object definition is desired: ["foo",{}]
static ComplexKey of(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(Object... components)

emptyObject

public static 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 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.