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 ofAssetInputD- 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
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAssetInputEntityFactory(Class<? extends T>... allowedClasses) -
Method Summary
Modifier and TypeMethodDescriptionprotected TbuildModel(D data) Builds model with data from givenFactoryDataobject.protected abstract TbuildModel(D data, UUID uuid, String id, OperatorInput operator, OperationTime operationTime) Creates asset input entity with given parametersprotected abstract String[]Returns fields other than the required fields ofSystemParticipantInputthat have to be present.Returns list of sets of attribute names that the entity requires to be built.Methods inherited from class edu.ie3.datamodel.io.factory.Factory
expandSet, get, getFieldsString, getSupportedClasses, newSet, validateParameters
-
Constructor Details
-
AssetInputEntityFactory
-
-
Method Details
-
getFields
Returns list of sets of attribute names that the entity requires to be built.The mandatory attributes required to create an
AssetInputare enhanced with custom attribute names that each subclass factory determines ingetAdditionalFields().- Specified by:
getFieldsin classFactory<T extends AssetInput,D extends AssetInputEntityData, T extends AssetInput> - Parameters:
data- EntityData (or subclass) containing the data- Returns:
- list of possible attribute sets
-
getAdditionalFields
Returns fields other than the required fields ofSystemParticipantInputthat have to be present.- Returns:
- Array of field names, can be empty but not null
-
buildModel
Description copied from class:FactoryBuilds model with data from givenFactoryDataobject. ThrowsFactoryExceptionif something goes wrong.- Specified by:
buildModelin classFactory<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 datauuid- UUID of the input entityid- IDoperator- Operator of the assetoperationTime- time in which the entity is operated- Returns:
- newly created asset object
-