Record Class AbstractSearchExpressionEvaluator.ObjectFound<OT extends ObjectType,C>

java.lang.Object
java.lang.Record
com.evolveum.midpoint.model.common.expression.evaluator.AbstractSearchExpressionEvaluator.ObjectFound<OT,C>
Enclosing class:
AbstractSearchExpressionEvaluator<V extends PrismValue,O extends ObjectType,D extends ItemDefinition<?>,E extends SearchObjectExpressionEvaluatorType>

public static record AbstractSearchExpressionEvaluator.ObjectFound<OT extends ObjectType,C>(@NotNull PrismObject<OT extends ObjectType> sourceObject, C convertedValue) extends Record
The result of the search: both source object, and the value that was created from it. The value is the actual result. The source object is currently used only for resource/kind determination in AssociationSearchQueryResult (for cache invalidation). TODO reconsider whether the cache invalidation should not be done in a different way
  • Constructor Details

    • ObjectFound

      public ObjectFound(@NotNull @NotNull PrismObject<OT> sourceObject, C convertedValue)
      Creates an instance of a ObjectFound record class.
      Parameters:
      sourceObject - the value for the sourceObject record component
      convertedValue - the value for the convertedValue record component
  • Method Details

    • unwrap

      public static <C> List<C> unwrap(Collection<? extends AbstractSearchExpressionEvaluator.ObjectFound<?,C>> objectFounds)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • sourceObject

      @NotNull public @NotNull PrismObject<OT> sourceObject()
      Returns the value of the sourceObject record component.
      Returns:
      the value of the sourceObject record component
    • convertedValue

      public C convertedValue()
      Returns the value of the convertedValue record component.
      Returns:
      the value of the convertedValue record component