Class Loader
- java.lang.Object
-
- org.teichert.databaseexplorer.utils.Loader
-
public final class Loader extends Object
This class loads important information for startup like properties, configurations and the SaveItem's etc.
It also initializes the internal database and more.
-
-
Field Summary
Fields Modifier and Type Field Description static String
configFile
static String
dbPassword
static String
dbUrl
static String
dbUser
static SQLDatabase
internalDatabase
static SQLDatabase
localInternalDatabase
static Properties
mainProp
This property contains all information about some configurations:
The following settings are available:
dbip=internal database to save the database-explorer's information except some user-specific data (these are still saved on the client-side; like shotcuts) dbport=internal database port number dbname=internal database name dbuser=username of the internal database dbpwd=the user's password for the internal database dbparam=the parameter setting (if neccessary) for the internal databasestatic org.json.simple.parser.JSONParser
parser
static Properties
props
This property contains all translations from the saved locale byConfigurationLanguageConstants.LANGUAGE_STANDARD
orLocale.getDefault()
if no saved locale exists.static File
workspace
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SQLDatabase
createDatabaseFromSaveItem(SaveItem item)
static SQLServer
createSQLServerFromSaveItem(SaveItem item)
static Map<String,Object>
getConfigs()
static void
init()
static Map<?,?>
loadData(String filename)
static void
saveConfigs(Map<String,Object> map, String filename)
static void
saveData(Map<?,?> map, String filename)
-
-
-
Field Detail
-
parser
public static final org.json.simple.parser.JSONParser parser
-
workspace
public static File workspace
-
mainProp
public static Properties mainProp
This property contains all information about some configurations:
The following settings are available:
- dbip=internal database to save the database-explorer's information except some user-specific data (these are still saved on the client-side; like shotcuts)
- dbport=internal database port number
- dbname=internal database name
- dbuser=username of the internal database
- dbpwd=the user's password for the internal database
- dbparam=the parameter setting (if neccessary) for the internal database
-
props
public static Properties props
This property contains all translations from the saved locale byConfigurationLanguageConstants.LANGUAGE_STANDARD
orLocale.getDefault()
if no saved locale exists.
-
dbUrl
public static String dbUrl
-
dbUser
public static String dbUser
-
dbPassword
public static String dbPassword
-
configFile
public static final String configFile
- See Also:
- Constant Field Values
-
internalDatabase
public static SQLDatabase internalDatabase
-
localInternalDatabase
public static SQLDatabase localInternalDatabase
-
-
Method Detail
-
init
public static void init()
-
createDatabaseFromSaveItem
public static SQLDatabase createDatabaseFromSaveItem(SaveItem item) throws InstantiationException, IllegalAccessException, SQLException
-
-