Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.knowgate.datacopy
Class DataStruct

    java.lang.Object
      org.xml.sax.helpers.DefaultHandler
          com.knowgate.datacopy.DataStruct

All Implemented Interfaces:
  org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

Direct Known Subclasses:
  DataStructOrcl, FullTableCopy

    public class DataStruct

extends org.xml.sax.helpers.DefaultHandler
implements org.xml.sax.ContentHandler

Copier for Complex Data Structures stored at database.

This is not a general purpose module, but a custom class tailored to the design constraints of hipergate standard datamodel.

Field Summary
`protected java.util.Vector` | `After`
`protected java.util.Vector` | `Before`
`protected int` | `cTables`
`protected java.util.Vector` | `DataRowSets`
`protected static boolean` | `DEFAULT_DYNAMIC_VALIDATION`
`protected static boolean` | `DEFAULT_MEMORY_USAGE`
`protected static boolean` | `DEFAULT_NAMESPACE_PREFIXES`
`protected static boolean` | `DEFAULT_NAMESPACES`
`protected static java.lang.String` | `DEFAULT_PARSER_NAME`
`protected static int` | `DEFAULT_REPETITION`
`protected static boolean` | `DEFAULT_SCHEMA_FULL_CHECKING`
`protected static boolean` | `DEFAULT_SCHEMA_VALIDATION`
`protected static boolean` | `DEFAULT_TAGGINESS`
`protected static boolean` | `DEFAULT_VALIDATION`
`protected java.sql.PreparedStatement[]` | `DlStatements`
`protected static java.lang.String` | `DYNAMIC_VALIDATION_FEATURE_ID`
`protected java.util.Vector` | `FieldDefs`
`protected java.util.Vector` | `FieldMaps`
`protected int` | `iCols`
`protected java.util.LinkedList` | `InitStmts`
`protected int` | `iRows`
`protected static java.lang.String` | `NAMESPACE_PREFIXES_FEATURE_ID`
`protected static java.lang.String` | `NAMESPACES_FEATURE_ID`
`protected java.util.HashMap` | `oFromPKs`
`java.util.HashMap` | `oInsertTexts`
`protected java.util.Vector` | `oResults`
`protected DataTblDef[]` | `OrMetaData`
`protected java.sql.PreparedStatement[]` | `OrStatements`
`java.util.HashMap` | `oSelectTexts`
`protected java.util.HashMap` | `oToPKs`
`protected static java.lang.String` | `SCHEMA_FULL_CHECKING_FEATURE_ID`
`protected static java.lang.String` | `SCHEMA_VALIDATION_FEATURE_ID`
`protected java.util.LinkedList` | `TermStmts`
`protected java.util.Vector` | `Transformations`
`protected DataTblDef[]` | `TrMetaData`
`protected java.sql.PreparedStatement[]` | `TrStatements`
`protected java.sql.PreparedStatement[]` | `UpStatements`
`protected static java.lang.String` | `VALIDATION_FEATURE_ID`

Constructor Summary
`DataStruct()`
`DataStruct(java.lang.String sPathXMLFile)`
`DataStruct(java.lang.String sPathXMLFile, java.util.Properties oProps)`

Method Summary
`void` | `characters(char[] ch, int start, int length)` Characters.
`void` | `clear()`
`void` | `commit()`
`protected java.lang.String` | `composeError(java.lang.String type, org.xml.sax.SAXParseException ex)` Compose the error message.
`void` | `connectOrigin(java.lang.String sDriver, java.lang.String sURL, java.lang.String sUsr, java.lang.String sPwd, java.lang.String sSchema)`
`void` | `connectTarget(java.lang.String sDriver, java.lang.String sURL, java.lang.String sUsr, java.lang.String sPwd, java.lang.String sSchema)`
`java.lang.Object` | `convert(java.lang.Object oValue, int iSQLType)`
`void` | `createClassSource(java.lang.String sPackage, java.lang.String sSubClassName, java.lang.String sFile)`
`void` | `disconnectAll()`
`void` | `endElement(java.lang.String uri, java.lang.String localName, java.lang.String qname)`
`void` | `error(org.xml.sax.SAXParseException ex)` Error.
`protected void` | `execCommands(java.lang.String sTime, int iTable, java.lang.Object[] PK, int cParams)`
`void` | `fatalError(org.xml.sax.SAXParseException ex)` Fatal error.
`java.sql.Connection` | `getOriginConnection()`
`protected java.lang.Object` | `getResult(int iRow, int iCol)`
`protected void` | `getRows(java.lang.Object[] OrPK, java.lang.Object[] TrPK, int cParams, int iTable)`
`protected DataRowSet` | `getRowSet(int i)`
`java.sql.Connection` | `getTargetConnection()`
`void` | `insert(java.lang.Object[] OrPK, java.lang.Object[] TrPK, int cParams)`
`int` | `mapType(int iSQLType)`
`void` | `parse(java.lang.String sXMLFile)`
`void` | `parse(java.lang.String sXMLFile, java.util.Properties oProps)`
`void` | `prepareStatements()`
`void` | `rollback()`
`protected int` | `seekReferal(DataTransformation oTransform)`
`void` | `setAutoCommit(boolean bAutoCommit)`
`void` | `setOriginConnection(java.sql.Connection oConn)`
`void` | `setTargetConnection(java.sql.Connection oConn)`
`void` | `startDocument()` Start document.
`void` | `startElement(java.lang.String uri, java.lang.String local, java.lang.String raw, org.xml.sax.Attributes attrs)`
`void` | `update(java.lang.Object[] OrPK, java.lang.Object[] TrPK, int cParams)`
`void` | `warning(org.xml.sax.SAXParseException ex)` Warning.

Methods inherited from class org.xml.sax.helpers.DefaultHandler
`endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.xml.sax.ContentHandler
`endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping`

Field Detail

### oResults

    protected java.util.Vector oResults

### iCols

    protected int iCols

### iRows

    protected int iRows

### cTables

    protected int cTables

### FieldMaps

    protected java.util.Vector FieldMaps

### FieldDefs

    protected java.util.Vector FieldDefs

### DataRowSets

    protected java.util.Vector DataRowSets

### Before

    protected java.util.Vector Before

### After

    protected java.util.Vector After

### InitStmts

    protected java.util.LinkedList InitStmts

### TermStmts

    protected java.util.LinkedList TermStmts

### Transformations

    protected java.util.Vector Transformations

### oFromPKs

    protected java.util.HashMap oFromPKs

### oToPKs

    protected java.util.HashMap oToPKs

### OrStatements

    protected java.sql.PreparedStatement[] OrStatements

### TrStatements

    protected java.sql.PreparedStatement[] TrStatements

### UpStatements

    protected java.sql.PreparedStatement[] UpStatements

### DlStatements

    protected java.sql.PreparedStatement[] DlStatements

### OrMetaData

    protected DataTblDef[] OrMetaData

### TrMetaData

    protected DataTblDef[] TrMetaData

### oInsertTexts

    public java.util.HashMap oInsertTexts

### oSelectTexts

    public java.util.HashMap oSelectTexts

### NAMESPACES_FEATURE_ID

    protected static final java.lang.String NAMESPACES_FEATURE_ID

See Also:
  Constant Field Values

### NAMESPACE_PREFIXES_FEATURE_ID

    protected static final java.lang.String NAMESPACE_PREFIXES_FEATURE_ID

See Also:
  Constant Field Values

### VALIDATION_FEATURE_ID

    protected static final java.lang.String VALIDATION_FEATURE_ID

See Also:
  Constant Field Values

### SCHEMA_VALIDATION_FEATURE_ID

    protected static final java.lang.String SCHEMA_VALIDATION_FEATURE_ID

See Also:
  Constant Field Values

### SCHEMA_FULL_CHECKING_FEATURE_ID

    protected static final java.lang.String SCHEMA_FULL_CHECKING_FEATURE_ID

See Also:
  Constant Field Values

### DYNAMIC_VALIDATION_FEATURE_ID

    protected static final java.lang.String DYNAMIC_VALIDATION_FEATURE_ID

See Also:
  Constant Field Values

### DEFAULT_PARSER_NAME

    protected static final java.lang.String DEFAULT_PARSER_NAME

See Also:
  Constant Field Values

### DEFAULT_REPETITION

    protected static final int DEFAULT_REPETITION

See Also:
  Constant Field Values

### DEFAULT_NAMESPACES

    protected static final boolean DEFAULT_NAMESPACES

See Also:
  Constant Field Values

### DEFAULT_NAMESPACE_PREFIXES

    protected static final boolean DEFAULT_NAMESPACE_PREFIXES

See Also:
  Constant Field Values

### DEFAULT_VALIDATION

    protected static final boolean DEFAULT_VALIDATION

See Also:
  Constant Field Values

### DEFAULT_SCHEMA_VALIDATION

    protected static final boolean DEFAULT_SCHEMA_VALIDATION

See Also:
  Constant Field Values

### DEFAULT_SCHEMA_FULL_CHECKING

    protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING

See Also:
  Constant Field Values

### DEFAULT_DYNAMIC_VALIDATION

    protected static final boolean DEFAULT_DYNAMIC_VALIDATION

See Also:
  Constant Field Values

### DEFAULT_MEMORY_USAGE

    protected static final boolean DEFAULT_MEMORY_USAGE

See Also:
  Constant Field Values

### DEFAULT_TAGGINESS

    protected static final boolean DEFAULT_TAGGINESS

See Also:
  Constant Field Values

Constructor Detail

### DataStruct

    public DataStruct()

### DataStruct

    public DataStruct(java.lang.String sPathXMLFile)
               throws java.lang.ClassNotFoundException,
                      java.lang.IllegalAccessException,
                      java.lang.InstantiationException,
                      java.io.IOException,
                      org.xml.sax.SAXException

Throws:
  `java.lang.ClassNotFoundException`
  `java.lang.IllegalAccessException`
  `java.lang.InstantiationException`
  `java.io.IOException`
  `org.xml.sax.SAXException`

### DataStruct

    public DataStruct(java.lang.String sPathXMLFile,
                      java.util.Properties oProps)
               throws java.lang.ClassNotFoundException,
                      java.lang.IllegalAccessException,
                      java.lang.InstantiationException,
                      java.io.IOException,
                      org.xml.sax.SAXException

Throws:
  `java.lang.ClassNotFoundException`
  `java.lang.IllegalAccessException`
  `java.lang.InstantiationException`
  `java.io.IOException`
  `org.xml.sax.SAXException`

Method Detail

### setAutoCommit

    public void setAutoCommit(boolean bAutoCommit)
                       throws java.sql.SQLException

  Throws:
    `java.sql.SQLException`

### commit

    public void commit()
                throws java.sql.SQLException

  Throws:
    `java.sql.SQLException`

### rollback

    public void rollback()
                  throws java.sql.SQLException

  Throws:
    `java.sql.SQLException`

### connectOrigin

    public void connectOrigin(java.lang.String sDriver,
                              java.lang.String sURL,
                              java.lang.String sUsr,
                              java.lang.String sPwd,
                              java.lang.String sSchema)
                       throws java.sql.SQLException,
                              java.lang.ClassNotFoundException

  Throws:
    `java.sql.SQLException`
    `java.lang.ClassNotFoundException`

### connectTarget

    public void connectTarget(java.lang.String sDriver,
                              java.lang.String sURL,
                              java.lang.String sUsr,
                              java.lang.String sPwd,
                              java.lang.String sSchema)
                       throws java.sql.SQLException,
                              java.lang.ClassNotFoundException

  Throws:
    `java.sql.SQLException`
    `java.lang.ClassNotFoundException`

### getOriginConnection

    public java.sql.Connection getOriginConnection()

### getTargetConnection

    public java.sql.Connection getTargetConnection()

### setOriginConnection

    public void setOriginConnection(java.sql.Connection oConn)

### setTargetConnection

    public void setTargetConnection(java.sql.Connection oConn)

### clear

    public void clear()
               throws java.sql.SQLException

  Throws:
    `java.sql.SQLException`

### disconnectAll

    public void disconnectAll()
                       throws java.sql.SQLException

  Throws:
    `java.sql.SQLException`

### getRowSet

    protected DataRowSet getRowSet(int i)

### getResult

    protected java.lang.Object getResult(int iRow,
                                         int iCol)

### execCommands

    protected void execCommands(java.lang.String sTime,
                                int iTable,
                                java.lang.Object[] PK,
                                int cParams)
                         throws java.sql.SQLException,
                                java.lang.NullPointerException

  Throws:
    `java.sql.SQLException`
    `java.lang.NullPointerException`

### prepareStatements

    public void prepareStatements()
                           throws java.sql.SQLException

  Throws:
    `java.sql.SQLException`

### convert

    public java.lang.Object convert(java.lang.Object oValue,
                                    int iSQLType)

### mapType

    public int mapType(int iSQLType)

### getRows

    protected void getRows(java.lang.Object[] OrPK,
                           java.lang.Object[] TrPK,
                           int cParams,
                           int iTable)
                    throws java.sql.SQLException

  Throws:
    `java.sql.SQLException`

### insert

    public void insert(java.lang.Object[] OrPK,
                       java.lang.Object[] TrPK,
                       int cParams)
                throws java.sql.SQLException,
                       java.lang.NullPointerException

  Throws:
    `java.sql.SQLException`
    `java.lang.NullPointerException`

### update

    public void update(java.lang.Object[] OrPK,
                       java.lang.Object[] TrPK,
                       int cParams)
                throws java.sql.SQLException

  Throws:
    `java.sql.SQLException`

### seekReferal

    protected int seekReferal(DataTransformation oTransform)

### startDocument

    public void startDocument()
                       throws org.xml.sax.SAXException

  Start document.

  Specified by:
    `startDocument` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `startDocument` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### startElement

    public void startElement(java.lang.String uri,
                             java.lang.String local,
                             java.lang.String raw,
                             org.xml.sax.Attributes attrs)
                      throws org.xml.sax.SAXException

  Specified by:
    `startElement` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `startElement` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### endElement

    public void endElement(java.lang.String uri,
                           java.lang.String localName,
                           java.lang.String qname)
                    throws org.xml.sax.SAXException

  Specified by:
    `endElement` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `endElement` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### characters

    public void characters(char[] ch,
                           int start,
                           int length)
                    throws org.xml.sax.SAXException

  Characters.

  Specified by:
    `characters` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `characters` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### warning

    public void warning(org.xml.sax.SAXParseException ex)
                 throws org.xml.sax.SAXException

  Warning.

  Specified by:
    `warning` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `warning` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### error

    public void error(org.xml.sax.SAXParseException ex)
               throws org.xml.sax.SAXException

  Error.

  Specified by:
    `error` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `error` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### fatalError

    public void fatalError(org.xml.sax.SAXParseException ex)
                    throws org.xml.sax.SAXException

  Fatal error.

  Specified by:
    `fatalError` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `fatalError` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### composeError

    protected java.lang.String composeError(java.lang.String type,
                                            org.xml.sax.SAXParseException ex)

  Compose the error message.

### parse

    public void parse(java.lang.String sXMLFile)
               throws java.lang.InstantiationException,
                      java.lang.IllegalAccessException,
                      java.lang.ClassNotFoundException,
                      java.io.IOException,
                      org.xml.sax.SAXException

  Throws:
    `java.lang.InstantiationException`
    `java.lang.IllegalAccessException`
    `java.lang.ClassNotFoundException`
    `java.io.IOException`
    `org.xml.sax.SAXException`

### parse

    public void parse(java.lang.String sXMLFile,
                      java.util.Properties oProps)
               throws java.lang.InstantiationException,
                      java.lang.IllegalAccessException,
                      java.lang.ClassNotFoundException,
                      java.io.IOException,
                      org.xml.sax.SAXException

  Throws:
    `java.lang.InstantiationException`
    `java.lang.IllegalAccessException`
    `java.lang.ClassNotFoundException`
    `java.io.IOException`
    `org.xml.sax.SAXException`

### createClassSource

    public void createClassSource(java.lang.String sPackage,
                                  java.lang.String sSubClassName,
                                  java.lang.String sFile)
                           throws java.io.IOException

  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD