class TableInfo {

	public FieldType getFieldTypeByColumnName(String columnName) {
		if (fieldNameMap == null) {
			// build our alias map if we need it
			Map<String, FieldType> map = new HashMap<String, FieldType>();
			for (FieldType fieldType : fieldTypes) {
				map.put(fieldType.getColumnName().toLowerCase(), fieldType);
			}
			fieldNameMap = map;
		}
		FieldType fieldType = fieldNameMap.get(columnName.toLowerCase());
		// if column name is found, return it
		if (fieldType != null) {
			return fieldType;
		}
		// look to see if someone is using the field-name instead of column-name
		for (FieldType fieldType2 : fieldTypes) {
			if (fieldType2.getFieldName().equals(columnName)) {
				throw new IllegalArgumentException("You should use columnName '" + fieldType2.getColumnName()
						+ "' for table " + tableName + " instead of fieldName '" + fieldType2.getFieldName() + "'");
			}
		}
		throw new IllegalArgumentException("Unknown column name '" + columnName + "' in table " + tableName);
	}

	public  TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> baseDaoImpl, Class<T> dataClass);
	public  TableInfo(DatabaseType databaseType, BaseDaoImpl<T, ID> baseDaoImpl, DatabaseTableConfig<T> tableConfig);

}