Fixed some general warnings.

This commit is contained in:
Alexander Doerflinger
2017-08-09 16:24:19 +02:00
parent 8e5791d35e
commit 8967107045

View File

@@ -1,15 +1,19 @@
package com.de.aldo_apps.aldo.mariokartcircuitselector; package com.de.aldo_apps.aldo.mariokartcircuitselector;
/** /**
* Created by aldo7224 on 07.08.17. * Constants that are used within the whole project. Therefore we have instantiated them in a single
* centralized class.
*
* @author aldo7224
* @version 0.1
* @since 07.08.2017
*/ */
public class Constants { public class Constants {
/** /**
* The Version Code of the Database. * The Version Code of the Database.
*/ */
public static final Integer DATABASE_VERSION = 1; static final Integer DATABASE_VERSION = 1;
/** /**
* As SQLite does not have a native boolean value, we use integers to represent true and false. * As SQLite does not have a native boolean value, we use integers to represent true and false.
@@ -21,158 +25,147 @@ public class Constants {
* As SQLite does not have a native boolean value, we use integers to represent true and false. * As SQLite does not have a native boolean value, we use integers to represent true and false.
* This is the value for a false statement. * This is the value for a false statement.
*/ */
public final static Integer FALSE = 0; final static Integer FALSE = 0;
/**
* The Path to the Database
*/
public static final String DATABASE_PATH
= "/data/data/com.de.aldo_apps.aldo.mariokartcircuitselector/databases/";
/** /**
* The Name of the complete database. * The Name of the complete database.
*/ */
public static final String DATABASE_NAME = "mario_kart_circuit_selector"; static final String DATABASE_NAME = "mario_kart_circuit_selector";
/**
* Modificator String to modify path of OLD database.
*/
public static final String DATABASE_OLD = "old_";
/** /**
* The name of the table containing all information according accessories. * The name of the table containing all information according accessories.
*/ */
public static final String TABLE_ACCESSORY = "accessory"; static final String TABLE_ACCESSORY = "accessory";
/** /**
* The name of the table containing all information according characters. * The name of the table containing all information according characters.
*/ */
public static final String TABLE_CHARACTER = "character"; static final String TABLE_CHARACTER = "character";
/** /**
* The name of the table containing all information according games. * The name of the table containing all information according games.
*/ */
public static final String TABLE_GAME = "game"; static final String TABLE_GAME = "game";
/** /**
* The name of the table containing all information according karts. * The name of the table containing all information according karts.
*/ */
public static final String TABLE_KART = "kart"; static final String TABLE_KART = "kart";
/** /**
* The name of the table containing all information according rulesets. * The name of the table containing all information according rulesets.
*/ */
public static final String TABLE_RULESET = "ruleset"; static final String TABLE_RULESET = "ruleset";
/** /**
* The name of the table containing all information according tracks. * The name of the table containing all information according tracks.
*/ */
public static final String TABLE_TRACK = "track"; static final String TABLE_TRACK = "track";
/** /**
* The name of the table containing all information according wheels. * The name of the table containing all information according wheels.
*/ */
public static final String TABLE_WHEELS = "wheels"; static final String TABLE_WHEELS = "wheels";
/** /**
* The global KEY for the _id field in the database. * The global KEY for the _id field in the database.
*/ */
public static final String KEY_ID = "_id"; static final String KEY_ID = "_id";
/** /**
* The global KEY for the name field in the database. * The global KEY for the name field in the database.
*/ */
public static final String KEY_NAME = "name"; static final String KEY_NAME = "name";
/** /**
* The global KEY for the game field in the database. * The global KEY for the game field in the database.
*/ */
public static final String KEY_GAME = "game"; static final String KEY_GAME = "game";
/** /**
* The global KEY for the available field in the database. * The global KEY for the available field in the database.
*/ */
public static final String KEY_AVAILABLE = "available"; static final String KEY_AVAILABLE = "available";
/** /**
* The global KEY for the weight field in the database. * The global KEY for the weight field in the database.
*/ */
public static final String KEY_WEIGHT = "weight"; static final String KEY_WEIGHT = "weight";
/** /**
* The global KEY for the cover uri field in the database. * The global KEY for the cover uri field in the database.
*/ */
public static final String KEY_COVER_URI = "cover_uri"; static final String KEY_COVER_URI = "cover_uri";
/** /**
* The global KEY for the wheels field in the database. * The global KEY for the wheels field in the database.
*/ */
public static final String KEY_WHEELS = "wheels"; static final String KEY_WHEELS = "wheels";
/** /**
* The global KEY for the accessory field in the database. * The global KEY for the accessory field in the database.
*/ */
public static final String KEY_ACCESSORY = "accessory"; static final String KEY_ACCESSORY = "accessory";
/** /**
* The global KEY for the dedicated driver field in the database. * The global KEY for the dedicated driver field in the database.
*/ */
public static final String KEY_DEDICATED_DRIVER = "dedicated_driver"; static final String KEY_DEDICATED_DRIVER = "dedicated_driver";
/** /**
* The global KEY for the free for all field in the database. * The global KEY for the free for all field in the database.
*/ */
public static final String KEY_FREE_FOR_ALL = "free_for_all"; static final String KEY_FREE_FOR_ALL = "free_for_all";
/** /**
* The global KEY for the mirror class field in the database. * The global KEY for the mirror class field in the database.
*/ */
public static final String KEY_MIRROR_CLASS = "mirror_class"; static final String KEY_MIRROR_CLASS = "mirror_class";
/** /**
* The global KEY for the 50 ccm field in the database. * The global KEY for the 50 ccm field in the database.
*/ */
public static final String KEY_50_CCM = "50_ccm"; static final String KEY_50_CCM = "50_ccm";
/** /**
* The global KEY for the 100 ccm field in the database. * The global KEY for the 100 ccm field in the database.
*/ */
public static final String KEY_100_CCM = "100_ccm"; static final String KEY_100_CCM = "100_ccm";
/** /**
* The global KEY for the 150 ccm field in the database. * The global KEY for the 150 ccm field in the database.
*/ */
public static final String KEY_150_CCM = "150_ccm"; static final String KEY_150_CCM = "150_ccm";
/** /**
* The global KEY for the 200 ccm field in the database. * The global KEY for the 200 ccm field in the database.
*/ */
public static final String KEY_200_CCM = "200_ccm"; static final String KEY_200_CCM = "200_ccm";
/** /**
* The global KEY for the kart free for all field in the database. * The global KEY for the kart free for all field in the database.
*/ */
public static final String KEY_KART_FREE_FOR_ALL = "kart_free_for_all"; static final String KEY_KART_FREE_FOR_ALL = "kart_free_for_all";
/** /**
* The global KEY for the bikes field in the database. * The global KEY for the bikes field in the database.
*/ */
public static final String KEY_BIKES = "bikes"; static final String KEY_BIKES = "bikes";
/** /**
* The global KEY for the package field in the database. * The global KEY for the package field in the database.
*/ */
public static final String KEY_PACKAGE = "package"; static final String KEY_PACKAGE = "package";
/** /**
* The global KEY for the number field in the database. * The global KEY for the number field in the database.
*/ */
public static final String KEY_NUMBER = "number"; static final String KEY_NUMBER = "number";
/** /**
* The Projection to retrieve all Information of a game object from database. * The Projection to retrieve all Information of a game object from database.
*/ */
public static final String[] PROJECTION_GAME = { static final String[] PROJECTION_GAME = {
KEY_ID, KEY_ID,
KEY_NAME, KEY_NAME,
KEY_COVER_URI KEY_COVER_URI
@@ -181,7 +174,7 @@ public class Constants {
/** /**
* The Projection to retrieve all Information of a track object from database. * The Projection to retrieve all Information of a track object from database.
*/ */
public static final String[] PROJECTION_TRACK = { static final String[] PROJECTION_TRACK = {
KEY_ID, KEY_ID,
KEY_NAME, KEY_NAME,
KEY_GAME, KEY_GAME,
@@ -193,7 +186,7 @@ public class Constants {
/** /**
* The Projection to retrieve all Information of a character object from database. * The Projection to retrieve all Information of a character object from database.
*/ */
public static final String[] PROJECTION_CHARACTER = { static final String[] PROJECTION_CHARACTER = {
KEY_ID, KEY_ID,
KEY_NAME, KEY_NAME,
KEY_GAME, KEY_GAME,
@@ -204,7 +197,7 @@ public class Constants {
/** /**
* The Projection to retrieve all Information of a kart object from database. * The Projection to retrieve all Information of a kart object from database.
*/ */
public static final String[] PROJECTION_KART = { static final String[] PROJECTION_KART = {
KEY_ID, KEY_ID,
KEY_NAME, KEY_NAME,
KEY_GAME, KEY_GAME,
@@ -219,7 +212,7 @@ public class Constants {
/** /**
* The Projection to retrieve all Information of a ruleset object from database. * The Projection to retrieve all Information of a ruleset object from database.
*/ */
public static final String[] PROJECTION_RULESET = { static final String[] PROJECTION_RULESET = {
KEY_ID, KEY_ID,
KEY_GAME, KEY_GAME,
KEY_MIRROR_CLASS, KEY_MIRROR_CLASS,
@@ -234,7 +227,7 @@ public class Constants {
/** /**
* The Projection to retrieve all Information of a accessory object from database. * The Projection to retrieve all Information of a accessory object from database.
*/ */
public static final String[] PROJECTION_ACCESSORY = { static final String[] PROJECTION_ACCESSORY = {
KEY_ID, KEY_ID,
KEY_NAME, KEY_NAME,
KEY_GAME, KEY_GAME,
@@ -244,7 +237,7 @@ public class Constants {
/** /**
* The Projection to retrieve all Information of a wheels object from database. * The Projection to retrieve all Information of a wheels object from database.
*/ */
public static final String[] PROJECTION_WHEELS = { static final String[] PROJECTION_WHEELS = {
KEY_ID, KEY_ID,
KEY_NAME, KEY_NAME,
KEY_GAME, KEY_GAME,