package com.exedio.cope.lib;

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

abstract class Column
{
	final Type type;
	final String trimmedName;
	final String protectedName;
	final boolean notNull;
	final String databaseType;
	final Integer jdbcType;
	
	Column(final Type type, final String trimmedName, final boolean notNull, final String databaseType, final Integer jdbcType)
	{
		this.type = type;
		this.trimmedName = trimmedName;
		this.protectedName = Database.theInstance.protectName(trimmedName);
		this.notNull = notNull;
		this.databaseType = databaseType;
		this.jdbcType = jdbcType;
	}
	
	public final String toString()
	{
		return trimmedName;
	}
	
	abstract void load(ResultSet resultSet, int columnIndex, Row row) throws SQLException;
	abstract Object cacheToDatabase(Object cache);

}



@@ -137,27 +137,18 @@
  String 
-trimmedName
+id
 ;%0A%09final
@@ -287,27 +287,18 @@
  String 
-trimmedName
+id
 , final 
@@ -399,33 +399,15 @@
 his.
-trimmedName = trimmedName
+id = id
 ;%0A%09%09
@@ -460,27 +460,18 @@
 ectName(
-trimmedName
+id
 );%0A%09%09thi
@@ -608,19 +608,10 @@
 urn 
-trimmedName
+id
 ;%0A%09%7D

rename Column#trimmedName to id