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.
-
-
Field Summary
Fields Modifier and Type Field Description private final String
adapterType
private final String
objectType
private final String
name
private final List<Identifier>
identifiers
-
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. -
-
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.
-
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.
-
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'.
-
-
-
-