Package nl.pim16aap2.animatedarchitecture.core.structures.retriever
Structure Retriever Factory
The primary entry point is the
StructureRetrieverFactory class, which can be
used to create instances of StructureRetriever
and StructureFinder. An instance of the factory
can be obtained using
IAnimatedArchitecturePlatform.getStructureRetrieverFactory().
For more information and example usage, please refer to the documentation of the
StructureRetrieverFactory class.
Structure Retrievers
The StructureRetriever class provides a number of
utility methods for retrieving structures from the database. The
StructureRetrieverFactory class contains more
information on how to create new structure finders.
The creation of a new structure retriever does not immediately query the database. Instead, it will only query the database when one of the retrieval methods is called. This allows the receiver of the retriever to decide what data it needs. For example, if the receiver can handle multiple structures, it can choose to retrieve all structures from the database at once. If the receiver only needs a single structure, it can choose to retrieve only a single one if exactly one structure is found.
Additionally, the receiver can specify if the structure should have a specific owner, and, if so, what permission level the owner should have. This allows the receiver to only retrieve structures that the owner has access to.
For more information and example usage, please refer to the documentation of the
StructureRetriever class.
Structure Finders
The StructureFinder class provides a system to
find structures using their name. Specifically, it can be used to progressively search through all structure names to
find all structures whose names start with the provided input String.
The StructureFinderCache class is used to cache
the structure finders for ICommandSender instances. This
allows requesting a structure finder from the factory for a given command sender and input combination. If an
existing entry exists, the input will be applied to it. If no entry exists, a new one is created instead.
Alternatively, the caller can request a new structure finder from the factory that bypasses the cache, which will
always create a new instance.
For more information and example usage, please refer to the documentation of the
StructureFinder class.
-
ClassDescriptionRepresents a class that can be used to retrieve structures when only partial data is provided.Represents a minimal description of a structure.Represents a way to retrieve structures.Represents the factory for
StructureRetrieverandStructureFinderinstances.Represents different ways a structure finder can be instantiated.