public class AnnotatedValue
extends java.lang.Object
BO (Business Object).
The value is typically obtained via methods like SchemaI.getAnnotatedValue(Object, String)
or SchemaI.getAnnotatedValueAsString(Object, String). Beyond just holding the raw data,
this class can also represent an error that occurred during the retrieval process,
providing a unified way to handle both successful data fetching and failures.
| Modifier and Type | Field and Description |
|---|---|
static AnnotatedValue |
FALSE
A constant
AnnotatedValueRO representing a boolean false value. |
static de.ipcon.schema.AnnotatedValueRO |
INVALID_BO
A constant
AnnotatedValueRO representing an invalid parent object (null or not a BOI). |
static de.ipcon.schema.AnnotatedValueRO |
INVALID_PATH
A constant
AnnotatedValueRO representing an invalid (empty) attribute path. |
static AnnotatedValue |
NONE
A constant
AnnotatedValueRO representing a non-existent or empty value. |
static de.ipcon.schema.AnnotatedValueRO |
NOT_YET_KNOWN
A constant
AnnotatedValueRO indicating that the value is not yet known or resolved. |
static AnnotatedValue |
TRUE
A constant
AnnotatedValueRO representing a boolean true value. |
| Constructor and Description |
|---|
AnnotatedValue(java.lang.Object _value,
boolean _deleted,
java.lang.String _nullOnPath)
Constructs a new AnnotatedValue instance.
|
AnnotatedValue(java.lang.Object _value,
boolean _deleted,
java.lang.String _nullOnPath,
java.lang.Throwable _error) |
| Modifier and Type | Method and Description |
|---|---|
static AnnotatedValue |
bool(boolean v)
Retrieves a static
AnnotatedValueRO instance representing a boolean value. |
boolean |
equals(java.lang.Object o)
Compares this AnnotatedValue to the specified object.
|
static de.ipcon.schema.AnnotatedValueRO |
error(java.lang.Throwable t)
Creates a static, read-only
AnnotatedValueRO instance representing an error state. |
java.lang.Object |
get()
Retrieves the actual value encapsulated by this AnnotatedValue.
|
java.lang.Throwable |
getError()
Retrieves the
Throwable associated with this AnnotatedValue, if it represents an error state. |
java.lang.String |
getNullOnPath() |
java.lang.Object |
getValue()
A read-only version of
AnnotatedValue. |
boolean |
isDeleted() |
boolean |
isError()
Checks if this AnnotatedValue represents an error state.
|
boolean |
isNotYetKnown()
Checks if this AnnotatedValue is the special
NOT_YET_KNOWN constant. |
boolean |
isReadOnly()
Checks if this AnnotatedValue is read-only.
|
boolean |
isResolveError()
Checks if the error associated with this AnnotatedValue is a
ResolveException. |
AnnotatedValue |
set(java.lang.Object _value)
Sets the actual value encapsulated by this AnnotatedValue.
|
void |
setDeleted(boolean $2) |
void |
setNullOnPath(java.lang.String $3) |
void |
setValue(java.lang.Object $1) |
java.lang.String |
toString()
Returns a string representation of this AnnotatedValue.
|
public static final de.ipcon.schema.AnnotatedValueRO INVALID_BO
AnnotatedValueRO representing an invalid parent object (null or not a BOI).
This indicates a fundamental error in the input BO.public static final de.ipcon.schema.AnnotatedValueRO INVALID_PATH
AnnotatedValueRO representing an invalid (empty) attribute path.
This indicates a fundamental error in the requested attribute path.public static final AnnotatedValue NONE
AnnotatedValueRO representing a non-existent or empty value.
This is used when a value is legitimately absent, not due to an error.public static final AnnotatedValue TRUE
AnnotatedValueRO representing a boolean true value.public static final AnnotatedValue FALSE
AnnotatedValueRO representing a boolean false value.public static final de.ipcon.schema.AnnotatedValueRO NOT_YET_KNOWN
AnnotatedValueRO indicating that the value is not yet known or resolved.
This can be used for asynchronous loading or initial states.public AnnotatedValue(java.lang.Object _value,
boolean _deleted,
java.lang.String _nullOnPath)
_value - The actual value of the attribute or attribute chain._deleted - A flag indicating if the BO (or a BO in the chain) was deleted._nullOnPath - A string indicating which part of the path was null, if any._error - A Throwable representing an error during retrieval, or null if no error occurred.public AnnotatedValue(java.lang.Object _value,
boolean _deleted,
java.lang.String _nullOnPath,
java.lang.Throwable _error)
public static AnnotatedValue bool(boolean v)
AnnotatedValueRO instance representing a boolean value.public static de.ipcon.schema.AnnotatedValueRO error(java.lang.Throwable t)
AnnotatedValueRO instance representing an error state.t - The Throwable representing the error.AnnotatedValueRO instance with the error set.public java.lang.Object get()
Object value. Returns null if the value is genuinely null or if an error occurred.public AnnotatedValue set(java.lang.Object _value)
_value - The Object value to set.public boolean isReadOnly()
true if this AnnotatedValue is read-only, false otherwise.public boolean isError()
true if an error (Throwable) is associated with this value, false otherwise.public java.lang.Throwable getError()
Throwable associated with this AnnotatedValue, if it represents an error state.Throwable error, or null if no error occurred.public boolean isNotYetKnown()
NOT_YET_KNOWN constant.true if this instance is NOT_YET_KNOWN, false otherwise.public boolean isResolveError()
ResolveException.true if isError() is true and the error is an instance of ResolveException, false otherwise.public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - The Object to compare with.true if the specified object is equal to this AnnotatedValue, false otherwise.public java.lang.String toString()
If an error is associated with this value, its string representation is returned. Otherwise, a formatted string showing the "value", "deleted" status, and "nullOnPath" is returned.
toString in class java.lang.ObjectString representation of this AnnotatedValue.public java.lang.Object getValue()
AnnotatedValue.
Instances of this class behave identically to AnnotatedValue for getters,
but all setter methods will throw an IllegalStateException if invoked,
ensuring that the object's state cannot be modified after creation.
public void setValue(java.lang.Object $1)
public boolean isDeleted()
public void setDeleted(boolean $2)
public java.lang.String getNullOnPath()
public void setNullOnPath(java.lang.String $3)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.