|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jorm.mapper.rdb.adapter.BasicRdbAdapter
org.objectweb.jorm.mapper.rdb.adapter.HsqlAdapter
public class HsqlAdapter
RdbAdapter for the Hsql Database.
Field Summary |
---|
Fields inherited from class org.objectweb.jorm.mapper.rdb.adapter.BasicRdbAdapter |
---|
logger, name |
Fields inherited from interface org.objectweb.jorm.mapper.rdb.adapter.api.RdbAdapter |
---|
NOSIZE, RANGEATEND, RANGEATSTART, RANGEUNSUPPORTED |
Fields inherited from interface org.objectweb.jorm.mapper.rdb.adapter.api.TypeAdapter |
---|
TYPE_NAMES, TYPECODE_ARRAY, 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 |
Constructor Summary | |
---|---|
HsqlAdapter()
|
Method Summary | |
---|---|
protected boolean |
existRelation(java.sql.Connection connection,
java.lang.String tableName,
java.lang.String[] relationTypes)
|
boolean |
existSequence(java.sql.Connection connection,
java.lang.String seqName)
checks the sequence existence |
java.lang.String |
getIndexedLocateExpression(java.lang.String instring,
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. |
void |
getManyNextValInSequence(java.sql.Connection conn,
java.lang.String seqName,
int numberOfNextVal)
|
java.lang.String |
getNextValInSequence(java.lang.String seqName)
|
int |
getRangeParametersAtStart()
Indicates whether parameters corresponding to range queries (range start and size) are positioned at the start or at the end of the SQL query. |
protected void |
modifyQueryWithRange(java.lang.StringBuffer sb,
boolean rangeStart,
boolean rangeSize)
|
protected void |
modifySelectClauseWithRange(java.lang.StringBuffer sb,
boolean rangeStart,
boolean rangeSize)
|
boolean |
supportBatchPreparedStatement()
Indicates if the driver supports the batch of PreparedStatement |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HsqlAdapter()
Method Detail |
---|
public boolean supportBatchPreparedStatement()
RdbAdapter
supportBatchPreparedStatement
in interface RdbAdapter
supportBatchPreparedStatement
in class BasicRdbAdapter
public java.lang.String getIndexedLocateExpression(java.lang.String instring, java.lang.String substring, java.lang.String fromIndex)
RdbAdapter
Two main syntaxes are found: instr() and locate()
getIndexedLocateExpression
in interface RdbAdapter
getIndexedLocateExpression
in class BasicRdbAdapter
instring
- The string in which to search the substringsubstring
- The substring searchedfromIndex
- The index from which to start searching
protected boolean existRelation(java.sql.Connection connection, java.lang.String tableName, java.lang.String[] relationTypes) throws java.sql.SQLException
existRelation
in class BasicRdbAdapter
java.sql.SQLException
public boolean existSequence(java.sql.Connection connection, java.lang.String seqName) throws java.sql.SQLException
SequenceAdapter
existSequence
in interface SequenceAdapter
existSequence
in class BasicRdbAdapter
connection
- is the JDBC connection to useseqName
- is the sequence of the table
java.sql.SQLException
public java.lang.String getNextValInSequence(java.lang.String seqName)
getNextValInSequence
in interface SequenceAdapter
getNextValInSequence
in class BasicRdbAdapter
seqName
- is the sequence name
public void getManyNextValInSequence(java.sql.Connection conn, java.lang.String seqName, int numberOfNextVal) throws RdbAdapterException
getManyNextValInSequence
in interface SequenceAdapter
getManyNextValInSequence
in class BasicRdbAdapter
seqName
- the sequence namenumberOfNextVal
- the number of next val called in the same query
RdbAdapterException
protected void modifySelectClauseWithRange(java.lang.StringBuffer sb, boolean rangeStart, boolean rangeSize)
modifySelectClauseWithRange
in class BasicRdbAdapter
protected void modifyQueryWithRange(java.lang.StringBuffer sb, boolean rangeStart, boolean rangeSize)
modifyQueryWithRange
in class BasicRdbAdapter
public int getRangeParametersAtStart()
RdbAdapter
Indeed, depending on the database, the SQL syntax may vary, and the parameters can either be put at the front or at the end.
getRangeParametersAtStart
in interface RdbAdapter
getRangeParametersAtStart
in class BasicRdbAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |