com.basho.riak.client.query.indexes
Class RiakIndexes

java.lang.Object
  extended by com.basho.riak.client.query.indexes.RiakIndexes

public class RiakIndexes
extends Object

Container for the set of index/values for a IRiakObject

Author:
russell

Constructor Summary
RiakIndexes()
           
RiakIndexes(Map<BinIndex,Set<String>> binIndexes, Map<IntIndex,Set<Integer>> intIndexes)
           
 
Method Summary
 RiakIndexes add(String index, int value)
          Add a new IntIndex value to the set
 RiakIndexes add(String index, String value)
          Add a new BinIndex value to the set
static RiakIndexes from(RiakIndexes indexes)
          Copy a RiakIndexes to a new instance
 Set<String> getBinIndex(String name)
          Get a copy of the set of values for a given binary index
 Map<BinIndex,Set<String>> getBinIndexes()
           
 Set<Integer> getIntIndex(String name)
          Get a copy of the set of values for a given int index
 Map<IntIndex,Set<Integer>> getIntIndexes()
           
 RiakIndexes removeAll(BinIndex index)
          Remove a BinIndex
 RiakIndexes removeAll(IntIndex index)
          Remove the IntIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RiakIndexes

public RiakIndexes(Map<BinIndex,Set<String>> binIndexes,
                   Map<IntIndex,Set<Integer>> intIndexes)

RiakIndexes

public RiakIndexes()
Method Detail

getBinIndexes

public Map<BinIndex,Set<String>> getBinIndexes()
Returns:
a *copy* of the BinIndexs

getIntIndexes

public Map<IntIndex,Set<Integer>> getIntIndexes()
Returns:
a *copy* of the IntIndexs

add

public RiakIndexes add(String index,
                       String value)
Add a new BinIndex value to the set

Parameters:
index - the index name
value - the value
Returns:
this

add

public RiakIndexes add(String index,
                       int value)
Add a new IntIndex value to the set

Parameters:
name - name of the index
value - the value
Returns:
this

removeAll

public RiakIndexes removeAll(BinIndex index)
Remove a BinIndex

Parameters:
index - the BinIndex to remove

removeAll

public RiakIndexes removeAll(IntIndex index)
Remove the IntIndex

Parameters:
index - the IntIndex to remove

from

public static RiakIndexes from(RiakIndexes indexes)
Copy a RiakIndexes to a new instance

Parameters:
indexes -
Returns:
a copy of this RiakIndexes

getBinIndex

public Set<String> getBinIndex(String name)
Get a copy of the set of values for a given binary index

Parameters:
name - the name of the index
Returns:
a copy of the values (or the empty set if index is not present)

getIntIndex

public Set<Integer> getIntIndex(String name)
Get a copy of the set of values for a given int index

Parameters:
name - the name of the index
Returns:
a copy of the values (or the empty set if index is not present)


Copyright © 2012. All Rights Reserved.