}
public DeleteStatement getDeleteStatement() {
DeleteStatement result = getSchema().getSQLFactory().newDeleteStatement();
result.setTable(this);
ColumnSet primaryKey = getPrimaryKey();
if (primaryKey == null) {
throw new IllegalStateException("Cannot create a default delete statement without a primary key.");
}
result.getWhere().addColumnSetQuery(primaryKey, result.getTableReference());
return result;