Spring Data Key-Value

org.springframework.data.keyvalue.redis.support.collections
Class AbstractRedisCollection<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by org.springframework.data.keyvalue.redis.support.collections.AbstractRedisCollection<E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, KeyBound<String>, RedisCollection<E>, RedisStore
Direct Known Subclasses:
DefaultRedisList, DefaultRedisSet, DefaultRedisZSet

public abstract class AbstractRedisCollection<E>
extends AbstractCollection<E>
implements RedisCollection<E>

Base implementation for RedisCollection. Provides a skeletal implementation.

Author:
Costin Leau

Field Summary
static String ENCODING
           
 
Constructor Summary
AbstractRedisCollection(String key, RedisOperations<String,E> operations)
           
 
Method Summary
abstract  boolean add(E e)
           
 boolean addAll(Collection<? extends E> c)
           
abstract  void clear()
           
 boolean containsAll(Collection<?> c)
           
 boolean equals(Object o)
           
 String getKey()
          Returns the key associated with this entity.
 RedisOperations<String,E> getOperations()
          Returns the underlying Redis operations used by the backing implementation.
 int hashCode()
           
abstract  boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 String toString()
           
 
Methods inherited from class java.util.AbstractCollection
contains, isEmpty, iterator, size, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ENCODING

public static final String ENCODING
See Also:
Constant Field Values
Constructor Detail

AbstractRedisCollection

public AbstractRedisCollection(String key,
                               RedisOperations<String,E> operations)
Method Detail

getKey

public String getKey()
Description copied from interface: KeyBound
Returns the key associated with this entity.

Specified by:
getKey in interface KeyBound<String>
Returns:
key associated with the implementing entity

getOperations

public RedisOperations<String,E> getOperations()
Description copied from interface: RedisStore
Returns the underlying Redis operations used by the backing implementation.

Specified by:
getOperations in interface RedisStore
Returns:
operations

addAll

public boolean addAll(Collection<? extends E> c)
Specified by:
addAll in interface Collection<E>
Overrides:
addAll in class AbstractCollection<E>

add

public abstract boolean add(E e)
Specified by:
add in interface Collection<E>
Overrides:
add in class AbstractCollection<E>

clear

public abstract void clear()
Specified by:
clear in interface Collection<E>
Overrides:
clear in class AbstractCollection<E>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<E>
Overrides:
containsAll in class AbstractCollection<E>

remove

public abstract boolean remove(Object o)
Specified by:
remove in interface Collection<E>
Overrides:
remove in class AbstractCollection<E>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<E>
Overrides:
removeAll in class AbstractCollection<E>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<E>
Overrides:
retainAll in class AbstractCollection<E>

equals

public boolean equals(Object o)
Specified by:
equals in interface Collection<E>
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<E>
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class AbstractCollection<E>

Spring Data Key-Value

Copyright © 2010-2011 SpringSource. All Rights Reserved.