public class PrismReferenceValue extends PrismValue implements DebugDumpable, Serializable, ShortDumpable
immutable, prismContext
INDENT_STRING
Constructor and Description |
---|
PrismReferenceValue() |
PrismReferenceValue(String oid) |
PrismReferenceValue(String oid,
OriginType type,
Objectable source) |
PrismReferenceValue(String oid,
QName targetType) |
Modifier and Type | Method and Description |
---|---|
void |
applyDefinition(ItemDefinition definition,
boolean force) |
void |
applyDefinition(PrismReferenceDefinition definition,
boolean force) |
Referencable |
asReferencable() |
static List<Referencable> |
asReferencables(Collection<PrismReferenceValue> values) |
static List<PrismReferenceValue> |
asReferenceValues(Collection<? extends Referencable> referencables) |
void |
checkConsistenceInternal(Itemable rootItem,
boolean requireDefinitions,
boolean prohibitRaw,
ConsistencyCheckScope scope) |
PrismReferenceValue |
clone()
Literal clone.
|
PrismReferenceValue |
cloneComplex(CloneStrategy strategy)
Complex clone with different cloning strategies.
|
static boolean |
containsOid(Collection<PrismReferenceValue> values,
String oid) |
protected void |
copyValues(CloneStrategy strategy,
PrismReferenceValue clone) |
static PrismReferenceValue |
createFromTarget(PrismObject<?> refTarget) |
String |
debugDump()
Show the content of the object intended for diagnostics by system administrator.
|
String |
debugDump(int indent) |
String |
debugDump(int indent,
boolean expandObject) |
boolean |
equals(Object obj) |
boolean |
equalsComplex(PrismReferenceValue other,
boolean ignoreMetadata,
boolean isLiteral) |
boolean |
equalsComplex(PrismValue other,
boolean ignoreMetadata,
boolean isLiteral) |
Object |
find(ItemPath path) |
<IV extends PrismValue,ID extends ItemDefinition> |
findPartial(ItemPath path) |
PrismReferenceDefinition |
getDefinition() |
String |
getDescription() |
SearchFilterType |
getFilter() |
PrismObject |
getObject()
Returns object that this reference points to.
|
String |
getOid()
OID of the object that this reference refers to (reference target).
|
Class<?> |
getRealClass() |
Referencable |
getRealValue() |
QName |
getRelation() |
EvaluationTimeType |
getResolutionTime() |
PolyString |
getTargetName()
Returns cached name of the target object.
|
QName |
getTargetType()
Returns XSD type of the object that this reference refers to.
|
Class<Objectable> |
getTargetTypeCompileTimeClass() |
Class<Objectable> |
getTargetTypeCompileTimeClass(PrismContext prismContext) |
int |
hashCode() |
boolean |
isEmpty() |
boolean |
isRaw()
Returns true if the value is raw.
|
boolean |
match(PrismValue otherValue) |
void |
recompute(PrismContext prismContext) |
PrismReferenceValue |
relation(QName relation) |
boolean |
representsSameValue(PrismReferenceValue other) |
boolean |
representsSameValue(PrismValue other,
boolean lax)
Returns true if this and other value represent the same value.
|
void |
revive(PrismContext prismContext) |
void |
setDescription(String description) |
void |
setFilter(SearchFilterType filter) |
void |
setObject(PrismObject object) |
void |
setOid(String oid) |
void |
setRelation(QName relation) |
void |
setResolutionTime(EvaluationTimeType resolutionTime) |
void |
setTargetName(PolyString name) |
void |
setTargetName(PolyStringType name) |
void |
setTargetType(QName targetType) |
void |
setTargetType(QName targetType,
boolean allowEmptyNamespace) |
void |
shortDump(StringBuilder sb)
Show the content of the object intended for diagnostics.
|
PrismReferenceValue |
toCanonical()
Returns a version of this value that is canonical, that means it has the minimal form.
|
String |
toHumanReadableString()
Returns a short (one-line) representation of the real value stored in this object.
|
String |
toString() |
accept, accept, appendOriginDump, applyDefinition, checkMutability, clearParent, clearParent, cloneCollection, cloneCollectionComplex, cloneValues, collectionContainsEquivalentValue, contains, containsAll, containsRealValue, containsRealValue, copyValues, diff, diff, equals, equals, equalsRealValue, equalsRealValue, equalsRealValues, fromRealValue, getAllValues, getOriginObject, getOriginType, getParent, getParentContainerValue, getParentContainerValue, getPath, getPrismContext, getRealValuesOfCollection, getRootValue, getTypeName, getUserData, getUserData, isImmutable, normalize, recompute, resetParentCollection, setImmutable, setOriginObject, setOriginType, setParent, setPrismContext, setUserData
finalize, getClass, notify, notifyAll, wait, wait, wait
debugDumpLazily, debugDumpLazily
shortDump, shortDumpLazily
public PrismReferenceValue()
public PrismReferenceValue(String oid)
public PrismReferenceValue(String oid, OriginType type, Objectable source)
public String getOid()
public void setOid(String oid)
public PrismObject getObject()
public void setObject(PrismObject object)
public QName getTargetType()
public void setTargetType(QName targetType)
public void setTargetType(QName targetType, boolean allowEmptyNamespace)
targetType
- allowEmptyNamespace
- This is an ugly hack. See comment in DOMUtil.validateNonEmptyQName.public PolyString getTargetName()
public void setTargetName(PolyString name)
public void setTargetName(PolyStringType name)
public Class<Objectable> getTargetTypeCompileTimeClass()
public Class<Objectable> getTargetTypeCompileTimeClass(PrismContext prismContext)
public QName getRelation()
public void setRelation(QName relation)
public PrismReferenceValue relation(QName relation)
public String getDescription()
public void setDescription(String description)
public SearchFilterType getFilter()
public void setFilter(SearchFilterType filter)
public EvaluationTimeType getResolutionTime()
public void setResolutionTime(EvaluationTimeType resolutionTime)
public PrismReferenceDefinition getDefinition()
getDefinition
in class PrismValue
public boolean isRaw()
IPrismValue
isRaw
in interface IPrismValue
public Object find(ItemPath path)
find
in interface IPrismValue
public <IV extends PrismValue,ID extends ItemDefinition> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path)
findPartial
in interface IPrismValue
public void applyDefinition(ItemDefinition definition, boolean force) throws SchemaException
applyDefinition
in interface IPrismValue
applyDefinition
in class PrismValue
SchemaException
public void applyDefinition(PrismReferenceDefinition definition, boolean force) throws SchemaException
SchemaException
public void recompute(PrismContext prismContext)
recompute
in interface IPrismValue
public void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
checkConsistenceInternal
in class PrismValue
public boolean isEmpty()
isEmpty
in interface IPrismValue
public PrismReferenceValue toCanonical()
public boolean equalsComplex(PrismValue other, boolean ignoreMetadata, boolean isLiteral)
equalsComplex
in class PrismValue
public boolean equalsComplex(PrismReferenceValue other, boolean ignoreMetadata, boolean isLiteral)
public boolean equals(Object obj)
equals
in class PrismValue
public int hashCode()
hashCode
in class PrismValue
public boolean representsSameValue(PrismValue other, boolean lax)
PrismValue
representsSameValue
in class PrismValue
lax
- If we can reasonably assume that the two values belong together even if they don't have the same ID,
e.g. if they both belong to single-valued parent items. This is useful e.g. when comparing
multi-valued containers. But can cause problems when we want to be sure we are removing the correct
value.public boolean representsSameValue(PrismReferenceValue other)
public static PrismReferenceValue createFromTarget(PrismObject<?> refTarget)
public Referencable asReferencable()
@NotNull public static List<Referencable> asReferencables(@NotNull Collection<PrismReferenceValue> values)
@NotNull public static List<PrismReferenceValue> asReferenceValues(@NotNull Collection<? extends Referencable> referencables)
public String debugDump()
DebugDumpable
debugDump
in interface DebugDumpable
public String debugDump(int indent)
debugDump
in interface DebugDumpable
public String debugDump(int indent, boolean expandObject)
public PrismReferenceValue clone()
PrismValue
clone
in class PrismValue
public PrismReferenceValue cloneComplex(CloneStrategy strategy)
PrismValue
cloneComplex
in class PrismValue
CloneStrategy
protected void copyValues(CloneStrategy strategy, PrismReferenceValue clone)
public boolean match(PrismValue otherValue)
match
in interface IPrismValue
public String toHumanReadableString()
IPrismValue
toHumanReadableString
in interface IPrismValue
public Class<?> getRealClass()
getRealClass
in class PrismValue
@Nullable public Referencable getRealValue()
getRealValue
in class PrismValue
public static boolean containsOid(Collection<PrismReferenceValue> values, @NotNull String oid)
public void revive(PrismContext prismContext) throws SchemaException
revive
in interface Revivable
revive
in class PrismValue
SchemaException
public void shortDump(StringBuilder sb)
ShortDumpable
shortDump
in interface ShortDumpable
sb
- StringBuilder to which to a compact one-line content of the object intended
for diagnostics by system administrator should be appended.Copyright © 2019 Evolveum. All rights reserved.