org.objectweb.jorm.mapper.rdb.adapter
Class MckoiAdapter

java.lang.Object
  |
  +--org.objectweb.jorm.mapper.rdb.adapter.BasicRdbAdapter
        |
        +--org.objectweb.jorm.mapper.rdb.adapter.MckoiAdapter
All Implemented Interfaces:
RdbAdapter

public class MckoiAdapter
extends BasicRdbAdapter

Author:
P. Dechamboux

Constructor Summary
MckoiAdapter()
           
 
Method Summary
 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 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.
 java.lang.String getSqlGetterName(PType pt, java.lang.String resultSet, int idx, java.lang.String sql)
          This method returns the sql getter method associated to the PType specified in parameter.
 
Methods inherited from class org.objectweb.jorm.mapper.rdb.adapter.BasicRdbAdapter
existSequence, existTable, fetchResultSetSize, getBigDecimal, getBoolean, getByte, getByteArray, getChar, getCharArray, getCharArray, getConcatExpression, getCreateSequence, getDate, getDate, getDouble, getFloat, getFromClause, getFromClause, getInt, getLong, getNextValInSequence, getOboolean, getObyte, getOchar, getOdouble, getOfloat, getOint, getOlong, getOshort, getQuery, getSerialized, getShort, getSqlGetterName, getSqlSetterName, getSqlSetterName, getSqlType, getSqlTypeCode, getSqlTypeCode, getString, getSubstringName, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getWhereClause, handleOrderBy, setBigDecimal, setBoolean, setByte, setByteArray, setChar, setCharArray, setDate, setDouble, setFloat, setInt, setLong, setOboolean, setObyte, setOchar, setOdouble, setOfloat, setOint, setOlong, setOshort, setSerialized, setShort, setString, supportBatchPreparedStatement, writeTableAlias
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MckoiAdapter

public MckoiAdapter()
Method Detail

getSqlGetterName

public java.lang.String getSqlGetterName(PType pt,
                                         java.lang.String resultSet,
                                         int idx,
                                         java.lang.String sql)
                                  throws PExceptionProtocol
Description copied from interface: RdbAdapter
This method returns the sql getter method associated to the PType specified in parameter. The returned string is the fetching of the value on the resultset to the specified index: "@resultSet.getBoolean(@idx)"

Specified by:
getSqlGetterName in interface RdbAdapter
Overrides:
getSqlGetterName in class BasicRdbAdapter
PExceptionProtocol

getFirstLocateExpression

public java.lang.String getFirstLocateExpression(java.lang.String substring,
                                                 java.lang.String instring)
                                          throws PException
Description copied from interface: RdbAdapter
Returns the expression for searching the position of the first occurrence of a substring in a string.

Two main syntaxes are found: position(substr in str) and instr(str, substr).

Specified by:
getFirstLocateExpression in interface RdbAdapter
Overrides:
getFirstLocateExpression in class BasicRdbAdapter
Parameters:
substring - The substring searched
instring - The string in which to search the substring
Returns:
The corresponding relational expression.
PException

getIndexedLocateExpression

public java.lang.String getIndexedLocateExpression(java.lang.String instring,
                                                   java.lang.String substring,
                                                   java.lang.String fromIndex)
                                            throws PException
Description copied from interface: RdbAdapter
Returns the expression for searching the position of the first occurrence of a substring in a string starting from a given index.

Two main syntaxes are found: instr() and locate()

Specified by:
getIndexedLocateExpression in interface RdbAdapter
Overrides:
getIndexedLocateExpression in class BasicRdbAdapter
Parameters:
instring - The string in which to search the substring
substring - The substring searched
fromIndex - The index from which to start searching
Returns:
The corresponding relational expression.
PException