class MappedDelete extends BaseMappedStatement<T, ID> {

	public static <T, ID> MappedDelete<T, ID> build(DatabaseType databaseType, TableInfo<T, ID> tableInfo)
			throws SQLException {
		FieldType idField = tableInfo.getIdField();
		if (idField == null) {
			throw new SQLException("Cannot delete from " + tableInfo.getDataClass()
					+ " because it doesn't have an id field");
		}
		StringBuilder sb = new StringBuilder(64);
		appendTableName(databaseType, sb, "DELETE FROM ", tableInfo.getTableName());
		appendWhereFieldEq(databaseType, idField, sb, null);
		return new MappedDelete<T, ID>(tableInfo, sb.toString(), new FieldType[] { idField });
	}

	private  MappedDelete(TableInfo<T, ID> tableInfo, String statement, FieldType[] argFieldTypes);

}