Record Class PlainPolicyRuleIdentifier

java.lang.Object
java.lang.Record
com.evolveum.midpoint.repo.common.policy.PlainPolicyRuleIdentifier
All Implemented Interfaces:
PolicyRuleIdentifier, Serializable

public record PlainPolicyRuleIdentifier(String ruleId) extends Record implements Serializable, PolicyRuleIdentifier
Policy rule identifier based on a plain string.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of a PlainPolicyRuleIdentifier record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull String
    Returns a string representation of the policy rule identifier.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    of(@NotNull String objectOid, @NotNull Long inducementCID)
     
    of(String ruleId)
    Rule id doesn't have specific format, however currently OID:ID is used where OID is source object of the policy rule, ID is a container identifier.
    Returns the value of the ruleId record component.
    @NotNull String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PlainPolicyRuleIdentifier

      public PlainPolicyRuleIdentifier(String ruleId)
      Creates an instance of a PlainPolicyRuleIdentifier record class.
      Parameters:
      ruleId - the value for the ruleId record component
  • Method Details

    • of

      @NotNull public static @NotNull PlainPolicyRuleIdentifier of(String ruleId)
      Rule id doesn't have specific format, however currently OID:ID is used where OID is source object of the policy rule, ID is a container identifier.
    • of

      @NotNull public static @NotNull PlainPolicyRuleIdentifier of(@NotNull @NotNull String objectOid, @NotNull @NotNull Long inducementCID)
    • asString

      @NotNull public @NotNull String asString()
      Description copied from interface: PolicyRuleIdentifier
      Returns a string representation of the policy rule identifier. The format is not defined and may be different for different implementations.
      Specified by:
      asString in interface PolicyRuleIdentifier
    • toString

      @NotNull public @NotNull 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.
    • ruleId

      public String ruleId()
      Returns the value of the ruleId record component.
      Returns:
      the value of the ruleId record component