Record Class BindAttribute

java.lang.Object
java.lang.Record
org.synchronoss.cpo.core.BindAttribute
Record Components:
cpoAttribute - the resolved bean attribute this value should be bound to, or null if this instance was created with a raw name instead
bindObject - the value to bind
name - the raw attribute or column name this value should be bound to, or null if this instance was created with a resolved CpoAttribute instead

public record BindAttribute(CpoAttribute cpoAttribute, Object bindObject, String name) extends Record
BindAttribute pairs a single bind value produced while walking a CpoWhere tree (see BindableWhereBuilder) with either the resolved CpoAttribute it belongs to, or, when no matching bean attribute exists, the raw attribute name it was addressed by.
Author:
david.berry
  • Constructor Details

    • BindAttribute

      public BindAttribute(CpoAttribute cpoAttribute, Object bindObject)
      Creates an instance bound to a resolved bean attribute.
      Parameters:
      cpoAttribute - the attribute this value should be bound to
      bindObject - the value to bind
    • BindAttribute

      public BindAttribute(String name, Object bindObject)
      Creates an instance for a value that has no matching bean attribute, identified instead by name (for example, a raw column name used directly in a where clause).
      Parameters:
      name - the attribute or column name this value should be bound to
      bindObject - the value to bind
    • BindAttribute

      public BindAttribute(CpoAttribute cpoAttribute, Object bindObject, String name)
      Creates an instance of a BindAttribute record class.
      Parameters:
      cpoAttribute - the value for the cpoAttribute record component
      bindObject - the value for the bindObject record component
      name - the value for the name record component
  • Method Details

    • 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.
    • cpoAttribute

      public CpoAttribute cpoAttribute()
      Returns the value of the cpoAttribute record component.
      Returns:
      the value of the cpoAttribute record component
    • bindObject

      public Object bindObject()
      Returns the value of the bindObject record component.
      Returns:
      the value of the bindObject record component
    • name

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