Class EntityDataMemory

java.lang.Object
me.a8kj.config.template.memory.impl.GenericMapDataMemory<String>
me.a8kj.config.template.experimental.mapper.EntityDataMemory
All Implemented Interfaces:
EntityAwareMemory, DataMemory<String>

public class EntityDataMemory extends GenericMapDataMemory<String> implements EntityAwareMemory
An implementation of EntityAwareMemory that integrates complex entity mapping with standard configuration memory management. *

Note: This is an experimental feature and is currently considered unstable. It extends GenericMapDataMemory to provide full support for path-based data storage while delegating entity-specific logic to a MapperOperatorContract.

Since:
0.3
Author:
a8kj7sea
  • Constructor Details

    • EntityDataMemory

      public EntityDataMemory(MapperOperatorContract mapperService, ReplacementProcessor processor)
      Constructs an EntityDataMemory with a specified mapper service and replacement processor.
      Parameters:
      mapperService - the service used for serializing and deserializing entities.
      processor - the processor responsible for handling dynamic string placeholders.
    • EntityDataMemory

      public EntityDataMemory(MapperOperatorContract mapperService)
      Constructs an EntityDataMemory with a specified mapper service and default percent-style placeholders (e.g., %key%).
      Parameters:
      mapperService - the service used for serializing and deserializing entities.
  • Method Details

    • getMapperService

      public MapperOperatorContract getMapperService()
      Retrieves the mapper service responsible for converting entities to and from memory-compatible structures. * @return the internal mapper operator used for entity transformations.
      Specified by:
      getMapperService in interface EntityAwareMemory
      Returns:
      the MapperOperatorContract instance used by this memory.
    • getProcessor

      public ReplacementProcessor getProcessor()
      Provides the ReplacementProcessor associated with this memory instance.

      Every implementation must provide its own processor to define how placeholders are identified and replaced.

      * @return the internal replacement processor used for string manipulation.
      Specified by:
      getProcessor in interface DataMemory<String>
      Returns:
      the replacement processor instance.