|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.dbPort.Convert
public abstract class Convert
Convert SQL to Target DB
| Field Summary | |
|---|---|
protected String |
m_conversionError
Last Conversion Error |
protected Exception |
m_exception
Last Execution Error |
protected Statement |
m_stmt
Statement used |
protected boolean |
m_verbose
Verbose Messages |
static int |
REGEX_FLAGS
RegEx: insensitive and dot to include line end characters |
| Constructor Summary | |
|---|---|
Convert()
|
|
| Method Summary | |
|---|---|
protected String |
cleanUpStatement(String statement)
Clean up Statement. |
String[] |
convert(String sqlStatements)
Convert SQL Statement (stops at first error). |
String |
convertAll(String sqlStatements)
Convert SQL Statement (stops at first error). |
protected String[] |
convertIt(String sqlStatements)
Conversion routine (stops at first error). |
protected abstract ArrayList<String> |
convertStatement(String sqlStatement)
Convert single Statements |
protected String |
convertWithConvertMap(String sqlStatement)
do convert map base conversion |
protected String |
escapeQuotedString(String in)
hook for database specific escape of quoted string ( if needed ) |
boolean |
execute(String sqlStatements,
Connection conn)
Execute SQL Statement (stops at first error). |
String |
getConversionError()
Return last conversion error or null. |
protected Map |
getConvertMap()
Get convert map for use in sql convertion |
Exception |
getException()
Return last execution exception |
boolean |
hasError()
Returns true if a conversion or execution error had occured. |
abstract boolean |
isOracle()
True if the database support native oracle dialect, false otherwise. |
static void |
logMigrationScript(String oraStatement,
String pgStatement)
|
protected String |
recoverQuotedStrings(String retValue,
Vector<String> retVars)
Utility method to recover quoted string store in retVars |
protected String |
replaceQuotedStrings(String inputValue,
Vector<String> retVars)
Utility method to replace quoted string with a predefined marker |
void |
setVerbose(boolean verbose)
Set Verbose |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int REGEX_FLAGS
protected Statement m_stmt
protected String m_conversionError
protected Exception m_exception
protected boolean m_verbose
| Constructor Detail |
|---|
public Convert()
| Method Detail |
|---|
public void setVerbose(boolean verbose)
verbose -
public boolean execute(String sqlStatements,
Connection conn)
sqlStatements - conn - connection
IllegalStateException - if no connectionpublic Exception getException()
public boolean hasError()
public String convertAll(String sqlStatements)
sqlStatements -
public String[] convert(String sqlStatements)
sqlStatements -
public String getConversionError()
protected String[] convertIt(String sqlStatements)
- convertStatement
- convertWithConvertMap
- convertComplexStatement
- decode, sequence, exception
sqlStatements -
protected String cleanUpStatement(String statement)
statement -
protected String replaceQuotedStrings(String inputValue,
Vector<String> retVars)
retValue - retVars -
protected String recoverQuotedStrings(String retValue,
Vector<String> retVars)
retValue - retVars -
protected String escapeQuotedString(String in)
in -
protected String convertWithConvertMap(String sqlStatement)
sqlStatement -
protected Map getConvertMap()
protected abstract ArrayList<String> convertStatement(String sqlStatement)
sqlStatement -
public abstract boolean isOracle()
public static void logMigrationScript(String oraStatement,
String pgStatement)
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||