org.objectweb.jorm.mapper.rdb.adapter

Class SapdbAdapter

Implemented Interfaces:
PreparedStatementAdapter, RdbAdapter, RdbAdapter, ResultsetAdapter, SequenceAdapter, TypeAdapter, ValueAsSQLStringAdapter

public class SapdbAdapter
extends BasicRdbAdapter

This class is a sql adapter for the SapDB relational database. SapDB 7.4 beta result of the jdbc driver test: =============================== FAIL: BIT: create table: [-3002] (at 31): Invalid datatype FAIL: TINYINT: create table: [-4006] (at 28): Unknown domain name:TINYINT FAIL: SMALLINT: select value 0 with getObject FAIL: SMALLINT: select value 1 with getObject FAIL: SMALLINT: select value 254 with getObject FAIL: INTEGER: select value 0 with getObject FAIL: INTEGER: select value 1 with getObject FAIL: INTEGER: select value 254 with getObject FAIL: BIGINT: create table: [-4006] (at 28): Unknown domain name:BIGINT FAIL: REAL: select value 0.0 with getObject FAIL: REAL: select value 1.0 with getObject FAIL: REAL: select value 254.0 with getObject FAIL: DOUBLE: create table: [-3002] (at 30): Invalid datatype

Author:
S.Chassande-Barrioz

Field Summary

Fields inherited from class org.objectweb.jorm.mapper.rdb.adapter.BasicRdbAdapter

CONCAT, INDEXEDLOCATE, accountForNanos, name

Fields inherited from interface org.objectweb.jorm.mapper.rdb.adapter.api.RdbAdapter

NOSIZE

Fields inherited from interface org.objectweb.jorm.mapper.rdb.adapter.api.TypeAdapter

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, TYPE_NAMES

Constructor Summary

SapdbAdapter()

Method Summary

String
getNextValInSequence(String seqName)
void
writeTableAlias(String alias, StringBuffer sb)
Append a table alias to an SQL expression.

Methods inherited from class org.objectweb.jorm.mapper.rdb.adapter.BasicRdbAdapter

escapeFunctionClose, escapeFunctionOpen, existRelation, existSequence, existTable, existView, fetchResultSetSize, getBigDecimal, getBigInteger, getBoolean, getByte, getByteArray, getCACHEkeyWord, getChar, getCharArray, getCharArray, getCharArray, getColumnAliasExpr, getConcatExpression, getCreateSequence, getCreateSequence, getDate, getDate, getDouble, getFirstLocateExpression, getFloat, getFromClause, getFromClause, getINCREMENTkeyWord, getIndexedLocateExpression, getInt, getLengthOperator, getLong, getName, getNextValInSequence, getOboolean, getObyte, getOchar, getOdouble, getOfloat, getOint, getOlong, getOshort, getQuery, getSTARTkeyWord, getSerialized, getShort, getSqlType, getSqlTypeCode, getSqlTypeCode, getString, getSubqueryAlias, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getValueAsSQLString, getWhereClause, handleOrderBy, modifySelectClauseWithRange, modifyWhereClauseWithRange, setBigDecimal, setBigInteger, setBoolean, setByte, setByteArray, setChar, setCharArray, setDate, setDouble, setFloat, setInt, setLong, setNull, setOboolean, setObyte, setOchar, setOdouble, setOfloat, setOint, setOlong, setOshort, setSerialized, setShort, setString, sqldate2date, supportBatchPreparedStatement, time2date, timestamp2date, writeColumnAlias, writeTableAlias

Constructor Details

SapdbAdapter

public SapdbAdapter()

Method Details

getNextValInSequence

public String getNextValInSequence(String seqName)
Specified by:
getNextValInSequence in interface SequenceAdapter
Overrides:
getNextValInSequence in interface BasicRdbAdapter

Parameters:
seqName - is the sequence name

Returns:
the SQL command to gett a new value in a SQL sequence which the name is given in parameter.


writeTableAlias

public void writeTableAlias(String alias,
                            StringBuffer sb)
Append a table alias to an SQL expression. To be used when constructing the string expression of a from clause. For example, most database recognize the syntax 'select ... from R as ALIAS_FOR_R, S as ALIAS_FOR_S ... ' whereas Orabcle accepts the following syntax : 'select ... from R ALIAS_FOR_R, S ALIAS_FOR_S ... '
Specified by:
writeTableAlias in interface RdbAdapter
Overrides:
writeTableAlias in interface BasicRdbAdapter

Parameters:
alias - The table alias
sb - The StringBuffer into which to write the alias.