// 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.exovum.main.ActionResolver;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
package com.exovum.dbsample;



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

public class DesktopActionResolver implements ActionResolver {

    @Override
    public Connection getConnection() {
        String url = "jdbc:sqlite:data.sqlite";
        try {
            Class.forName("org.sqlite.JDBC");
            return DriverManager.getConnection(url);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return null;
    }


    // TODO: Desktop Implementation - setupAWSCredentials()
    @Override
    public void setupAWSCredentials() {

    }

    // TODO: Desktop Implementation - setupDynamoDB()
    @Override
    public void setupDynamoDB() {

    }

    // TODO: Desktop Implementation - saveObjectToMapper(Object object)
    @Override
// 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: desktop/src/com/exovum/dbsample/DesktopActionResolver.java
import com.exovum.main.ActionResolver;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

package com.exovum.dbsample;



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

public class DesktopActionResolver implements ActionResolver {

    @Override
    public Connection getConnection() {
        String url = "jdbc:sqlite:data.sqlite";
        try {
            Class.forName("org.sqlite.JDBC");
            return DriverManager.getConnection(url);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return null;
    }


    // TODO: Desktop Implementation - setupAWSCredentials()
    @Override
    public void setupAWSCredentials() {

    }

    // TODO: Desktop Implementation - setupDynamoDB()
    @Override
    public void setupDynamoDB() {

    }

    // TODO: Desktop Implementation - saveObjectToMapper(Object object)
    @Override
    public void saveObjectToMapper(Object object) {