package de.dassit.dbwrapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class Test extends Entry {

	String title;
	int size;
	boolean flag;
	
	public Test() {
		String[] myFieldNames = { "title","size","flag" };
		
		fieldNames = myFieldNames;
		keyName="name";
		tableName="testtable";
	}

	protected Object[] getValues() {
		Object[] o = { title, size, flag };
		return o;
	}
	
	@Override
	public void initFromQuery(ResultSet queryResult) throws SQLException {
		// TODO Auto-generated method stub

	}

	@Override
	public Entry newFromQuery(ResultSet rs) throws SQLException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void validate() throws SQLException {
		// TODO Auto-generated method stub

	}


	void test() {
		key="test1";
		title="Mein Titel";
		size=128;
		flag=true;
		
		String update = getUpdateStatement();
		String insert = getInsertStatement();

		System.out.println(update);
		System.out.println(insert);
		
		update = genericUpdateOne("title", "neuer Titel", "test1");
		
		System.out.println(update);
		
		System.out.println(getRenameStatement("testneu"));
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Test t = new Test();
		t.test();
	}

}
