org.springframework.data.gemfire.repository
Class Wrapper<T,KEY extends Serializable>

java.lang.Object
  

extended by org.springframework.data.gemfire.repository.Wrapper<T,KEY>

public final class Wrapper<T,KEY extends Serializable>
extends Object

Simple value object to hold an entity alongside an external key the entity shall be stored under.


Constructor Summary
Wrapper(T entity, KEY key)
          The entity to handle as well as the key.
 
Method Summary
 boolean equals(Object value)
           
 T getEntity()
           
 KEY getKey()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Wrapper

public Wrapper(T entity,
               KEY key)
The entity to handle as well as the key.

Parameters:
entity - the application domain object/entity to wrap.
key - must not be null.
Method Detail

getKey

public KEY getKey()
Returns:
the key

getEntity

public T getEntity()
Returns:
the entity

equals

public boolean equals(Object value)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object