Package net.simplace.sim.io.interfaces
Klasse FWSimInterface<T>
java.lang.Object
net.simplace.sim.io.interfaces.FWSimInterface<T>
- Typparameter:
T- Return type of the interface
- Bekannte direkte Unterklassen:
DatabaseInterface,FILEInterface,JSONInterface,MEMORYInterface
IO integrates resources and output
Interface can be used by input and output components
Interface is able to abstract data access format as
Database via SQL
DatabaseInterface
Excel (csv) CSVInterface
XML XMLInterface
MEMORY MEMORYInterface
Uses File Access Pool and Connection Pool- Autor:
- Andreas Enders
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic enumidentifiers for different interface types -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected LinkedHashMap<String, ColumnData> protected LinkedHashMap<Integer, String> -
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedFWSimInterface(String aName, FWSimInterface.INTERFACE_TYPE aInterfaceType, int aPoolsize) Constructor has to be called from implementing interfacesprotectedFWSimInterface(String aName, FWSimInterface.INTERFACE_TYPE aInterfaceType, org.jdom2.Element aInterfaceElement) Constructor has to be called from implementing interfaces -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected static MultiHashMap<Integer, Integer> checkHeaderForColMode(String[] aStrings, LinkedHashMap<String, FWSimVariable<?>> aHeaderVariables) static FWSimInterface<?> createInterface(String aName, FWSimInterface.INTERFACE_TYPE aInterfaceType, org.jdom2.Element aInterfaceElement) factory method creating an interface instance concerning the given data typestatic FWSimInterface<?> createInterface(org.jdom2.Element aInterfaceElement, FWSimSession aSession) factory method creating an interface instance concerning the given data typecreateStatisticInterface(String aStatisticPrefix) factory method creating an interface instance concerning the given data typeabstract voidfinalize()abstract TgetInterface(FWSimVarMap aVarMap, FWSimVariable.CONTENT_TYPE aContentType) getName()intabstract FWSimResourceCacheread(FWSimSession aFwSimSession, String aProjectID, Object aCache, LinkedHashMap<String, String> aKeyMap, FWSimInputAdapter aResourceAdapter, String aUniqueID, FWSimInterface.INTERFACE_TYPE aInterfaceType) factory method creating an interface instance concerning the given data typeprotected static ObjectreadColArray(String aProjectID, LinkedHashMap<String, FWSimVariable<?>> aHeaderVariables, MultiHashMap<Integer, Integer> aHeaderColModeMatch, List<?> aObjects, LinkedHashMap<String, String> aKeyMap, Object[] aArray) toString()org.jdom2.ElementtoXML()protected static Object[]transformArrays(List<Object[]> tArrays, FWSimVariable<?>[] aHeaderVariables) Transforms the object[j]-List with size (i) to Object[j] of Object[i]protected voidwriteToDatabase(Object[] aValues, PreparedStatement aTargetStatement, boolean aAddIterationData)
-
Felddetails
-
iColumnMap
-
iIntColumnNames
-
iColumnNamesInt
-
-
Konstruktordetails
-
FWSimInterface
protected FWSimInterface(String aName, FWSimInterface.INTERFACE_TYPE aInterfaceType, org.jdom2.Element aInterfaceElement) Constructor has to be called from implementing interfaces- Parameter:
aName-aInterfaceType-aInterfaceElement-
-
FWSimInterface
Constructor has to be called from implementing interfaces- Parameter:
aName-aInterfaceType-aPoolsize-
-
-
Methodendetails
-
createInterface
public static FWSimInterface<?> createInterface(org.jdom2.Element aInterfaceElement, FWSimSession aSession) factory method creating an interface instance concerning the given data type- Parameter:
aInterfaceElement- jdom xml element- Gibt zurück:
- generic FWSimInterface
-
createStatisticInterface
factory method creating an interface instance concerning the given data type- Parameter:
aStatisticPrefix-- Gibt zurück:
- generic FWSimInterface
-
createInterface
public static FWSimInterface<?> createInterface(String aName, FWSimInterface.INTERFACE_TYPE aInterfaceType, org.jdom2.Element aInterfaceElement) factory method creating an interface instance concerning the given data type- Parameter:
aName-aInterfaceType-aInterfaceElement-aPoolSize-- Gibt zurück:
- generic FWSimInterface
-
getInterface
- Parameter:
aVarMap-aContentType-- Gibt zurück:
- generic interface connection object. for example: database - connection; xml - fileinfo
-
read
public abstract FWSimResourceCache read(FWSimSession aFwSimSession, String aProjectID, Object aCache, LinkedHashMap<String, String> aKeyMap, FWSimInputAdapter aResourceAdapter, String aUniqueID, FWSimInterface.INTERFACE_TYPE aInterfaceType) throws MissingSimResourceExceptionfactory method creating an interface instance concerning the given data type- Parameter:
aFwSimSession-aProjectID-aCache-aKeyMap-aResourceAdapter-aUniqueID-aInterfaceType-- Gibt zurück:
- generic
FWSimResourceCache - Löst aus:
MissingSimResourceException
-
writeToDatabase
protected void writeToDatabase(Object[] aValues, PreparedStatement aTargetStatement, boolean aAddIterationData) throws SQLException - Löst aus:
SQLException
-
transformArrays
protected static Object[] transformArrays(List<Object[]> tArrays, FWSimVariable<?>[] aHeaderVariables) Transforms the object[j]-List with size (i) to Object[j] of Object[i]- Parameter:
tArrays-aHeaderVariables-- Gibt zurück:
- the transformed Array
-
readColArray
protected static Object readColArray(String aProjectID, LinkedHashMap<String, FWSimVariable<?>> aHeaderVariables, MultiHashMap<Integer, Integer> aHeaderColModeMatch, List<?> aObjects, LinkedHashMap<String, String> aKeyMap, Object[] aArray) -
checkHeaderForColMode
protected static MultiHashMap<Integer,Integer> checkHeaderForColMode(String[] aStrings, LinkedHashMap<String, FWSimVariable<?>> aHeaderVariables) -
getName
- Gibt zurück:
- the name
-
getPoolSize
public int getPoolSize()- Gibt zurück:
- the poolSize
-
getInterfaceType
- Gibt zurück:
- the inputType
-
finalize
-
toXML
public org.jdom2.Element toXML()- Gibt zurück:
- Element containing configuration for this Interface
-
toString
-