Class AttributeRef

java.lang.Object
org.openremote.model.attribute.AttributeRef
All Implemented Interfaces:
Serializable

public class AttributeRef extends Object implements Serializable
A reference to an entity and an Attribute.

The id and name are required to identify an asset's attribute.

Two attribute references are equals(java.lang.Object) if they reference the same asset and attribute.

See Also:
  • Field Details

    • id

      @Pattern(regexp="^[0-9A-Za-z]{22}$", message="{Asset.id.Pattern}") protected @Pattern(regexp="^[0-9A-Za-z]{22}$",message="{Asset.id.Pattern}") String id
    • name

      @NotBlank(message="{Asset.valueHolder.name.NotBlank}") @Pattern(regexp="^\\w+$") protected @NotBlank(message="{Asset.valueHolder.name.NotBlank}") @Pattern(regexp="^\\w+$") String name
  • Constructor Details

    • AttributeRef

      public AttributeRef(String id, String name)
      Constructs an attribute reference.
      Parameters:
      id - the asset identifier
      name - the attribute name
  • Method Details

    • getId

      public String getId()
      Returns the asset identifier.
      Returns:
      the asset identifier.
    • getName

      public String getName()
      Returns the attribute name.
      Returns:
      the attribute name.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object