// Path: core/src/com/exovum/main/ActionResolver.java
// public interface ActionResolver {
//     public Connection getConnection();
//     /**
//      * Connects to AWS - Amazon Cognito for user Identity Management
//      * @return void
//      */
//     public void setupAWSCredentials();
// 
//     /**
//      * Initializes the DynamoDB client and DynamoDBMapper
//      */
//     public void setupDynamoDB();
// 
//     /**
//      * Stores object {@code data} to the DynamoDBMapper
//      * @param data Object to be stored in the Mapper
//      */
//     public void saveObjectToMapper(Object data);
// 
//     /**
//      * Returns object of type {@code T} from DynamoDBMapper
//      * @return Object requested from the Mapper
//      */
//     public Object getObjectFromMapper();
// 
//     // "Book" sample implementations
//     public void saveBookToMapper(Book book);
// 
//     public Book getBookFromMapper(String isbn);
// }


import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
import com.badlogic.gdx.sql.Database;
import com.badlogic.gdx.sql.DatabaseCursor;
import com.badlogic.gdx.sql.DatabaseFactory;
import com.badlogic.gdx.sql.SQLiteGdxException;
import com.badlogic.gdx.utils.Align;
import com.badlogic.gdx.utils.Scaling;
import com.badlogic.gdx.utils.viewport.ScalingViewport;
import com.exovum.main.ActionResolver;
package com.exovum.dbsample;


/**
 * Created by exovu on 3/18/2017.
 */

public class DynamoDBSample extends Game {

    Database dbHandler;

    public static final String TABLE_COMMENTS = "comments";
    public static final String COLUMN_ID = "_id";
    public static final String COLUMN_COMMENT = "comment";

    private static final String DATABASE_NAME = "comments.db";
    private static final int DATABASE_VERSION = 1;

    // Database creation sql statement
    private static final String DATABASE_CREATE = "CREATE TABLE IF NOT EXISTS "
            + TABLE_COMMENTS + "(" + COLUMN_ID
            + " INTEGER PRIMARY KEY AUTOINCREMENT, " + COLUMN_COMMENT
            + " VARCHAR NOT NULL);";

    private Stage stage;
    private TextButton textButton;
    private Label statusLabel;
    private Skin skin;

    private ActionResolver actionResolver;

// Path: core/src/com/exovum/main/ActionResolver.java
// public interface ActionResolver {
//     public Connection getConnection();
//     /**
//      * Connects to AWS - Amazon Cognito for user Identity Management
//      * @return void
//      */
//     public void setupAWSCredentials();
// 
//     /**
//      * Initializes the DynamoDB client and DynamoDBMapper
//      */
//     public void setupDynamoDB();
// 
//     /**
//      * Stores object {@code data} to the DynamoDBMapper
//      * @param data Object to be stored in the Mapper
//      */
//     public void saveObjectToMapper(Object data);
// 
//     /**
//      * Returns object of type {@code T} from DynamoDBMapper
//      * @return Object requested from the Mapper
//      */
//     public Object getObjectFromMapper();
// 
//     // "Book" sample implementations
//     public void saveBookToMapper(Book book);
// 
//     public Book getBookFromMapper(String isbn);
// }


// Path: core/src/com/exovum/dbsample/DynamoDBSample.java
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
import com.badlogic.gdx.sql.Database;
import com.badlogic.gdx.sql.DatabaseCursor;
import com.badlogic.gdx.sql.DatabaseFactory;
import com.badlogic.gdx.sql.SQLiteGdxException;
import com.badlogic.gdx.utils.Align;
import com.badlogic.gdx.utils.Scaling;
import com.badlogic.gdx.utils.viewport.ScalingViewport;
import com.exovum.main.ActionResolver;

package com.exovum.dbsample;


/**
 * Created by exovu on 3/18/2017.
 */

public class DynamoDBSample extends Game {

    Database dbHandler;

    public static final String TABLE_COMMENTS = "comments";
    public static final String COLUMN_ID = "_id";
    public static final String COLUMN_COMMENT = "comment";

    private static final String DATABASE_NAME = "comments.db";
    private static final int DATABASE_VERSION = 1;

    // Database creation sql statement
    private static final String DATABASE_CREATE = "CREATE TABLE IF NOT EXISTS "
            + TABLE_COMMENTS + "(" + COLUMN_ID
            + " INTEGER PRIMARY KEY AUTOINCREMENT, " + COLUMN_COMMENT
            + " VARCHAR NOT NULL);";

    private Stage stage;
    private TextButton textButton;
    private Label statusLabel;
    private Skin skin;

    private ActionResolver actionResolver;

    public DynamoDBSample(ActionResolver actionResolver) {