Refactor Android database classes

This commit is contained in:
2017-06-20 22:37:35 -04:00
parent 1976160ae8
commit 59745fb90f
32 changed files with 47 additions and 172 deletions

View File

@@ -17,7 +17,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.core.db;
package org.isoron.uhabits.core.database;
import java.lang.annotation.*;

View File

@@ -17,7 +17,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.core.db;
package org.isoron.uhabits.core.database;
public interface Cursor extends AutoCloseable
{

View File

@@ -17,7 +17,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.core.db;
package org.isoron.uhabits.core.database;
import java.util.*;

View File

@@ -19,7 +19,7 @@
*
*/
package org.isoron.uhabits.core.db;
package org.isoron.uhabits.core.database;
import java.sql.*;

View File

@@ -17,7 +17,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.core.db;
package org.isoron.uhabits.core.database;
import org.apache.commons.lang3.*;

View File

@@ -17,7 +17,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.core.db;
package org.isoron.uhabits.core.database;
import android.support.annotation.*;

View File

@@ -17,7 +17,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.core.db;
package org.isoron.uhabits.core.database;
import android.support.annotation.*;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.isoron.uhabits.core.db;
package org.isoron.uhabits.core.database;
import java.io.BufferedInputStream;
import java.io.IOException;

View File

@@ -17,7 +17,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.core.db;
package org.isoron.uhabits.core.database;
import java.lang.annotation.*;

View File

@@ -0,0 +1,24 @@
/*
* Copyright (C) 2017 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.core.database;
public class UnsupportedDatabaseVersionException extends RuntimeException
{
}

View File

@@ -19,7 +19,7 @@
package org.isoron.uhabits.core.models;
import org.isoron.uhabits.core.db.*;
import org.isoron.uhabits.core.database.*;
import org.isoron.uhabits.core.models.sqlite.records.*;
/**

View File

@@ -19,7 +19,7 @@
package org.isoron.uhabits.core.models.memory;
import org.isoron.uhabits.core.db.*;
import org.isoron.uhabits.core.database.*;
import org.isoron.uhabits.core.models.*;
import org.isoron.uhabits.core.models.sqlite.records.*;

View File

@@ -21,7 +21,7 @@
package org.isoron.uhabits.core.models.sqlite;
import org.isoron.uhabits.core.db.*;
import org.isoron.uhabits.core.database.*;
import org.isoron.uhabits.core.models.*;
import org.isoron.uhabits.core.models.memory.*;
import org.isoron.uhabits.core.models.sqlite.records.*;

View File

@@ -23,7 +23,7 @@ package org.isoron.uhabits.core.models.sqlite;
import android.support.annotation.*;
import org.isoron.uhabits.core.db.*;
import org.isoron.uhabits.core.database.*;
import org.isoron.uhabits.core.models.*;
import org.isoron.uhabits.core.models.memory.*;
import org.isoron.uhabits.core.models.sqlite.records.*;

View File

@@ -24,7 +24,7 @@ package org.isoron.uhabits.core.models.sqlite;
import android.support.annotation.*;
import android.support.annotation.Nullable;
import org.isoron.uhabits.core.db.*;
import org.isoron.uhabits.core.database.*;
import org.isoron.uhabits.core.models.*;
import org.isoron.uhabits.core.models.memory.*;
import org.isoron.uhabits.core.models.sqlite.records.*;

View File

@@ -22,7 +22,7 @@
package org.isoron.uhabits.core.models.sqlite.records;
import org.apache.commons.lang3.builder.*;
import org.isoron.uhabits.core.db.*;
import org.isoron.uhabits.core.database.*;
import org.isoron.uhabits.core.models.*;
/**

View File

@@ -21,7 +21,7 @@
package org.isoron.uhabits.core.models.sqlite.records;
import org.isoron.uhabits.core.db.*;
import org.isoron.uhabits.core.database.*;
import org.isoron.uhabits.core.models.*;
/**

View File

@@ -20,7 +20,7 @@
package org.isoron.uhabits;
import org.isoron.uhabits.core.commands.*;
import org.isoron.uhabits.core.db.*;
import org.isoron.uhabits.core.database.*;
import org.isoron.uhabits.core.models.*;
import org.isoron.uhabits.core.models.memory.*;
import org.isoron.uhabits.core.tasks.*;

View File

@@ -17,7 +17,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.core.db;
package org.isoron.uhabits.core.database;
import org.apache.commons.lang3.builder.*;
import org.isoron.uhabits.*;

View File

@@ -22,7 +22,7 @@
package org.isoron.uhabits.core.models.sqlite;
import org.isoron.uhabits.*;
import org.isoron.uhabits.core.db.*;
import org.isoron.uhabits.core.database.*;
import org.isoron.uhabits.core.models.*;
import org.isoron.uhabits.core.models.sqlite.records.*;
import org.junit.*;

View File

@@ -22,7 +22,7 @@ package org.isoron.uhabits.core.models.sqlite;
import android.support.annotation.*;
import org.isoron.uhabits.*;
import org.isoron.uhabits.core.db.*;
import org.isoron.uhabits.core.database.*;
import org.isoron.uhabits.core.models.*;
import org.isoron.uhabits.core.models.sqlite.records.*;
import org.isoron.uhabits.core.test.*;