Package net.ontopia.persistence.proxy
Class SQLGenerator
java.lang.Object
net.ontopia.persistence.proxy.SQLGenerator
INTERNAL: Utility class that can generate SQL statements.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbindMultipleParameters(Iterator<IdentityIF> identities, FieldInfoIF finfo, PreparedStatement stm, int batchSize) static voidbindMultipleParameters(Iterator<IdentityIF> identities, FieldInfoIF finfo, PreparedStatement stm, int offset, int batchSize) static StringgetDeleteStatement(String table, String[] where_columns) INTERNAL: Generates a SQL delete statement for the specified table with a where clause referencing the given columns.static StringgetDeleteStatement(String table, FieldInfoIF[] where_fields) INTERNAL: Generates a SQL delete statement for the specified table with a where clause referencing the given field infos.static StringgetInsertStatement(String table, String[] value_columns) INTERNAL: Generates a SQL insert statement for the specified table with a value clause referencing the given columns.static StringgetInsertStatement(String table, FieldInfoIF[] value_fields) INTERNAL: Generates a SQL insert statement for the specified table with a value clause referencing the given field infos.static StringgetSelectStatement(String table, String[] select_columns, String[] where_columns, int multiple) INTERNAL: Generates a SQL select statement for the specified table with a select clause and a where clause referencing the given columns.static StringgetSelectStatement(String jointable, String datatable, String[] jointable_keys, String[] datatable_keys, String[] datatable_select_columns, String[] jointable_where_columns, int multiple) INTERNAL: Generates a SQL select statement that joins two tables.static StringgetSelectStatement(String table, FieldInfoIF[] select_fields, FieldInfoIF[] where_fields, int multiple) INTERNAL: Generates a SQL select statement for the specified table with a select clause and a where clause referencing the given field infos.static StringgetUpdateStatement(String table, String[] set_columns, String[] where_columns) INTERNAL: Generates a SQL update statement for the specified table with a set clause and a where clause referencing the given columns.static StringgetUpdateStatement(String table, FieldInfoIF[] set_fields, FieldInfoIF[] where_fields) INTERNAL: Generates a SQL update statement for the specified table with a set clause and a where clause referencing the given field infos.static StringprocessMultipleLoadParameters(Collection<IdentityIF> identities, String sql)
-
Constructor Details
-
SQLGenerator
public SQLGenerator()
-
-
Method Details
-
getDeleteStatement
INTERNAL: Generates a SQL delete statement for the specified table with a where clause referencing the given field infos. -
getDeleteStatement
INTERNAL: Generates a SQL delete statement for the specified table with a where clause referencing the given columns. -
getInsertStatement
INTERNAL: Generates a SQL insert statement for the specified table with a value clause referencing the given field infos. -
getInsertStatement
INTERNAL: Generates a SQL insert statement for the specified table with a value clause referencing the given columns. -
getUpdateStatement
public static String getUpdateStatement(String table, FieldInfoIF[] set_fields, FieldInfoIF[] where_fields) INTERNAL: Generates a SQL update statement for the specified table with a set clause and a where clause referencing the given field infos. -
getUpdateStatement
INTERNAL: Generates a SQL update statement for the specified table with a set clause and a where clause referencing the given columns. -
getSelectStatement
public static String getSelectStatement(String table, FieldInfoIF[] select_fields, FieldInfoIF[] where_fields, int multiple) INTERNAL: Generates a SQL select statement for the specified table with a select clause and a where clause referencing the given field infos. -
getSelectStatement
public static String getSelectStatement(String table, String[] select_columns, String[] where_columns, int multiple) INTERNAL: Generates a SQL select statement for the specified table with a select clause and a where clause referencing the given columns. -
getSelectStatement
public static String getSelectStatement(String jointable, String datatable, String[] jointable_keys, String[] datatable_keys, String[] datatable_select_columns, String[] jointable_where_columns, int multiple) INTERNAL: Generates a SQL select statement that joins two tables. -
processMultipleLoadParameters
-
bindMultipleParameters
public static void bindMultipleParameters(Iterator<IdentityIF> identities, FieldInfoIF finfo, PreparedStatement stm, int batchSize) throws SQLException - Throws:
SQLException
-
bindMultipleParameters
public static void bindMultipleParameters(Iterator<IdentityIF> identities, FieldInfoIF finfo, PreparedStatement stm, int offset, int batchSize) throws SQLException - Throws:
SQLException
-