Class Key

  • All Implemented Interfaces:

    @Serializable() 
    public final class Key
    
                        

    Object's Key class, used for identifying VMware Aria Operation Objects.

    Objects are identified by the Adapter Type, Object Type, and one or more Identifiers.

    Identifiers can be either the Object's name, or one or more Identifier key-value pairs. In order for an 'Identifier' to be used for identification, it must have isPartOfUniqueness set to true (this is the default).

    Two Objects with the same Key are not permitted in a CollectResult.

    Objects must be created with the full key. Keys cannot change after the Object has been created.

    All Objects with the same Adapter Type and Object Type must have the same set of Identifiers.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Key(String adapterType, String objectType, String name, List<Identifier> identifiers)
      Key(String adapterType, String objectType, String name)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String getAdapterType() The Adapter Type this Object is associated with.
      final String getObjectType() The Object Type (e.g., class) of this Object.
      final String getName() A human-readable name for this Object.
      final List<Identifier> getIdentifiers() A list of Identifiers that uniquely identify the Object.
      String toString()
      Boolean equals(Object other)
      Integer hashCode() Return a hashcode of this Key, respecting the rules of key uniqueness
      final String getIdentifier(String key, String defaultValue) Return the value for the given identifier key.
      final String getIdentifier(String key) Return the value for the given identifier key.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Key

        Key(String adapterType, String objectType, String name, List<Identifier> identifiers)
      • Key

        Key(String adapterType, String objectType, String name)
    • Method Detail

      • getAdapterType

         final String getAdapterType()

        The Adapter Type this Object is associated with.

      • getObjectType

         final String getObjectType()

        The Object Type (e.g., class) of this Object.

      • getName

         final String getName()

        A human-readable name for this Object. Should be unique if possible.

      • getIdentifiers

         final List<Identifier> getIdentifiers()

        A list of Identifiers that uniquely identify the Object. If none are present than the name must be unique and is used for identification. All Objects with the same adapter type and Object type must have the same set of identifiers.

      • equals

         Boolean equals(Object other)
        Returns:

        True if the keys will resolve to the same object, false otherwise.

      • hashCode

         Integer hashCode()

        Return a hashcode of this Key, respecting the rules of key uniqueness

      • getIdentifier

        @JvmOverloads() final String getIdentifier(String key, String defaultValue)

        Return the value for the given identifier key.

        Parameters:
        key - The identifier key.
        defaultValue - An optional default value.
        Returns:

        The value associated with the identifier. If the value associated with the identifier is empty and 'defaultValue' is provided, returns 'defaultValue'. If the identifier does not exist, returns defaultValue if provided, else 'null'.

      • getIdentifier

        @JvmOverloads() final String getIdentifier(String key)

        Return the value for the given identifier key.

        Parameters:
        key - The identifier key.
        Returns:

        The value associated with the identifier. If the value associated with the identifier is empty and 'defaultValue' is provided, returns 'defaultValue'. If the identifier does not exist, returns defaultValue if provided, else 'null'.