org.springframework.data.gemfire.repository
Class Wrapper<T,KEY extends Serializable>
java.lang.Object
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. |
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.
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