common-util

local.tomas.common.xml.impl
Class SqlStoreImpl

java.lang.Object
  extended by local.tomas.common.xml.XMLSqlStore
      extended by local.tomas.common.xml.impl.SqlStoreImpl

public class SqlStoreImpl
extends XMLSqlStore

SQL store implementation.

Author:
tomas

Field Summary
static String ATTRIBUTE_TYPE
          Attribute.
static String CHAR_TYPE
          Character.
static String DOC_END_TYPE
          End of document.
static String DOC_TYPE
          Document
static String END_TOKEN_TYPE
          End token.
static String LOCAL_NAME_TYPE
          Local name.
static String QNAME_TYPE
          QName.
static String START_TOKEN_TYPE
          Start token.
static String URI_TYPE
          URI.
 
Fields inherited from class local.tomas.common.xml.XMLSqlStore
ID_FIELD, SEQUENCE_FIELD, TABLE_NAME, TYPE_FIELD, VALUE_FIELD
 
Constructor Summary
SqlStoreImpl(Connection conn)
          Construct SQL store from connection.
 
Method Summary
 void deleteXml(int id)
          Delete an XML structure from the database.
 int getBatchSize()
          Get the batch size.
 String getField(int id)
          Get database table or column name.
 int getMaxValueSize()
          Get the maximum number of characters used to store values in the value column of the database.
 Result getResult(int id)
          Get XML transformation result to store an XML structure in the database.
 Source getSource(int id)
          Get XML transformation source to retrieve an XML structure from the database.
 void setBatchSize(int batchSize)
          Set the batch size.
 void setField(int id, String value)
          Define database table or column name.
 void setMaxValueSize(int size)
          Set the maximum number of characters used to store values in the value column of the database.
 
Methods inherited from class local.tomas.common.xml.XMLSqlStore
createStore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOC_TYPE

public static final String DOC_TYPE
Document

See Also:
Constant Field Values

DOC_END_TYPE

public static final String DOC_END_TYPE
End of document.

See Also:
Constant Field Values

CHAR_TYPE

public static final String CHAR_TYPE
Character.

See Also:
Constant Field Values

START_TOKEN_TYPE

public static final String START_TOKEN_TYPE
Start token.

See Also:
Constant Field Values

END_TOKEN_TYPE

public static final String END_TOKEN_TYPE
End token.

See Also:
Constant Field Values

ATTRIBUTE_TYPE

public static final String ATTRIBUTE_TYPE
Attribute.

See Also:
Constant Field Values

URI_TYPE

public static final String URI_TYPE
URI.

See Also:
Constant Field Values

QNAME_TYPE

public static final String QNAME_TYPE
QName.

See Also:
Constant Field Values

LOCAL_NAME_TYPE

public static final String LOCAL_NAME_TYPE
Local name.

See Also:
Constant Field Values
Constructor Detail

SqlStoreImpl

public SqlStoreImpl(Connection conn)
Construct SQL store from connection.

Parameters:
conn - JDBC connection
Method Detail

setField

public void setField(int id,
                     String value)
Description copied from class: XMLSqlStore
Define database table or column name.

Specified by:
setField in class XMLSqlStore
Parameters:
id - - used to identify the column. See the constants of this class.
value - - new name.

getField

public String getField(int id)
Description copied from class: XMLSqlStore
Get database table or column name.

Specified by:
getField in class XMLSqlStore
Parameters:
id - - used to identify the column. See the constants of this class.
Returns:
- the current name.

getMaxValueSize

public int getMaxValueSize()
Description copied from class: XMLSqlStore
Get the maximum number of characters used to store values in the value column of the database.

Specified by:
getMaxValueSize in class XMLSqlStore
Returns:
the number of characters

setMaxValueSize

public void setMaxValueSize(int size)
Description copied from class: XMLSqlStore
Set the maximum number of characters used to store values in the value column of the database.

Specified by:
setMaxValueSize in class XMLSqlStore
Parameters:
size - - number of characters

getBatchSize

public int getBatchSize()
Get the batch size.

Specified by:
getBatchSize in class XMLSqlStore
Returns:
Returns the batch size.

setBatchSize

public void setBatchSize(int batchSize)
Set the batch size.

Specified by:
setBatchSize in class XMLSqlStore
Parameters:
batchSize - The batch size to set.

getSource

public Source getSource(int id)
                 throws XMLException
Description copied from class: XMLSqlStore
Get XML transformation source to retrieve an XML structure from the database.

Specified by:
getSource in class XMLSqlStore
Parameters:
id - - unique identifier of XML structure in the database
Returns:
transformation source
Throws:
XMLException

getResult

public Result getResult(int id)
                 throws XMLException
Description copied from class: XMLSqlStore
Get XML transformation result to store an XML structure in the database.

Specified by:
getResult in class XMLSqlStore
Parameters:
id - - unique identifier of XML strucure in the database
Returns:
transformation result
Throws:
XMLException

deleteXml

public void deleteXml(int id)
               throws XMLException
Description copied from class: XMLSqlStore
Delete an XML structure from the database.

Specified by:
deleteXml in class XMLSqlStore
Parameters:
id - - unique identifier of XML structure in the database.
Throws:
XMLException

common-util

Copyright © 2007 null. All Rights Reserved.