Class EntityState

java.lang.Object
org.nuiton.topia.framework.EntityState
All Implemented Interfaces:
Comparable<EntityState>

public class EntityState extends Object implements Comparable<EntityState>
Used to know the state of entity during transaction.
Author:
poussin <poussin@codelutin.com>
  • Field Details

    • state

      protected int state
      internal representation of all states of entity (use bitwise operation).
  • Constructor Details

    • EntityState

      public EntityState()
  • Method Details

    • addLoad

      public void addLoad()
      Add load state. After the invocation, method isLoad() will always return true.
    • addRead

      public void addRead()
      Add read state After the invocation, method isRead() will always return true.
    • addCreate

      public void addCreate()
      Add create state. After the invocation, method isCreate() will always return true.
    • addUpdate

      public void addUpdate()
      Add update state. After the invocation, method isUpdate() will always return true.
    • addDelete

      public void addDelete()
      Add delete state. After the invocation, method isDelete() will always return true.
    • isLoad

      public boolean isLoad()
      Tells if the #LOAD state is on.
      Returns:
      true if #LOAD state is on, false otherwise.
    • isRead

      public boolean isRead()
      Tells if the #READ state is on.
      Returns:
      true if #READ state is on, false otherwise.
    • isCreate

      public boolean isCreate()
      Tells if the #CREATE state is on.
      Returns:
      true if #CREATE state is on, false otherwise.
    • isUpdate

      public boolean isUpdate()
      Tells if the #UPDATE state is on.
      Returns:
      true if #UPDATE state is on, false otherwise.
    • isDelete

      public boolean isDelete()
      Tells if the #DELETE state is on.
      Returns:
      true if #DELETE state is on, false otherwise.
    • compareTo

      public int compareTo(EntityState o)
      Specified by:
      compareTo in interface Comparable<EntityState>