public interface ItemTypeRegistry
ItemTypeRegistry
is an internal service that provides mapping of all known item type keys (module keys)
to int values (primary keys in a db table).
The underlying table is append-only; once the key is encountered, it is enumerated and will be kept in the database forever.
The values of item type registry must not be exported during backup, or during any other export process. They are local to this instance.
Modifier and Type | Method and Description |
---|---|
int |
getOrCreateTypeId(String key)
Retrieves a numeric ID for a given item type key.
|
String |
getTypeKey(int id)
Retrieves the key of an item type, based on its ID.
|
@Nonnull String getTypeKey(int id) throws ItemTypeNotFoundException, StructureRuntimeException
getOrCreateTypeId(String)
.id
- the ID of the item typeItemTypeNotFoundException
- if the item ID is not known
todo should the exception be checked? wait for usagesStructureRuntimeException
int getOrCreateTypeId(@Nonnull String key) throws StructureRuntimeException
key
- item type key, must not be nullStructureRuntimeException
Copyright © 2024 Tempo Software. All Rights Reserved.