Package fileLogic
Class Loader<T extends Collection<E>,E>
java.lang.Object
fileLogic.Loader<T,E>
- Type Parameters:
T- Collection to fillE- Type of collection elements
Deprecated.
Deprecated since 3.0 / Now collection are loading from Database.
Abstract loader class. It uses
java.lang.reflect API for changing fields taken
from XML file
and converted by java.beans.PropertyEditor. It fills Elements of type E to collection of type T
- Since:
- 1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionloadFromFile(String path, BaseReader reader) Deprecated.Abstract method to read any collection from any file by any reader.loadFromXMLbyEnvKey(String envKey) Deprecated.Fill collection with elements from XML file.static voidsetupConverter(Class<?> typeToEdit, Class<? extends PropertyEditor> editor) Deprecated.Manually register editor for your datatype.
-
Constructor Details
-
Loader
Deprecated.Initializer of fileLogic.Loader class.- Parameters:
tClass- Class ofT. Should be provided due to Java's generic types restriction.eClass- Class ofE. Should be provided due to Java's generic types restriction.
-
-
Method Details
-
setupConverter
Deprecated.Manually register editor for your datatype. Call this method before parsing XML.- Parameters:
typeToEdit- Type to register in editoreditor- Editor of type. Should implement PropertyEditor interface- See Also:
-
loadFromXMLbyEnvKey
Deprecated.Fill collection with elements from XML file. XML filepath will be taken from Environment variable- Parameters:
envKey- Key of System env. var to XML filepath- Returns:
- Filled collection of type T
-
loadFromFile
Deprecated.Abstract method to read any collection from any file by any reader.- Parameters:
path- Path to filereader- File reader- Returns:
- Collection with elements matched by file
-