|
||||||||||
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.SqlserverAdapter
public class SqlserverAdapter
This class is a sql adapter for the SQL Server relational 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 | |
---|---|
SqlserverAdapter()
|
Method Summary | |
---|---|
char[] |
getCharArray(java.sql.ResultSet rs,
int idx,
char[] nullValue)
Get a char[] value from a ResultSet. |
java.lang.String |
getCreateSequence(java.lang.String seqName)
|
java.lang.String |
getCreateSequence(java.lang.String seqName,
java.lang.Integer startid,
java.lang.Integer inc,
java.lang.Integer cache)
CREATE [ TEMPORARY | TEMP ] SEQUENCE name [ INCREMENT [ BY ] increment ] [ MINVALUE minvalue | NO MINVALUE ] [ MAXVALUE maxvalue | NO MAXVALUE ] [ START [ WITH ] start ] [ CACHE cache ] [ [ NO ] CYCLE ] |
java.lang.String |
getLengthOperator()
|
java.lang.String |
getSqlType(int typeCode,
boolean usedInPK,
int size,
int scale)
This method returns the SQL type linked to the java type |
void |
setCharArray(java.sql.PreparedStatement ps,
int idx,
char[] o)
Assignes a char[] value into a PreparedStatement |
void |
setObyte(java.sql.PreparedStatement ps,
int idx,
java.lang.Byte o)
Assignes a Byte value into a PreparedStatement |
void |
setOchar(java.sql.PreparedStatement ps,
int idx,
java.lang.Character o)
Assignes a Character value into a PreparedStatement |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SqlserverAdapter()
Method Detail |
---|
public java.lang.String getSqlType(int typeCode, boolean usedInPK, int size, int scale) throws RdbAdapterException
TypeAdapter
getSqlType
in interface TypeAdapter
getSqlType
in class BasicRdbAdapter
typeCode
- is the type code of the java typeusedInPK
- indicates if the type has to be used into a Primary keysize
- can indicates the expected size of the type. If it equals to
NO_SIZE that means no size is expected. This parameter can be used for
float, BigXXX numbers, String,...scale
- can indicates the expected scale of the type. If it equals to
NO_SIZE that means no scale is expected.
RdbAdapterException
public char[] getCharArray(java.sql.ResultSet rs, int idx, char[] nullValue) throws java.sql.SQLException
ResultsetAdapter
getCharArray
in interface ResultsetAdapter
getCharArray
in class BasicRdbAdapter
rs
- is the result where to get the valueidx
- is the index of the value in the resultsetnullValue
- represents the nullvalue to return if the column is null
in the resultset
java.sql.SQLException
public void setObyte(java.sql.PreparedStatement ps, int idx, java.lang.Byte o) throws java.sql.SQLException
PreparedStatementAdapter
setObyte
in interface PreparedStatementAdapter
setObyte
in class BasicRdbAdapter
ps
- is the PreparedStatementidx
- is the index of the the value in the PreparedStatemento
- is the value to assign
java.sql.SQLException
public void setOchar(java.sql.PreparedStatement ps, int idx, java.lang.Character o) throws java.sql.SQLException
PreparedStatementAdapter
setOchar
in interface PreparedStatementAdapter
setOchar
in class BasicRdbAdapter
ps
- is the PreparedStatementidx
- is the index of the the value in the PreparedStatemento
- is the value to assign
java.sql.SQLException
public void setCharArray(java.sql.PreparedStatement ps, int idx, char[] o) throws java.sql.SQLException
PreparedStatementAdapter
setCharArray
in interface PreparedStatementAdapter
setCharArray
in class BasicRdbAdapter
ps
- is the PreparedStatementidx
- is the index of the the value in the PreparedStatemento
- is the value to assign
java.sql.SQLException
public java.lang.String getCreateSequence(java.lang.String seqName) throws java.lang.UnsupportedOperationException
getCreateSequence
in interface SequenceAdapter
getCreateSequence
in class BasicRdbAdapter
seqName
- is the sequence name
java.lang.UnsupportedOperationException
public java.lang.String getCreateSequence(java.lang.String seqName, java.lang.Integer startid, java.lang.Integer inc, java.lang.Integer cache)
BasicRdbAdapter
getCreateSequence
in interface SequenceAdapter
getCreateSequence
in class BasicRdbAdapter
seqName
- is the sequence namestartid
- is the initial value of the sequenceinc
- is the increment sizecache
- is the size of the cache
public java.lang.String getLengthOperator() throws RdbAdapterException
getLengthOperator
in interface RdbAdapter
getLengthOperator
in class BasicRdbAdapter
RdbAdapterException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |