Enum Class ShadowScope

java.lang.Object
java.lang.Enum<ShadowScope>
org.javers.repository.jql.ShadowScope
All Implemented Interfaces:
Serializable, Comparable<ShadowScope>, Constable

public enum ShadowScope extends Enum<ShadowScope>
  • Enum Constant Details

    • SHALLOW

      public static final ShadowScope SHALLOW
      Default scope.
      Object shadows are created only from snapshots selected directly in the main JQL query.

      This query is fast (no additional queries are executed) but shadows are shallow. Most object references are nulled.

      You can initialize referenced objects using the wider scopes: child-value-object, commit-deep or deep+.
    • COMMIT_DEEP

      public static final ShadowScope COMMIT_DEEP
      JaVers restores commit-deep shadow graph. Referenced objects are resolved if they exist in selected commits.

      Caution! Commit-deep doesn't mean full. References to objects that aren't available in selected commits are nulled. This may be observed as unexpected gaps in a shadow graph.
      You can fill these gaps using Deep+ scope.

      Commit-deep query is slower than shallow query, because JaVers executes the additional query to load all snapshots in commits touched by the main JQL query.
    • DEEP_PLUS

      public static final ShadowScope DEEP_PLUS
      JaVers tries to restore an original object graph with (possibly) all object references resolved.

      Caution! Deep+ doesn't mean full, it just fills recursively potential gaps in the restored object graph.
      We have to stop somewhere. The query parameter maxGapsToFill limits the number of objects that would be loaded.

      Deep+ query can be slower than commit-deep query. JaVers executes up to N additional queries to fill potential gaps in the object graph (one query per each gap).

      Warning: since 3.6.3, deep+ scope doesn't include commit-deep scope. They are independent scopes.
    • CHILD_VALUE_OBJECT

      public static final ShadowScope CHILD_VALUE_OBJECT
      JaVers loads all child ValueObjects owned by selected Entities.

      This scope is implicitly added to all Shadow scopes and can't be disabled.
      Since:
      3.6.1
  • Method Details

    • values

      public static ShadowScope[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ShadowScope valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isCommitDeep

      public boolean isCommitDeep()