// Path: src/br/com/visualize/akan/api/helper/DatabaseHelper.java
// public class DatabaseHelper extends SQLiteOpenHelper {
// 	
// 	private static final String dbName = "AKAN.db";
// 	
// 	private static final String congressmanTable = "CREATE TABLE [CONGRESSMAN] "
// 	        + "([ID_CONGRESSMAN] VARCHAR(10) unique, [ID_UPDATE] INT, "
// 	        + "[NAME_CONGRESSMAN] VARCHAR(40), [PARTY] VARCHAR(10), "
// 	        + "[UF_CONGRESSMAN] VARCHAR (2), [TOTAL_SPENT_CONGRESSMAN] DOUBLE, "
// 	        + "[STATUS_CONGRESSMAN] BOOLEAN, [PHOTO_CONGRESSMAN] VARCHAR(255), "
// 	        + "[RANKING_CONGRESSMAN] INT);";
// 	
// 	private static final String quotaTable = "CREATE TABLE [QUOTA] "
// 	        + "([ID_QUOTA] VARCHAR(10) unique, [ID_CONGRESSMAN] VARCHAR(10), "
// 	        + "[ID_UPDATE] INT, [TYPE_QUOTA] INT(10), [DESCRIPTION_QUOTA] "
// 	        + "VARCHAR (40), [MONTH_QUOTA] INT, [YEAR_QUOTA] INT, "
// 	        + "[VALUE_QUOTA] DOUBLE);";
// 	
// 	private static final String urlTable = "CREATE TABLE [URL] "
// 	        + "([UPDATE_VERIFIER_URL] VARCHAR(10), "
// 	        + "[ID_UPDATE_URL] VARCHAR(255), [DEFAULT_URL] VARCHAR (255), "
// 	        + "[FIRST_URL] VARCHAR (255), [SECOND_URL] VARCHAR (255));";
// 	
// 	private static final String statisticTable = "CREATE TABLE [STATISTIC] "
// 	        + "([ID_STATISTIC] VARCHAR(10) unique, [MONTH_STATISTIC] INT, "
// 	        + "[STD_DEVIATION] DOUBLE, [AVERAGE_STATISTIC] DOUBLE, "
// 	        + "[MAX_VALUE_STATISTIC] DOUBLE, [YEAR_STATISTIC] INT,"
// 	        + "ID_SUBQUOTA INT(10));";
// 	
// 	private static final String versionTable = "CREATE TABLE [VERSION] "
// 	        + "([ID_VERSION] VARCHAR(10) unique, [NUM_VERSION] INT);";
// 	
// 	public DatabaseHelper( Context context ) {
// 		super( context, dbName, null, 1 );
// 	}
// 	
// 	public DatabaseHelper( Context context, String name, CursorFactory factory,
// 	        int version ) {
// 		
// 		super( context, name, factory, version );
// 	}
// 	
// 	/**
// 	 * Describes the actions that will be made when creating the database.
// 	 * Creates the tables.
// 	 */
// 	@Override
// 	public void onCreate( SQLiteDatabase db ) {
// 		db.execSQL( congressmanTable );
// 		db.execSQL( quotaTable );
// 		db.execSQL( urlTable );
// 		db.execSQL( statisticTable );
// 		db.execSQL( versionTable );
// 	}
// 	
// 	/**
// 	 * Describes the actions that will be made if there is a update in the
// 	 * database.
// 	 */
// 	@Override
// 	public void onUpgrade( SQLiteDatabase db, int oldVersion, int newVersion ) {
// 		/* ! Empty Method. */
// 	}
// }
// 
// Path: src/br/com/visualize/akan/domain/model/Url.java
// public class Url {
// 	private int idUpdateUrl = 0;
// 	private int updateVerifierUrl = 0;
// 	
// 	private String defaultUrl = "";
// 	private String firstAlternativeUrl = "";
// 	private String secondAlternativeUrl = "";
// 	
// 	public Url() {
// 		/*! Empty Constructor */
// 	}
// 	
// 	public Url( int idUpdateUrl, String defaultUrl ) {
// 		this.idUpdateUrl = idUpdateUrl;
// 		this.defaultUrl = defaultUrl;
// 	}
// 	
// 	public int getIdUpdateUrl() {
// 		return idUpdateUrl;
// 	}
// 	
// 	public void setIdUpdateUrl( int idUpdateUrl ) {
// 		this.idUpdateUrl = idUpdateUrl;
// 	}
// 	
// 	public int getUpdateVerifierUrl() {
// 		return updateVerifierUrl;
// 	}
// 	
// 	public void setUpdateVerifierUrl( int updateVerifierUrl ) {
// 		this.updateVerifierUrl = updateVerifierUrl;
// 	}
// 	
// 	public String getDefaultUrl() {
// 		return defaultUrl;
// 	}
// 	
// 	public void setDefaultUrl( String defaultUrl ) {
// 		this.defaultUrl = defaultUrl;
// 	}
// 	
// 	public String getFirstAlternativeUrl() {
// 		return firstAlternativeUrl;
// 	}
// 	
// 	public void setFirstAlternativeUrl( String firstAlternativeUrl ) {
// 		this.firstAlternativeUrl = firstAlternativeUrl;
// 	}
// 	
// 	public String getSecondAlternativeUrl() {
// 		return secondAlternativeUrl;
// 	}
// 	
// 	public void setSecondAlternativeUrl( String secondAlternativeUrl ) {
// 		this.secondAlternativeUrl = secondAlternativeUrl;
// 	}
// }


import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import br.com.visualize.akan.api.helper.DatabaseHelper;
import br.com.visualize.akan.domain.model.Url;
/*
 * File: UrlDao.java Purpose: Bringing the implementation of model URL, a class
 * that directly references the business domain.
 */
package br.com.visualize.akan.api.dao;




/**
 * This class represents the Data Access Object for the URL, responsible for all
 * data base operations like selections, insertions and updates.
 */
public class UrlDao extends Dao {
	private static final boolean EMPTY = true;
	private static final boolean NOT_EMPTY = false;
	
	private String defaultUrl = "http://192.168.1.4:3000";
	private String tableName = "URL";
	
	private static UrlDao instanceUrlDao = null;
	private static String tableColumns[ ] = { "UPDATE_VERIFIER_URL", 
	    "ID_UPDATE_URL", "DEFAULT_URL", "FIRST_URL", "SECOND_URL" };
	
	protected UrlDao( Context context ) {
// Path: src/br/com/visualize/akan/api/helper/DatabaseHelper.java
// public class DatabaseHelper extends SQLiteOpenHelper {
// 	
// 	private static final String dbName = "AKAN.db";
// 	
// 	private static final String congressmanTable = "CREATE TABLE [CONGRESSMAN] "
// 	        + "([ID_CONGRESSMAN] VARCHAR(10) unique, [ID_UPDATE] INT, "
// 	        + "[NAME_CONGRESSMAN] VARCHAR(40), [PARTY] VARCHAR(10), "
// 	        + "[UF_CONGRESSMAN] VARCHAR (2), [TOTAL_SPENT_CONGRESSMAN] DOUBLE, "
// 	        + "[STATUS_CONGRESSMAN] BOOLEAN, [PHOTO_CONGRESSMAN] VARCHAR(255), "
// 	        + "[RANKING_CONGRESSMAN] INT);";
// 	
// 	private static final String quotaTable = "CREATE TABLE [QUOTA] "
// 	        + "([ID_QUOTA] VARCHAR(10) unique, [ID_CONGRESSMAN] VARCHAR(10), "
// 	        + "[ID_UPDATE] INT, [TYPE_QUOTA] INT(10), [DESCRIPTION_QUOTA] "
// 	        + "VARCHAR (40), [MONTH_QUOTA] INT, [YEAR_QUOTA] INT, "
// 	        + "[VALUE_QUOTA] DOUBLE);";
// 	
// 	private static final String urlTable = "CREATE TABLE [URL] "
// 	        + "([UPDATE_VERIFIER_URL] VARCHAR(10), "
// 	        + "[ID_UPDATE_URL] VARCHAR(255), [DEFAULT_URL] VARCHAR (255), "
// 	        + "[FIRST_URL] VARCHAR (255), [SECOND_URL] VARCHAR (255));";
// 	
// 	private static final String statisticTable = "CREATE TABLE [STATISTIC] "
// 	        + "([ID_STATISTIC] VARCHAR(10) unique, [MONTH_STATISTIC] INT, "
// 	        + "[STD_DEVIATION] DOUBLE, [AVERAGE_STATISTIC] DOUBLE, "
// 	        + "[MAX_VALUE_STATISTIC] DOUBLE, [YEAR_STATISTIC] INT,"
// 	        + "ID_SUBQUOTA INT(10));";
// 	
// 	private static final String versionTable = "CREATE TABLE [VERSION] "
// 	        + "([ID_VERSION] VARCHAR(10) unique, [NUM_VERSION] INT);";
// 	
// 	public DatabaseHelper( Context context ) {
// 		super( context, dbName, null, 1 );
// 	}
// 	
// 	public DatabaseHelper( Context context, String name, CursorFactory factory,
// 	        int version ) {
// 		
// 		super( context, name, factory, version );
// 	}
// 	
// 	/**
// 	 * Describes the actions that will be made when creating the database.
// 	 * Creates the tables.
// 	 */
// 	@Override
// 	public void onCreate( SQLiteDatabase db ) {
// 		db.execSQL( congressmanTable );
// 		db.execSQL( quotaTable );
// 		db.execSQL( urlTable );
// 		db.execSQL( statisticTable );
// 		db.execSQL( versionTable );
// 	}
// 	
// 	/**
// 	 * Describes the actions that will be made if there is a update in the
// 	 * database.
// 	 */
// 	@Override
// 	public void onUpgrade( SQLiteDatabase db, int oldVersion, int newVersion ) {
// 		/* ! Empty Method. */
// 	}
// }
// 
// Path: src/br/com/visualize/akan/domain/model/Url.java
// public class Url {
// 	private int idUpdateUrl = 0;
// 	private int updateVerifierUrl = 0;
// 	
// 	private String defaultUrl = "";
// 	private String firstAlternativeUrl = "";
// 	private String secondAlternativeUrl = "";
// 	
// 	public Url() {
// 		/*! Empty Constructor */
// 	}
// 	
// 	public Url( int idUpdateUrl, String defaultUrl ) {
// 		this.idUpdateUrl = idUpdateUrl;
// 		this.defaultUrl = defaultUrl;
// 	}
// 	
// 	public int getIdUpdateUrl() {
// 		return idUpdateUrl;
// 	}
// 	
// 	public void setIdUpdateUrl( int idUpdateUrl ) {
// 		this.idUpdateUrl = idUpdateUrl;
// 	}
// 	
// 	public int getUpdateVerifierUrl() {
// 		return updateVerifierUrl;
// 	}
// 	
// 	public void setUpdateVerifierUrl( int updateVerifierUrl ) {
// 		this.updateVerifierUrl = updateVerifierUrl;
// 	}
// 	
// 	public String getDefaultUrl() {
// 		return defaultUrl;
// 	}
// 	
// 	public void setDefaultUrl( String defaultUrl ) {
// 		this.defaultUrl = defaultUrl;
// 	}
// 	
// 	public String getFirstAlternativeUrl() {
// 		return firstAlternativeUrl;
// 	}
// 	
// 	public void setFirstAlternativeUrl( String firstAlternativeUrl ) {
// 		this.firstAlternativeUrl = firstAlternativeUrl;
// 	}
// 	
// 	public String getSecondAlternativeUrl() {
// 		return secondAlternativeUrl;
// 	}
// 	
// 	public void setSecondAlternativeUrl( String secondAlternativeUrl ) {
// 		this.secondAlternativeUrl = secondAlternativeUrl;
// 	}
// }


// Path: src/br/com/visualize/akan/api/dao/UrlDao.java
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import br.com.visualize.akan.api.helper.DatabaseHelper;
import br.com.visualize.akan.domain.model.Url;

/*
 * File: UrlDao.java Purpose: Bringing the implementation of model URL, a class
 * that directly references the business domain.
 */
package br.com.visualize.akan.api.dao;




/**
 * This class represents the Data Access Object for the URL, responsible for all
 * data base operations like selections, insertions and updates.
 */
public class UrlDao extends Dao {
	private static final boolean EMPTY = true;
	private static final boolean NOT_EMPTY = false;
	
	private String defaultUrl = "http://192.168.1.4:3000";
	private String tableName = "URL";
	
	private static UrlDao instanceUrlDao = null;
	private static String tableColumns[ ] = { "UPDATE_VERIFIER_URL", 
	    "ID_UPDATE_URL", "DEFAULT_URL", "FIRST_URL", "SECOND_URL" };
	
	protected UrlDao( Context context ) {
		UrlDao.database = new DatabaseHelper( context );