Package org.javers.repository.jql
Enum ShadowScope
- java.lang.Object
-
- java.lang.Enum<ShadowScope>
-
- org.javers.repository.jql.ShadowScope
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ShadowScope>
public enum ShadowScope extends java.lang.Enum<ShadowScope>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CHILD_VALUE_OBJECT
JaVers loads all child ValueObjects owned by selected Entities.COMMIT_DEEP
JaVers restores commit-deep shadow graph.DEEP_PLUS
JaVers tries to restore an original object graph with (possibly) all object references resolved.SHALLOW
Default scope.
Object shadows are created only from snapshots selected directly in the main JQL query.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isCommitDeep()
static ShadowScope
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ShadowScope[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 parametermaxGapsToFill
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 Detail
-
values
public static ShadowScope[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ShadowScope c : ShadowScope.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ShadowScope valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isCommitDeep
public boolean isCommitDeep()
-
-