Added Constants for database access.
Added a Contants class which contains all global database keys and some other global information.
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -56,7 +56,7 @@
|
|||||||
<ConfirmationsSetting value="0" id="Add" />
|
<ConfirmationsSetting value="0" id="Add" />
|
||||||
<ConfirmationsSetting value="0" id="Remove" />
|
<ConfirmationsSetting value="0" id="Remove" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ android {
|
|||||||
applicationId "com.de.aldo_apps.aldo.mariokartcircuitselector"
|
applicationId "com.de.aldo_apps.aldo.mariokartcircuitselector"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
versionCode 1
|
versionCode 2
|
||||||
versionName "1.0"
|
versionName "0.2"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|||||||
@@ -0,0 +1,155 @@
|
|||||||
|
package com.de.aldo_apps.aldo.mariokartcircuitselector;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by aldo7224 on 07.08.17.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Constants {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* As SQLite does not have a native boolean value, we use integers to represent true and false.
|
||||||
|
* This is the value for a true statement.
|
||||||
|
*/
|
||||||
|
public final static Integer TRUE = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
public final static Integer FALSE = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Name of the complete database.
|
||||||
|
*/
|
||||||
|
public static final String DATABASE_NAME = "MarioKart.db";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the table containing all information according accessories.
|
||||||
|
*/
|
||||||
|
public static final String TABLE_ACCESSORY = "accessory";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the table containing all information according characters.
|
||||||
|
*/
|
||||||
|
public static final String TABLE_CHARACTER = "character";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the table containing all information according games.
|
||||||
|
*/
|
||||||
|
public static final String TABLE_GAME = "game";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the table containing all information according karts.
|
||||||
|
*/
|
||||||
|
public static final String TABLE_KART = "kart";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the table containing all information according rulesets.
|
||||||
|
*/
|
||||||
|
public static final String TABLE_RULESET = "ruleset";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the table containing all information according tracks.
|
||||||
|
*/
|
||||||
|
public static final String TABLE_TRACK = "track";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the table containing all information according wheels.
|
||||||
|
*/
|
||||||
|
public static final String TABLE_WHEELS = "wheels";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the _id field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_ID = "_id";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the name field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_NAME = "name";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the game field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_GAME = "game";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the available field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_AVAILABLE = "available";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the weight field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_WEIGHT = "weight";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the cover uri field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_COVER_URI = "cover_uri";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the wheels field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_WHEELS = "wheels";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the accessory field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_ACCESSORY = "accessory";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the dedicated driver field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_DEDICATED_DRIVER = "dedicated_driver";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the free for all field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_FREE_FOR_ALL = "free_for_all";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the mirror class field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_MIRROR_CLASS = "mirror_class";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the 50 ccm field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_50_CCM = "50_ccm";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the 100 ccm field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_100_CCM = "100_ccm";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the 150 ccm field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_150_CCM = "150_ccm";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the 200 ccm field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_200_CCM = "200_ccm";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the bikes field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_BIKES = "bikes";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the package field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_PACKAGE = "package";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The global KEY for the number field in the database.
|
||||||
|
*/
|
||||||
|
public static final String KEY_NUMBER = "number";
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user