|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.clazzes.jdbc2xml.deserialization.impl.AbstractSbDeserializationHandler
public abstract class AbstractSbDeserializationHandler
A base class for all DeserializationHandlers, which are setting a String value to a database column.
Field Summary | |
---|---|
protected int |
type
|
Constructor Summary | |
---|---|
AbstractSbDeserializationHandler(int type)
Default constructor. |
Method Summary | |
---|---|
void |
addCharacters(char[] ch,
int start,
int length)
Push characters received by ContentHandler.characters(char[], int, int)
to the field content. |
void |
fillColumn(PreparedStatement ps,
int column)
Fill the column of the given prepared statement with the data received so far. |
protected abstract void |
fillColumnValue(PreparedStatement ps,
int column,
String value)
Fill in a column value into the given PreparedStatment. |
void |
startCharacters()
Start receiving data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final int type
Constructor Detail |
---|
public AbstractSbDeserializationHandler(int type)
Method Detail |
---|
protected abstract void fillColumnValue(PreparedStatement ps, int column, String value) throws SQLException
ps
- The statement to fill.column
- The number of the column to fill.value
- The string value to set or null, if the column has to be nulled.
SQLException
public void addCharacters(char[] ch, int start, int length)
DeserializationHandler
ContentHandler.characters(char[], int, int)
to the field content.
This method throws an exception, DeserializationHandler.startCharacters()
has not been called before.
addCharacters
in interface DeserializationHandler
ch
- The character array.start
- The start index of the data to push.length
- The length of the data to push.public void fillColumn(PreparedStatement ps, int column) throws SQLException
DeserializationHandler
DeserializationHandler.startCharacters()
has not been called
before, set the column to an SQL null value.
This call resets the state of this handler, so DeserializationHandler.startCharacters()
may be called
again.
fillColumn
in interface DeserializationHandler
ps
- The PreparedStatement to fill.column
- The number of the column to set.
SQLException
public void startCharacters()
DeserializationHandler
ContentHandler.startElement(String, String, String, org.xml.sax.Attributes)
operation.
startCharacters
in interface DeserializationHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |