|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface permits to adapte the use of a JDBC driver and the SQL type for the non conformance of a Database.
Field Summary | |
static int |
NOSIZE
|
Fields inherited from interface org.objectweb.jorm.mapper.rdb.adapter.api.TypeAdapter |
TYPE_NAMES, TYPECODE_BIGDECIMAL, TYPECODE_BIGINTEGER, TYPECODE_BOOLEAN, TYPECODE_BYTE, TYPECODE_BYTEARRAY, TYPECODE_CHAR, TYPECODE_CHARARRAY, TYPECODE_DATE, TYPECODE_DOUBLE, TYPECODE_FLOAT, TYPECODE_INT, TYPECODE_LONG, TYPECODE_OBJBOOLEAN, TYPECODE_OBJBYTE, TYPECODE_OBJCHAR, TYPECODE_OBJDOUBLE, TYPECODE_OBJFLOAT, TYPECODE_OBJINT, TYPECODE_OBJLONG, TYPECODE_OBJSHORT, TYPECODE_SERIALIZED, TYPECODE_SHORT, TYPECODE_STRING |
Method Summary | |
boolean |
existTable(java.sql.Connection connection,
java.lang.String tableName)
checks the table existence |
boolean |
existView(java.sql.Connection connection,
java.lang.String viewName)
checks the view existence |
int |
fetchResultSetSize(java.sql.ResultSet rs)
This method calculates the size of a result set window. |
java.lang.String |
getColumnAliasExpr(java.lang.String aliasName)
Returns a column alias expression. |
java.lang.String |
getConcatExpression(java.lang.String op1,
java.lang.String op2)
|
java.lang.String |
getFirstLocateExpression(java.lang.String substring,
java.lang.String instring)
Returns the expression for searching the position of the first occurrence of a substring in a string. |
java.lang.String |
getIndexedLocateExpression(java.lang.String inputString,
java.lang.String substring,
java.lang.String fromIndex)
Returns the expression for searching the position of the first occurrence of a substring in a string starting from a given index. |
java.lang.String |
getLengthOperator()
|
java.lang.String |
getName()
|
java.lang.String |
getQuery(java.lang.String selectClause,
java.util.List jts,
java.lang.String whereclause,
int rangeFrom,
int rangeSize)
Builds a query with join and table alias. |
java.lang.String |
getSubqueryAlias()
In the case the subquery needs to be aliased (Postgres), returns a string to be appended to the subquery. |
java.lang.String |
getSubstringName()
|
java.lang.String |
handleOrderBy(java.lang.String query)
|
boolean |
supportBatchPreparedStatement()
Indicates if the driver supports the batch of PreparedStatement |
void |
writeColumnAlias(java.lang.String alias,
java.lang.StringBuffer sb)
Append a column alias to an SQL expression. |
void |
writeTableAlias(java.lang.String alias,
java.lang.StringBuffer sb)
Append a table alias to an SQL expression. |
Methods inherited from interface org.objectweb.jorm.mapper.rdb.adapter.api.TypeAdapter |
getSqlType, getSqlTypeCode, getSqlTypeCode |
Methods inherited from interface org.objectweb.jorm.mapper.rdb.adapter.api.ResultsetAdapter |
getBigDecimal, getBigInteger, getBoolean, getByte, getByteArray, getChar, getCharArray, getDate, getDate, getDouble, getFloat, getInt, getLong, getOboolean, getObyte, getOchar, getOdouble, getOfloat, getOint, getOlong, getOshort, getSerialized, getShort, getString |
Methods inherited from interface org.objectweb.jorm.mapper.rdb.adapter.api.PreparedStatementAdapter |
setBigDecimal, setBigInteger, setBoolean, setByte, setByteArray, setChar, setCharArray, setDate, setDouble, setFloat, setInt, setLong, setNull, setOboolean, setObyte, setOchar, setOdouble, setOfloat, setOint, setOlong, setOshort, setSerialized, setShort, setString |
Methods inherited from interface org.objectweb.jorm.mapper.rdb.adapter.api.ValueAsSQLStringAdapter |
getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString |
Methods inherited from interface org.objectweb.jorm.mapper.rdb.adapter.api.SequenceAdapter |
existSequence, getCreateSequence, getCreateSequence, getNextValInSequence |
Field Detail |
public static final int NOSIZE
Method Detail |
public java.lang.String getName()
public boolean supportBatchPreparedStatement()
public int fetchResultSetSize(java.sql.ResultSet rs) throws java.sql.SQLException
rs
- the result set which the size must be returned
java.sql.SQLException
public java.lang.String getSubstringName()
public java.lang.String getConcatExpression(java.lang.String op1, java.lang.String op2)
public java.lang.String getFirstLocateExpression(java.lang.String substring, java.lang.String instring) throws RdbAdapterException
Two main syntaxes are found: position(substr in str) and instr(str, substr).
substring
- The substring searchedinstring
- The string in which to search the substring
RdbAdapterException
public java.lang.String getIndexedLocateExpression(java.lang.String inputString, java.lang.String substring, java.lang.String fromIndex) throws RdbAdapterException
Two main syntaxes are found: instr() and locate()
inputString
- The string in which to search the substringsubstring
- The substring searchedfromIndex
- The index from which to start searching
RdbAdapterException
public java.lang.String getLengthOperator() throws RdbAdapterException
RdbAdapterException
public java.lang.String getQuery(java.lang.String selectClause, java.util.List jts, java.lang.String whereclause, int rangeFrom, int rangeSize)
selectClause
- is a string representation of the select clausejts
- is the tables with their joinwhereclause
- is a string representation of the where clauserangeFrom
- is the rank of the first row to be returned in case of
a range limit, starting at 0rangeSize
- is the number of rows to be returned in case of a range
limit. The convention is that Integer.MAX_VALUE means no range limit.public void writeTableAlias(java.lang.String alias, java.lang.StringBuffer sb)
alias
- The table aliassb
- The StringBuffer into which to write the alias.public void writeColumnAlias(java.lang.String alias, java.lang.StringBuffer sb)
alias
- the column aliassb
- The StringBuffer into which to write the alias.public java.lang.String getColumnAliasExpr(java.lang.String aliasName)
aliasName
- the column aliaspublic java.lang.String handleOrderBy(java.lang.String query)
public boolean existTable(java.sql.Connection connection, java.lang.String tableName) throws java.sql.SQLException
connection
- is the JDBC connection to usetableName
- is the name of the table
java.sql.SQLException
public boolean existView(java.sql.Connection connection, java.lang.String viewName) throws java.sql.SQLException
connection
- is the JDBC connection to useviewName
- is the name of the view
java.sql.SQLException
public java.lang.String getSubqueryAlias()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |