Package net.simplace.sim.io.resources
Class FWSimResourceTransformer
java.lang.Object
net.simplace.sim.io.FWSimIOAdapter
net.simplace.sim.io.resources.FWSimInputAdapter
net.simplace.sim.io.resources.FWSimResourceTransformer
- All Implemented Interfaces:
FWSimFieldContainer
- Direct Known Subclasses:
DefaultRuleTransformer,DefaultSQLStatementTransformer
ResourceTransformer is able to transform the data read within the
resources to other format in table structure.
known Implementations:
- Author:
- Andreas Enders
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class net.simplace.sim.io.FWSimIOAdapter
FWSimIOAdapter.FREQUENCE -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HashMap<String,FWSimVariable<?>> List of inputs to specify the transformerprotected LinkedHashMap<Integer,ColumnData> Map saving the order of the columns in databaseprotected HashMap<FWSimVariable<?>,Object> List of inputs to specify the transformerprotected StringString signifying the project id it had updated the last timeprotected StringString signifying the last unique id to decide whether to update or notprotected final StringName of the Database Connection Poolprotected StringName of the Source field to be accessed for getting the data set to fill VarMap withFields inherited from class net.simplace.sim.io.resources.FWSimInputAdapter
iJexlScript, iShouldCacheToDBFields inherited from class net.simplace.sim.io.FWSimIOAdapter
iArrayMode, iFieldcount, iFrequence, iHeaderVariables, iInterface, iJexlRule, iKeyMap, iName, iOrderNumber, iProcessTime, iResourceElement, iSession, iSourceKey -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFWSimResourceTransformer(FWSimSession aSession, Integer aOrderNumber) protectedFWSimResourceTransformer(FWSimSession aSession, org.jdom2.Element aResourceElement, Integer aOrderNumber) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddVariable(FWSimVariable<?> aVariable) be careful if using this method while it adds a field to the header informationorg.jdom2.ElementcreateFormFields(FWSimResourceTransformer aTransformer) static FWSimResourceTransformercreateResourceTransformer(String aClassName) factory method for Creation of the resource transformer for documentation purpose onlystatic FWSimResourceTransformercreateResourceTransformer(FWSimSession aSession, String aClassName, Integer aOrderNumber) factory method for Creation of the resource transformerstatic FWSimResourceTransformercreateResourceTransformer(FWSimSession aSession, org.jdom2.Element aTransformElement, Integer aOrderNumber) factory method for Creation of the resource transformervoidfillVarMap(FWSimVarMap aVarMap) final org.jdom2.Elementorg.jdom2.ElementgetEditFormXML(boolean aEnabled) protected FWSimResourceCachegetSourceResourceCache(FWSimVarMap aVarMap) getVariable(String aKey) gets FWSimVariable from the header informationbooleanisUpdated(FWSimVarMap aVarMap) org.jdom2.ElementtoXML()abstract voidupdateFields(FWObservable aObservable) Methods inherited from class net.simplace.sim.io.resources.FWSimInputAdapter
getContentType, getData, getInputVariables, getJexlScript, getOutputVariables, getVarMap, isTransformer, shouldCacheToDB, toHTMLTablestringMethods inherited from class net.simplace.sim.io.FWSimIOAdapter
addProcessTime, checkCondition, createFormFields, createVariables, finalize, getFieldMap, getFrequence, getHeaderVariables, getHeaderXML, getInterface, getJexlRule, getKeyMap, getName, getOrderNumber, isArrayMode, isConditionCheck, removeVariable, setInterface, setOrderNumber, toString, writeHeaderList
-
Field Details
-
iIntColumnMap
Map saving the order of the columns in database -
iSourceName
Name of the Source field to be accessed for getting the data set to fill VarMap with -
iPoolName
Name of the Database Connection Pool -
iFieldMap
List of inputs to specify the transformer -
iLastInputValuesMap
List of inputs to specify the transformer -
iLastUniqueID
String signifying the last unique id to decide whether to update or not -
iLastProjectID
String signifying the project id it had updated the last time
-
-
Constructor Details
-
FWSimResourceTransformer
protected FWSimResourceTransformer(FWSimSession aSession, org.jdom2.Element aResourceElement, Integer aOrderNumber) - Parameters:
aSession-aResourceElement-aOrderNumber-
-
FWSimResourceTransformer
- Parameters:
aSession-aSourceResource-aInterfaceName-aOrderNumber-
-
-
Method Details
-
createResourceTransformer
public static FWSimResourceTransformer createResourceTransformer(FWSimSession aSession, String aClassName, Integer aOrderNumber) factory method for Creation of the resource transformer- Parameters:
aSession-aClassName-aOrderNumber-- Returns:
- the resource transformer
-
createResourceTransformer
factory method for Creation of the resource transformer for documentation purpose only- Parameters:
aClassName-- Returns:
- the resource transformer
-
createResourceTransformer
public static FWSimResourceTransformer createResourceTransformer(FWSimSession aSession, org.jdom2.Element aTransformElement, Integer aOrderNumber) throws DuplicateSimFieldException factory method for Creation of the resource transformer- Parameters:
aSession-aTransformElement-aOrderNumber-- Returns:
- the resource transformer
- Throws:
DuplicateSimFieldException
-
getSourceResourceCache
- Parameters:
aVarMap-- Returns:
- the ResourceCache of the Source Component
- Throws:
MissingSimResourceException
-
isUpdated
- Parameters:
aVarMap-- Returns:
- if resource was updated before
-
fillVarMap
- Parameters:
aVarMap-- See Also:
-
toXML
public org.jdom2.Element toXML()- Returns:
- a xml element with all the settings of this component()
- See Also:
-
getCreateFormXML
public final org.jdom2.Element getCreateFormXML()- Specified by:
getCreateFormXMLin interfaceFWSimFieldContainer- Overrides:
getCreateFormXMLin classFWSimIOAdapter- Returns:
- a xml element with all the settings of this component()
- See Also:
-
getEditFormXML
public org.jdom2.Element getEditFormXML(boolean aEnabled) - Specified by:
getEditFormXMLin interfaceFWSimFieldContainer- Overrides:
getEditFormXMLin classFWSimIOAdapter- Parameters:
aEnabled- fields or read only [false]- Returns:
- a xml element with all the settings of this component()
- See Also:
-
createFormFields
- Parameters:
aTransformer-- Returns:
- the created Element
-
addVariable
Description copied from class:FWSimIOAdapterbe careful if using this method while it adds a field to the header information- Specified by:
addVariablein interfaceFWSimFieldContainer- Overrides:
addVariablein classFWSimIOAdapter- See Also:
-
getVariable
Description copied from class:FWSimIOAdaptergets FWSimVariable from the header information- Specified by:
getVariablein interfaceFWSimFieldContainer- Overrides:
getVariablein classFWSimIOAdapter- Returns:
- FWSimVariable for ID in Field Map
- See Also:
-
updateFields
- Parameters:
aObservable-
-