java.lang.Object
io.ebeaninternal.server.persist.Flags
Flags used in persistence.
Allows passing of flag state when recursively persisting.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIndicates the bean is being inserted.static final intIndicates Merge mode.static final intIndicates Normal insert or update (not forced).static final intIndicates persist cascade.static final intNo flags set. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisInsert(int state) Return true if the bean is being inserted.static booleanisMerge(int state) Return true if part of a Merge.static booleanisMergeOrNormal(int state) Return true if part of a Merge or Publish or Normal (bean state matches persist).static booleanisRecurse(int state) Return true if persist cascading.static booleanisSet(int state, int flag) Return true if the given flag is set.static booleanisUpdateForce(int state) static intsetInsert(int state) Set Insert flag.static intsetInsertNormal(int state) Insert flag and normal in that bean is in NEW state (for insert).static intsetMerge(int state) Set Merge flag.static intsetRecurse(int state) Set Recurse flag.static intsetUpdate(int state) Parent was not inserted.static intsetUpdateNormal(int state) Not Insert and normal in that bean is in LOADED state (for update).static intunsetMerge(int state) static intunsetRecurse(int state)
-
Field Details
-
INSERT
public static final int INSERTIndicates the bean is being inserted.- See Also:
-
RECURSE
public static final int RECURSEIndicates persist cascade.- See Also:
-
MERGE
public static final int MERGEIndicates Merge mode.- See Also:
-
NORMAL
public static final int NORMALIndicates Normal insert or update (not forced).- See Also:
-
ZERO
public static final int ZERONo flags set.- See Also:
-
-
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)
-