public class EntityState extends Object implements Comparable<EntityState>
| Modifier and Type | Field and Description |
|---|---|
protected int |
state
Internal representation of all states of entity (use bitwise operation).
|
| Constructor and Description |
|---|
EntityState() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCreated()
Add created state.
|
void |
addDeleted()
Add deleted state.
|
void |
addLoaded()
Add loaded state.
|
void |
addRead()
Add read state
After the invocation, method
isRead() will always return true. |
void |
addUpdated()
Add updated state.
|
void |
addWritten()
Add written state.
|
int |
compareTo(EntityState o) |
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isCreated()
Tells if the
#CREATED state is on. |
boolean |
isDeleted()
Tells if the
#DELETED state is on. |
boolean |
isLoaded()
Tells if the
#LOADED state is on. |
boolean |
isRead()
Tells if the
#READ state is on. |
boolean |
isUpdated()
Tells if the
#UPDATED state is on. |
boolean |
isWritten()
Tells if the
#WRITTEN state is on. |
protected int state
public void addLoaded()
isLoaded() will always return true.public void addRead()
isRead() will always return true.public void addCreated()
isCreated() will always return true.public void addUpdated()
isUpdated() will always return true.public void addWritten()
isWritten() will always return true.public void addDeleted()
isDeleted() will always return true.public boolean isLoaded()
#LOADED state is on.true if #LOADED state is on, false otherwise.public boolean isRead()
#READ state is on.true if #READ state is on, false otherwise.public boolean isCreated()
#CREATED state is on.true if #CREATED state is on, false otherwise.public boolean isWritten()
#WRITTEN state is on.true if #WRITTEN state is on, false otherwise.public boolean isUpdated()
#UPDATED state is on.true if #UPDATED state is on, false otherwise.public boolean isDeleted()
#DELETED state is on.true if #DELETED state is on, false otherwise.public int compareTo(EntityState o)
compareTo in interface Comparable<EntityState>Copyright © 2004–2016 CodeLutin. All rights reserved.