Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/data/NextGenDB.java
- This file was moved from src/it/reyboz/bustorino/middleware/NextGenDB.java.
Show All 9 Lines | BusTO (middleware) | ||||
This program is distributed in the hope that it will be useful, | This program is distributed in the hope that it will be useful, | ||||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
GNU General Public License for more details. | GNU General Public License for more details. | ||||
You should have received a copy of the GNU General Public License | You should have received a copy of the GNU General Public License | ||||
along with this program. If not, see <http://www.gnu.org/licenses/>. | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
package it.reyboz.bustorino.middleware; | package it.reyboz.bustorino.data; | ||||
import android.content.ContentValues; | import android.content.ContentValues; | ||||
import android.content.Context; | import android.content.Context; | ||||
import android.database.Cursor; | import android.database.Cursor; | ||||
import android.database.sqlite.SQLiteConstraintException; | import android.database.sqlite.SQLiteConstraintException; | ||||
import android.database.sqlite.SQLiteDatabase; | import android.database.sqlite.SQLiteDatabase; | ||||
import android.database.sqlite.SQLiteException; | import android.database.sqlite.SQLiteException; | ||||
import android.database.sqlite.SQLiteOpenHelper; | import android.database.sqlite.SQLiteOpenHelper; | ||||
import android.provider.BaseColumns; | import android.provider.BaseColumns; | ||||
import androidx.annotation.Nullable; | |||||
import android.util.Log; | import android.util.Log; | ||||
import it.reyboz.bustorino.backend.Fetcher; | |||||
import it.reyboz.bustorino.backend.FiveTAPIFetcher; | |||||
import it.reyboz.bustorino.backend.Route; | import it.reyboz.bustorino.backend.Route; | ||||
import it.reyboz.bustorino.backend.Stop; | import it.reyboz.bustorino.backend.Stop; | ||||
import org.json.JSONException; | |||||
import org.json.JSONObject; | |||||
import java.util.*; | import java.util.*; | ||||
import java.util.concurrent.atomic.AtomicReference; | |||||
import static it.reyboz.bustorino.middleware.NextGenDB.Contract.*; | import static it.reyboz.bustorino.data.NextGenDB.Contract.*; | ||||
public class NextGenDB extends SQLiteOpenHelper{ | public class NextGenDB extends SQLiteOpenHelper{ | ||||
public static final String DATABASE_NAME = "bustodatabase.db"; | public static final String DATABASE_NAME = "bustodatabase.db"; | ||||
public static final int DATABASE_VERSION = 2; | public static final int DATABASE_VERSION = 2; | ||||
public static final String DEBUG_TAG = "NextGenDB-BusTO"; | public static final String DEBUG_TAG = "NextGenDB-BusTO"; | ||||
//NO Singleton instance | //NO Singleton instance | ||||
//private static volatile NextGenDB instance = null; | //private static volatile NextGenDB instance = null; | ||||
//Some generating Strings | //Some generating Strings | ||||
▲ Show 20 Lines • Show All 305 Lines • Show Last 20 Lines |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register