Package com.evolveum.midpoint.prism.lazy
Class GenericLazyPrismContainerValue<C extends Containerable>
java.lang.Object
com.evolveum.midpoint.prism.lazy.GenericLazyPrismContainerValue<C>
- Type Parameters:
C-
- All Implemented Interfaces:
ComplexCopyable<PrismValue>,PrismContainerValueDelegator<C>,PrismValueDelegator,Freezable,MidpointOriginMetadata,ParentVisitable,PathVisitable,PrismContainerValue<C>,PrismValue,PrismVisitable,Revivable,SchemaLookup.Aware,Visitable,Walkable,DebugDumpable,Serializable
@Experimental
public class GenericLazyPrismContainerValue<C extends Containerable>
extends Object
implements PrismContainerValueDelegator<C>
Lazily evaluated
PrismContainerValue.
The materialization, as well as some key information necessary in the lazy state (e.g., the PCV ID) are provided by
GenericLazyPrismContainerValue.ValueSource instance.
EXPERIMENTAL. Tailored to the needs of midPoint magic assignment.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceNested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismContainerValue
PrismContainerValue.RemovedItemDefinitionException -
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Method Summary
Modifier and TypeMethodDescriptionclone()Literal clone.delegate()This will materialize the value on almost any API call (which is OK for now).voidfreeze()Should be no-op (or very quick) if the object is already immutable.static <C extends Containerable>
GenericLazyPrismContainerValue<C>from(@NotNull GenericLazyPrismContainerValue.ValueSource<C> source) getId()@Nullable PrismContainerable<C><T> TReturns the statically-typed "real value".booleanvoidMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutableMethods inherited from interface com.evolveum.midpoint.prism.PrismContainerValue
copy, immutableCopy, mutableCopyMethods inherited from interface com.evolveum.midpoint.prism.deleg.PrismContainerValueDelegator
accept, accept, acceptParentVisitor, acceptVisitor, add, add, addAll, addAllReplaceExisting, addRawElement, addReplaceExisting, applyDefinition, applyDefinition, applyDefinition, asContainerable, asContainerable, assertDefinitions, assertDefinitions, asSingleValuedContainer, canRepresent, checkNothingExceptFor, clear, cloneComplex, contains, contains, containsItem, createDetachedSubItem, createImmutableClone, createProperty, createProperty, deleteRawElement, equivalent, findContainer, findItem, findItem, findItem, findOrCreateContainer, findOrCreateItem, findOrCreateItem, findOrCreateItem, findOrCreateProperty, findOrCreateProperty, findOrCreateReference, findPartial, findProperty, findProperty, findReference, getCompileTimeClass, getComplexTypeDefinition, getContainer, getDefinition, getItemNames, getItemRealValue, getItems, getProperties, getPropertyRealValue, getRootValue, getValue, hasCompleteDefinition, hasNoItems, isIdOnly, keepPaths, merge, mergeContent, recompute, remove, removeAll, removeContainer, removeItem, removeItems, removeMetadataFromPaths, removeOperationalItems, removePaths, removeProperty, removeRawElement, removeReference, replace, revive, schemaLookup, setId, setOriginTypeRecursive, setPropertyRealValue, size, subtract, walkMethods inherited from interface com.evolveum.midpoint.prism.deleg.PrismValueDelegator
applyDefinitionLegacy, applyDefinitionLegacy, checkConsistenceInternal, clearParent, cloneIfImmutable, debugDump, debugDump, debugDumpLazily, debugDumpLazily, deleteValueMetadata, diff, equals, equals, find, getAllItems, getAllValues, getNearestValueOfType, getOriginObject, getOriginType, getParentContainerValue, getPath, getRealClass, getRealValueIfExists, getRealValueOrRawType, getRootObjectable, getSchemaContext, getTypeName, getUserData, getUserData, getValueMetadata, getValueMetadataAsContainer, getValueMetadataIfExists, hashCode, hashCode, hasRealClass, hasValueMetadata, isEmpty, isObjectable, isOfType, isRaw, isTransient, normalize, recompute, representsSameValue, setOriginObject, setOriginType, setTransient, setUserData, setValueMetadata, setValueMetadata, setValueMetadata, toHumanReadableString
-
Method Details
-
from
public static <C extends Containerable> GenericLazyPrismContainerValue<C> from(@NotNull @NotNull GenericLazyPrismContainerValue.ValueSource<C> source) -
delegate
This will materialize the value on almost any API call (which is OK for now).- Specified by:
delegatein interfacePrismContainerValueDelegator<C extends Containerable>- Specified by:
delegatein interfacePrismValueDelegator
-
getParent
- Specified by:
getParentin interfacePrismContainerValue<C extends Containerable>- Specified by:
getParentin interfacePrismContainerValueDelegator<C extends Containerable>- Specified by:
getParentin interfacePrismValue- Specified by:
getParentin interfacePrismValueDelegator
-
setParent
- Specified by:
setParentin interfacePrismValue- Specified by:
setParentin interfacePrismValueDelegator
-
getId
- Specified by:
getIdin interfacePrismContainerValue<C extends Containerable>- Specified by:
getIdin interfacePrismContainerValueDelegator<C extends Containerable>
-
getRealValue
@Nullable public <T> T getRealValue()Description copied from interface:PrismValueReturns the statically-typed "real value". TODO specify when exactly the returned value can be null. TODO decide for containers: they throw an exception if the value is not statically typed.- Specified by:
getRealValuein interfacePrismValue- Specified by:
getRealValuein interfacePrismValueDelegator
-
isImmutable
public boolean isImmutable()- Specified by:
isImmutablein interfaceFreezable
-
freeze
public void freeze()Description copied from interface:FreezableShould be no-op (or very quick) if the object is already immutable. -
clone
Description copied from interface:PrismValueLiteral clone.- Specified by:
clonein interfacePrismContainerValue<C extends Containerable>- Specified by:
clonein interfacePrismContainerValueDelegator<C extends Containerable>- Specified by:
clonein interfacePrismValue- Specified by:
clonein interfacePrismValueDelegator- Overrides:
clonein classObject
-