public class SqlWrapperFactoryDefault extends Object implements ISqlWrapperFactory
| Constructor and Description |
|---|
SqlWrapperFactoryDefault() |
| Modifier and Type | Method and Description |
|---|---|
protected SqlWrapper |
createDeleteWrapper(Table table,
IRegister register,
int expectedCount)
Creates a delete wrapper.
|
SqlWrapper |
createInputWrapper(Table table,
CommandType command,
IRegister register,
int expectedCount)
Create wrapper for inputs.
|
protected SqlWrapper |
createInsertWrapper(Table table,
IRegister register,
int expectedCount)
Creates an insert wrapper.
|
SqlWrapper |
createOutputWrapper(Table table,
CommandType command,
IRegister register,
int expectedCount)
Create wrapper for outputs.
|
protected SqlWrapper |
createSelectWrapper(Table table,
CommandType command,
IRegister register,
int expectedCount)
Creates an select wrapper based on command type.
|
protected SqlWrapper |
createUpdateWrapper(Table table,
IRegister register,
int expectedCount)
Creates an update wrapper.
|
protected SqlWrapper |
deleteWrapper(StringBuilder sb,
Map<String,Integer> namesToIndexes,
int expectedCount)
Creates a delete wrapper.
|
protected SqlWrapper |
insertWrapper(StringBuilder sb,
Map<String,Integer> namesToIndexes,
int expectedCount)
Creates an insert wrapper.
|
protected SqlWrapper |
selectWrapper(CommandType command,
StringBuilder sb,
Map<String,Integer> namesToIndexes,
int expectedCount)
Creates a wrapper for select commands.
|
protected StringBuilder |
sqlDelete(Table table,
IRegister register,
Map<String,Integer> namesToIndexes)
Creates the delete SQL.
|
protected StringBuilder |
sqlInsert(Table table,
IRegister register,
Map<String,Integer> namesToIndexes)
Creates the insert SQL.
|
protected StringBuilder |
sqlSelect(Table table,
IRegister register,
Map<String,Integer> namesToIndexes)
Creates the select SQL.
|
protected StringBuilder |
sqlUpdate(Table table,
IRegister register,
Map<String,Integer> namesToIndexes)
Creates the update SQL.
|
protected SqlWrapper |
updateWrapper(StringBuilder sb,
Map<String,Integer> namesToIndexes,
int expectedCount)
Creates an update wrapper.
|
public SqlWrapper createInputWrapper(Table table, CommandType command, IRegister register, int expectedCount)
ISqlWrapperFactorycreateInputWrapper in interface ISqlWrapperFactorytable - A table.command - Command type.register - Set of values.expectedCount - Expected counter.protected SqlWrapper createInsertWrapper(Table table, IRegister register, int expectedCount)
table - A table.register - A register.expectedCount - The expected operation count.protected StringBuilder sqlInsert(Table table, IRegister register, Map<String,Integer> namesToIndexes)
table - A table.register - A register.namesToIndexes - A mapping from names to indexes.protected SqlWrapper insertWrapper(StringBuilder sb, Map<String,Integer> namesToIndexes, int expectedCount)
sb - The command.namesToIndexes - A mapping from column name to placeholder index.expectedCount - The expected register counter.protected SqlWrapper createUpdateWrapper(Table table, IRegister register, int expectedCount)
table - A table.register - A register.expectedCount - The expected operation count.protected StringBuilder sqlUpdate(Table table, IRegister register, Map<String,Integer> namesToIndexes)
table - A table.register - A register.namesToIndexes - A mapping from names to indexes.protected SqlWrapper updateWrapper(StringBuilder sb, Map<String,Integer> namesToIndexes, int expectedCount)
sb - The command.namesToIndexes - A mapping from column name to placeholder index.expectedCount - The command expected counter.protected SqlWrapper createDeleteWrapper(Table table, IRegister register, int expectedCount)
table - A table.register - A register.expectedCount - The expected operation count.protected StringBuilder sqlDelete(Table table, IRegister register, Map<String,Integer> namesToIndexes)
table - A table.register - A register.namesToIndexes - A mapping from names to indexes.protected SqlWrapper deleteWrapper(StringBuilder sb, Map<String,Integer> namesToIndexes, int expectedCount)
sb - The command.namesToIndexes - A mapping from column name to placeholder index.expectedCount - The command expected counter.public SqlWrapper createOutputWrapper(Table table, CommandType command, IRegister register, int expectedCount)
ISqlWrapperFactorycreateOutputWrapper in interface ISqlWrapperFactorytable - A table.command - Command type.register - Set of values.expectedCount - Expected counter.protected SqlWrapper createSelectWrapper(Table table, CommandType command, IRegister register, int expectedCount)
table - A table.command - The command type.register - A register.expectedCount - The expected operation count.protected StringBuilder sqlSelect(Table table, IRegister register, Map<String,Integer> namesToIndexes)
table - A table.register - A register.namesToIndexes - A mapping from names to indexes.protected SqlWrapper selectWrapper(CommandType command, StringBuilder sb, Map<String,Integer> namesToIndexes, int expectedCount)
command - Command type.sb - SQL string.namesToIndexes - A mapping from column name to placeholder index.expectedCount - Expected count on result.Copyright © 2017. All rights reserved.