Interface PrismReferenceValue

All Superinterfaces:
DebugDumpable, Freezable, MidpointOriginMetadata, PathVisitable, PrismContextSensitive, PrismValue, Revivable, Serializable, ShortDumpable, Visitable

public interface PrismReferenceValue extends PrismValue, ShortDumpable
Author:
Radovan Semancik
  • Method Details

    • getOid

      String getOid()
      OID of the object that this reference refers to (reference target). May return null, but the reference is in that case incomplete and unusable.
      Returns:
      the target oid
    • setOid

      void setOid(String oid)
    • getObject

      <O extends Objectable> PrismObject<O> getObject()
      Returns object that this reference points to. The object is supposed to be used for caching and optimizations. Only oid and type of the object really matters for the reference. The object is transient. It will NOT be serialized. Therefore the client must expect that the object can disappear when serialization boundary is crossed. The client must expect that the object is null.
    • setObject

      void setObject(PrismObject<?> object)
    • getTargetType

      QName getTargetType()
      Returns XSD type of the object that this reference refers to. It may be used in XPath expressions and similar filters. May return null if the type name is not set.
      Returns:
      the target type name
    • setTargetType

      void setTargetType(QName targetType)
    • setTargetType

      void setTargetType(QName targetType, boolean allowEmptyNamespace)
      Parameters:
      allowEmptyNamespace - This is an ugly hack. See comment in DOMUtil.validateNonEmptyQName.
    • determineTargetTypeName

      @Nullable default @Nullable QName determineTargetTypeName()
      Determines the type name from the value or from its definition (if known).
    • getTargetName

      PolyString getTargetName()
      Returns cached name of the target object. This is a ephemeral value. It may be computed at object retrieval time or it may not be present at all. This is NOT an authoritative information. Setting it or changing it will not influence the reference meaning. OID is the only authoritative linking mechanism.
      Returns:
      cached name of the target object.
    • setTargetName

      void setTargetName(PolyString name)
    • setTargetName

      void setTargetName(PolyStringType name)
    • getTargetTypeCompileTimeClass

      Class<Objectable> getTargetTypeCompileTimeClass()
    • getTargetTypeCompileTimeClass

      Class<Objectable> getTargetTypeCompileTimeClass(PrismContext prismContext)
    • getRelation

      QName getRelation()
    • setRelation

      void setRelation(QName relation)
    • relation

      PrismReferenceValue relation(QName relation)
    • getDescription

      String getDescription()
    • setDescription

      void setDescription(String description)
    • getFilter

      SearchFilterType getFilter()
    • setFilter

      void setFilter(SearchFilterType filter)
    • getResolutionTime

      EvaluationTimeType getResolutionTime()
    • getEffectiveResolutionTime

      @NotNull default @NotNull EvaluationTimeType getEffectiveResolutionTime()
    • setResolutionTime

      void setResolutionTime(EvaluationTimeType resolutionTime)
    • getReferentialIntegrity

      ReferentialIntegrityType getReferentialIntegrity()
    • setReferentialIntegrity

      void setReferentialIntegrity(ReferentialIntegrityType referentialIntegrity)
    • getDefinition

      PrismReferenceDefinition getDefinition()
    • findPartial

      <IV extends PrismValue, ID extends ItemDefinition<?>> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path)
    • applyDefinition

      void applyDefinition(ItemDefinition definition, boolean force) throws SchemaException
      Specified by:
      applyDefinition in interface PrismValue
      Throws:
      SchemaException
    • applyDefinition

      void applyDefinition(PrismReferenceDefinition definition, boolean force) throws SchemaException
      Throws:
      SchemaException
    • toCanonical

      PrismReferenceValue toCanonical()
      Returns a version of this value that is canonical, that means it has the minimal form. E.g. it will have only OID and no object.
    • asReferencable

      Referencable asReferencable()
    • debugDump

      String debugDump(int indent, boolean expandObject)
    • clone

      Description copied from interface: PrismValue
      Literal clone.
      Specified by:
      clone in interface PrismValue
    • createImmutableClone

      PrismReferenceValue createImmutableClone()
      Specified by:
      createImmutableClone in interface PrismValue
    • cloneComplex

      PrismReferenceValue cloneComplex(CloneStrategy strategy)
      Description copied from interface: PrismValue
      Complex clone with different cloning strategies.
      Specified by:
      cloneComplex in interface PrismValue
      See Also:
    • getRealClass

      Class<?> getRealClass()
      Specified by:
      getRealClass in interface PrismValue
    • getRealValue

      @Nullable @Nullable Referencable getRealValue()
      Description copied from interface: PrismValue
      Returns 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:
      getRealValue in interface PrismValue
    • findReferencedItem

      @Experimental <I extends Item<?, ?>> I findReferencedItem(ItemPath path, Class<I> type)