Package com.comsol.api.database
Interface ItemKey
-
- All Superinterfaces:
DatabaseApiValue
public interface ItemKey extends DatabaseApiValue
A key used to uniquely identify an item (a tag, model, or a file) in a Model Manager database.- See Also:
ItemVersionKey
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanequals(java.lang.Object object)Compares the specified object with this item key for equality.static ItemKeygenerate(ItemType itemType)Generate a new key to uniquely identify an item (a tag, model, or a file) in a Model Manager database.inthashCode()Returns the hash code value for this item key.ItemTypeitemType()Get the type of the item.static ItemKeyof(ItemType itemType, java.lang.String value)Create a key to uniquely identify an item (a tag, model, or a file) in a Model Manager database.java.lang.Stringvalue()Get the raw string value for the key.
-
-
-
Method Detail
-
itemType
ItemType itemType()
Get the type of the item.- Returns:
- The type of the item.
-
value
java.lang.String value()
Get the raw string value for the key.- Returns:
- The raw string value for the key.
-
hashCode
int hashCode()
Returns the hash code value for this item key. The hash code is defined to be the hash code of the string value returned byvalue().- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hash code value for this instance.
-
equals
boolean equals(java.lang.Object object)
Compares the specified object with this item key for equality. Returns true if and only if the specified object is also an item key and if both have the same value (as returned byvalue()) and item type (as returned byitemType()).- Overrides:
equalsin classjava.lang.Object- Parameters:
object- The object to test equality against.- Returns:
- True if the specified object is equal to this item key.
-
of
static ItemKey of(ItemType itemType, java.lang.String value)
Create a key to uniquely identify an item (a tag, model, or a file) in a Model Manager database.- Parameters:
itemType- The type of the item.value- The raw string value for the key.- Returns:
- A new key.
-
generate
static ItemKey generate(ItemType itemType)
Generate a new key to uniquely identify an item (a tag, model, or a file) in a Model Manager database.
Generating an item key may be useful, for example, when saving a new item in the database and wanting to preassign the key of the item before it is saved.
- Parameters:
itemType- The type of the item.- Returns:
- A new key.
- Since:
- 6.3
-
-