| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.batch.core.Entity
public class Entity
Batch Domain Entity class. Any class that should be uniquely identifiable from another should subclass from Entity. More information on this pattern and the difference between Entities and Value Objects can be found in Domain Driven Design by Eric Evans.
| Constructor Summary | |
|---|---|
| Entity() | |
| Entity(Long id) | |
| Method Summary | |
|---|---|
|  boolean | equals(Object other)Attempt to establish identity based on id if both exist. | 
|  Long | getId() | 
|  Integer | getVersion() | 
|  int | hashCode()Use ID if it exists to establish hash code, otherwise fall back to Object.hashCode(). | 
|  void | incrementVersion() | 
|  void | setId(Long id) | 
|  String | toString() | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public Entity()
public Entity(Long id)
| Method Detail | 
|---|
public Long getId()
public void setId(Long id)
public Integer getVersion()
public void incrementVersion()
public String toString()
toString in class Objectpublic boolean equals(Object other)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
Entity to a
 Set because Set.contains() will almost certainly return false for the
 Entity after it is saved. Spring Batch does not store any of its
 entities in Sets as a matter of course, so internally this is consistent.
 Clients should not be exposed to unsaved entities.
hashCode in class ObjectObject.hashCode()| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||