org.javers.repository.jql.ShadowScope Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javers-core Show documentation
Show all versions of javers-core Show documentation
JaVers - object auditing and diff framework for Java
package org.javers.repository.jql;
/**
* @author bartosz.walacik
*/
public enum ShadowScope {
/**
* 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+.
*/
SHALLOW,
/**
* 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.
*/
COMMIT_DEEP,
/**
* 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.
*/
DEEP_PLUS,
/**
* 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
*/
CHILD_VALUE_OBJECT;
public boolean isCommitDeep() {
return this == COMMIT_DEEP;
}
}