Record Class BasicResourceInformation

java.lang.Object
java.lang.Record
com.evolveum.midpoint.schema.processor.BasicResourceInformation
All Implemented Interfaces:
Serializable

public record BasicResourceInformation(@Nullable String oid, @Nullable PolyStringType name, @Nullable ShadowCachingPolicyType cachingPolicy, boolean readCachedCapabilityPresent, @Nullable XMLGregorianCalendar cacheInvalidationTimestamp) extends Record implements Serializable
Provides basic information about ResourceType for the purpose of refined resource object type/class definitions. It is the information from the outside of `schemaHandling`. It is important also as a provider of default values e.g. for caching. The instance of this record should be shared throughout all the definitions for the resource to avoid memory bloat. The instance is immutable. All of its components must be effectively immutable. To be extended later, e.g., with capabilities.
See Also:
  • Constructor Details

    • BasicResourceInformation

      public BasicResourceInformation(@Nullable @Nullable String oid, @Nullable @Nullable PolyStringType name, @Nullable @Nullable ShadowCachingPolicyType cachingPolicy, boolean readCachedCapabilityPresent, @Nullable @Nullable XMLGregorianCalendar cacheInvalidationTimestamp)
      Creates an instance of a BasicResourceInformation record class.
      Parameters:
      oid - the value for the oid record component
      name - the value for the name record component
      cachingPolicy - the value for the cachingPolicy record component
      readCachedCapabilityPresent - the value for the readCachedCapabilityPresent record component
      cacheInvalidationTimestamp - the value for the cacheInvalidationTimestamp record component
  • Method Details

    • of

      public static BasicResourceInformation of(@NotNull @NotNull PrismObject<ResourceType> resource)
    • of

      public static BasicResourceInformation of(@NotNull @NotNull ResourceType resource)
    • toString

      public 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • oid

      @Nullable public @Nullable String oid()
      Returns the value of the oid record component.
      Returns:
      the value of the oid record component
    • name

      @Nullable public @Nullable PolyStringType name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • cachingPolicy

      @Nullable public @Nullable ShadowCachingPolicyType cachingPolicy()
      Returns the value of the cachingPolicy record component.
      Returns:
      the value of the cachingPolicy record component
    • readCachedCapabilityPresent

      public boolean readCachedCapabilityPresent()
      Returns the value of the readCachedCapabilityPresent record component.
      Returns:
      the value of the readCachedCapabilityPresent record component
    • cacheInvalidationTimestamp

      @Nullable public @Nullable XMLGregorianCalendar cacheInvalidationTimestamp()
      Returns the value of the cacheInvalidationTimestamp record component.
      Returns:
      the value of the cacheInvalidationTimestamp record component