com.ihr.xbrl.dataloader.target

## Class SQLDriver.SQLIdentifier

- java.lang.Object
- - com.ihr.xbrl.dataloader.target.SQLDriver.SQLIdentifier

- Enclosing class:
    SQLDriver

      public static class SQLDriver.SQLIdentifier
      extends java.lang.Object

  This class is the object that contains the identifier and the SQL text with XPath sentences to parameterize the final SQL statement.
  Author:
    Ignacio

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SQLDriver.SQLIdentifier(java.lang.String identifier, java.lang.String plainSql)` Creates a new SQLIdentifier.
    `SQLDriver.SQLIdentifier(net.sf.saxon.s9api.XdmNode identifierNode)` Creates a new SQLIdentifier.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addNamespace(java.lang.String prefix, java.lang.String uri)` Adds the namespace.
    `java.lang.String` | `getIdentifier()` Gets the identifier.
    `void` | `processFact(java.sql.Connection dbConnection, XBRLFact fact, net.sf.saxon.s9api.Processor xpSqProc)` Prepares the SQL statement with content from the fact item and executes the generated SQL statement.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SQLDriver.SQLIdentifier

          public SQLDriver.SQLIdentifier(java.lang.String identifier,
                                 java.lang.String plainSql)

      Creates a new SQLIdentifier.
      Parameters:
        `identifier` - String, the identifier that matches an event name
        `plainSql` - the raw SQL expression with {XPath: expressions embedded

    - #### SQLDriver.SQLIdentifier

          public SQLDriver.SQLIdentifier(net.sf.saxon.s9api.XdmNode identifierNode)

      Creates a new SQLIdentifier.
      Parameters:
        `identifierNode` - XdmNode

  - ### Method Detail

    - #### addNamespace

          public void addNamespace(java.lang.String prefix,
                          java.lang.String uri)

      Adds the namespace.
      Parameters:
        `prefix` - the prefix
        `uri` - the uri

    - #### getIdentifier

          public java.lang.String getIdentifier()

      Gets the identifier.
      Returns:
        the identifier string

    - #### processFact

          public void processFact(java.sql.Connection dbConnection,
                         XBRLFact fact,
                         net.sf.saxon.s9api.Processor xpSqProc)
                           throws java.sql.SQLException,
                                  FactHandlerException

      Prepares the SQL statement with content from the fact item and executes the generated SQL statement.
      Parameters:
        `dbConnection` - the db connection
        `fact` - the fact
        `xpSqProc` - the xp sq proc
      Throws:
        `java.sql.SQLException` - the SQL exception
        `FactHandlerException` - the fact handler exception