Class AssetInputEntityFactory<T extends AssetInput,D extends AssetInputEntityData>

java.lang.Object
edu.ie3.datamodel.io.factory.Factory<T,D,T>
edu.ie3.datamodel.io.factory.EntityFactory<T,D>
edu.ie3.datamodel.io.factory.input.AssetInputEntityFactory<T,D>
Type Parameters:
T - Type of entity that this factory can create. Must be a subclass of AssetInput
D - Type of data class that is required for entity creation
Direct Known Subclasses:
BmInputFactory, ChpInputFactory, CylindricalStorageInputFactory, EmInputFactory, EvcsInputFactory, EvInputFactory, FixedFeedInInputFactory, HpInputFactory, LineInputFactory, LoadInputFactory, MeasurementUnitInputFactory, NodeInputFactory, PvInputFactory, StorageInputFactory, SwitchInputFactory, ThermalBusInputFactory, ThermalHouseInputFactory, Transformer2WInputFactory, Transformer3WInputFactory, WecInputFactory

public abstract class AssetInputEntityFactory<T extends AssetInput,D extends AssetInputEntityData> extends EntityFactory<T,D>
Abstract factory class that can be extended in order for creating AssetInput entities with AssetInputEntityData data objects.
Since:
19.02.20
  • Constructor Details

    • AssetInputEntityFactory

      protected AssetInputEntityFactory(Class<? extends T>... allowedClasses)
  • Method Details

    • getFields

      protected List<Set<String>> getFields(D data)
      Returns list of sets of attribute names that the entity requires to be built.

      The mandatory attributes required to create an AssetInput are enhanced with custom attribute names that each subclass factory determines in getAdditionalFields().

      Specified by:
      getFields in class Factory<T extends AssetInput,D extends AssetInputEntityData,T extends AssetInput>
      Parameters:
      data - EntityData (or subclass) containing the data
      Returns:
      list of possible attribute sets
    • getAdditionalFields

      protected abstract String[] getAdditionalFields()
      Returns fields other than the required fields of SystemParticipantInput that have to be present.
      Returns:
      Array of field names, can be empty but not null
    • buildModel

      protected T buildModel(D data)
      Description copied from class: Factory
      Builds model with data from given FactoryData object. Throws FactoryException if something goes wrong.
      Specified by:
      buildModel in class Factory<T extends AssetInput,D extends AssetInputEntityData,T extends AssetInput>
      Parameters:
      data - FactoryData (or subclass) containing the data
      Returns:
      model created from data
    • buildModel

      protected abstract T buildModel(D data, UUID uuid, String id, OperatorInput operator, OperationTime operationTime)
      Creates asset input entity with given parameters
      Parameters:
      data - entity data
      uuid - UUID of the input entity
      id - ID
      operator - Operator of the asset
      operationTime - time in which the entity is operated
      Returns:
      newly created asset object