Interface EntityLoader
- All Known Subinterfaces:
MapperOperatorContract
- All Known Implementing Classes:
BaseMapperOperator,DefaultMapperOperator
public interface EntityLoader
Defines the contract for reconstructing domain entities from a flattened
configuration memory.
*
Note: This is an experimental feature and is currently considered unstable. It serves as a core component of the mapping system, responsible for the deserialization phase where path-based key-value pairs are unflattened and transformed back into complex objects.
- Since:
- 0.3
- Author:
- a8kj7sea
-
Method Summary
Modifier and TypeMethodDescription<T> Optional<T> load(DataMemory<String> memory, String path, Class<T> type) Loads and reconstructs an entity from the providedDataMemorybased on a specific path.
-
Method Details
-
load
Loads and reconstructs an entity from the providedDataMemorybased on a specific path.- Type Parameters:
T- the expected type of the reconstructed entity.- Parameters:
memory- the source memory implementation containing the flattened data.path- the base configuration path (e.g., "database.mysql") where the entity's data is stored.type- the class literal of the entity to be reconstructed.- Returns:
- an
Optionalcontaining the reconstructed entity, orOptional.empty()if the data is missing or incompatible.
-