Class Flags

java.lang.Object
io.ebeaninternal.server.persist.Flags

public final class Flags extends Object
Flags used in persistence.

Allows passing of flag state when recursively persisting.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Indicates the bean is being inserted.
    static final int
    Indicates Merge mode.
    static final int
    Indicates Normal insert or update (not forced).
    static final int
    Indicates persist cascade.
    static final int
    No flags set.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    isInsert(int state)
    Return true if the bean is being inserted.
    static boolean
    isMerge(int state)
    Return true if part of a Merge.
    static boolean
    isMergeOrNormal(int state)
    Return true if part of a Merge or Publish or Normal (bean state matches persist).
    static boolean
    isRecurse(int state)
    Return true if persist cascading.
    static boolean
    isSet(int state, int flag)
    Return true if the given flag is set.
    static boolean
    isUpdateForce(int state)
     
    static int
    setInsert(int state)
    Set Insert flag.
    static int
    setInsertNormal(int state)
    Insert flag and normal in that bean is in NEW state (for insert).
    static int
    setMerge(int state)
    Set Merge flag.
    static int
    setRecurse(int state)
    Set Recurse flag.
    static int
    setUpdate(int state)
    Parent was not inserted.
    static int
    setUpdateNormal(int state)
    Not Insert and normal in that bean is in LOADED state (for update).
    static int
    unsetMerge(int state)
     
    static int
    unsetRecurse(int state)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • Flags

      public Flags()
  • Method Details

    • isInsert

      public static boolean isInsert(int state)
      Return true if the bean is being inserted.
    • isRecurse

      public static boolean isRecurse(int state)
      Return true if persist cascading.
    • isMerge

      public static boolean isMerge(int state)
      Return true if part of a Merge.
    • isMergeOrNormal

      public static boolean isMergeOrNormal(int state)
      Return true if part of a Merge or Publish or Normal (bean state matches persist).
    • isUpdateForce

      public static boolean isUpdateForce(int state)
    • isSet

      public static boolean isSet(int state, int flag)
      Return true if the given flag is set.
    • setInsert

      public static int setInsert(int state)
      Set Insert flag.
    • setInsertNormal

      public static int setInsertNormal(int state)
      Insert flag and normal in that bean is in NEW state (for insert).
    • setUpdate

      public static int setUpdate(int state)
      Parent was not inserted.
    • setUpdateNormal

      public static int setUpdateNormal(int state)
      Not Insert and normal in that bean is in LOADED state (for update).
    • setRecurse

      public static int setRecurse(int state)
      Set Recurse flag.
    • unsetRecurse

      public static int unsetRecurse(int state)
    • setMerge

      public static int setMerge(int state)
      Set Merge flag.
    • unsetMerge

      public static int unsetMerge(int state)