com.ihr.xbrl.store

## Class StoreXBRLThread

- java.lang.Object
- - com.ihr.xbrl.store.StoreXBRLThread

- All Implemented Interfaces:
    java.lang.Runnable

      public class StoreXBRLThread
      extends java.lang.Object
      implements java.lang.Runnable

  The Class StoreXBRLThread.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StoreXBRLThread()` This constructor exist only in order to allow other classes to register the DatabaseURI Resolver before any thead for storing information is futher created.
    `StoreXBRLThread(java.lang.String instanceUriOnDatabase, java.net.URI[] dtsURIs, java.lang.String dtsName, DbUtil dbUtil, HasStoreUserQuestions appFrame, HasEnableDisableOpenMenus app, HasLoadingBar appLoadingBar, HasLogPanel appLogPanel, HasErrorsHandler errorHandler, boolean bForUpdate)` Store documents in the XBRL Database in a separate thread During the thread execution the process uses call back functions in other objects in order to inform the main application about progress and errors This version of the constructor reads a DTS from a set of URIs.
    `StoreXBRLThread(java.lang.String instanceUriOnDatabase, XBRLDocument[] documents, org.hibernate.Session session, HasEnableDisableOpenMenus app, HasLoadingBar appLoadingBar, HasLogPanel appLogPanel, DbUtil dbUtil, boolean bForUpdate)` Store documents in the XBRL Database in a separate thread During the thread execution the process uses call back functions in other objects in order to inform the main application about progress and errors This version of the constructor uses the documents already read by the parent application.
    `StoreXBRLThread(java.net.URI[] dtsURIs, java.lang.String dtsName, DbUtil dbUtil, HasStoreUserQuestions appFrame, HasEnableDisableOpenMenus app, HasLoadingBar appLoadingBar, HasLogPanel appLogPanel, HasErrorsHandler errorHandler, boolean bForUpdate)` Store documents in the XBRL Database in a separate thread During the thread execution the process uses call back functions in other objects in order to inform the main application about progress and errors This version of the constructor reads a DTS from a set of URIs.
    `StoreXBRLThread(XBRLDocument[] documents, org.hibernate.Session session, HasEnableDisableOpenMenus app, HasLoadingBar appLoadingBar, HasLogPanel appLogPanel, DbUtil dbUtil, boolean bForUpdate)` Store documents in the XBRL Database in a separate thread During the thread execution the process uses call back functions in other objects in order to inform the main application about progress and errors This version of the constructor uses the documents already read by the parent application.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPojoExtensionListeners(PojoExtension<?,?>[] listenersArray)`
    `void` | `addStorageEventListener(StorageEventListener evt)` Adds the storage event listener.
    `void` | `addStorageEventListeners(StorageEventListener[] listenersArray)`
    `org.hibernate.Session` | `getSession()` Access to the same session used to store the instance.
    `void` | `removeStorageEventListener(StorageEventListener evt)` Removes the storage event listener.
    `void` | `run()`

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

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

- - ### Constructor Detail

    - #### StoreXBRLThread

          public StoreXBRLThread(java.net.URI[] dtsURIs,
                         java.lang.String dtsName,
                         DbUtil dbUtil,
                         HasStoreUserQuestions appFrame,
                         HasEnableDisableOpenMenus app,
                         HasLoadingBar appLoadingBar,
                         HasLogPanel appLogPanel,
                         HasErrorsHandler errorHandler,
                         boolean bForUpdate)

      Store documents in the XBRL Database in a separate thread

      During the thread execution the process uses call back functions in other objects in order to inform the main application about progress and errors

      This version of the constructor reads a DTS from a set of URIs. The URIs represents files that may exist on the taxonomy catalog or physically in the hard drive.

      If the DTS has been loaded using the XBRL Database as a URI resolver then it is possible using the other constructor that is faster as the DTS do not need to be read again.

      Parameters:
        `dtsURIs` - the dts ur is
        `dtsName` - the dts name
        `dbUtil` - the db util
        `appFrame` - the app frame
        `app` - the app
        `appLoadingBar` - the app loading bar
        `appLogPanel` - the app log panel
        `errorHandler` - the error handler
        `bForUpdate` - the b for update

    - #### StoreXBRLThread

          public StoreXBRLThread(java.lang.String instanceUriOnDatabase,
                         java.net.URI[] dtsURIs,
                         java.lang.String dtsName,
                         DbUtil dbUtil,
                         HasStoreUserQuestions appFrame,
                         HasEnableDisableOpenMenus app,
                         HasLoadingBar appLoadingBar,
                         HasLogPanel appLogPanel,
                         HasErrorsHandler errorHandler,
                         boolean bForUpdate)

      Store documents in the XBRL Database in a separate thread

      During the thread execution the process uses call back functions in other objects in order to inform the main application about progress and errors

      This version of the constructor reads a DTS from a set of URIs. The URIs represents files that may exist on the taxonomy catalog or physically in the hard drive.

      If the DTS has been loaded using the XBRL Database as a URI resolver then it is possible using the other constructor that is faster as the DTS do not need to be read again.

      Parameters:
        `instanceUriOnDatabase` - the instance uri on database
        `dtsURIs` - the dts ur is
        `dtsName` - the dts name
        `dbUtil` - the db util
        `appFrame` - the app frame
        `app` - the app
        `appLoadingBar` - the app loading bar
        `appLogPanel` - the app log panel
        `errorHandler` - the error handler
        `bForUpdate` - the b for update

    - #### StoreXBRLThread

          public StoreXBRLThread(java.lang.String instanceUriOnDatabase,
                         XBRLDocument[] documents,
                         org.hibernate.Session session,
                         HasEnableDisableOpenMenus app,
                         HasLoadingBar appLoadingBar,
                         HasLogPanel appLogPanel,
                         DbUtil dbUtil,
                         boolean bForUpdate)

      Store documents in the XBRL Database in a separate thread

      During the thread execution the process uses call back functions in other objects in order to inform the main application about progress and errors

      This version of the constructor uses the documents already read by the parent application.

      Parameters:
        `instanceUriOnDatabase` - the instance uri on database
        `documents` - the documents
        `session` - the session
        `app` - the app
        `appLoadingBar` - the app loading bar
        `appLogPanel` - the app log panel
        `dbUtil` - the db util
        `bForUpdate` - the b for update

    - #### StoreXBRLThread

          public StoreXBRLThread(XBRLDocument[] documents,
                         org.hibernate.Session session,
                         HasEnableDisableOpenMenus app,
                         HasLoadingBar appLoadingBar,
                         HasLogPanel appLogPanel,
                         DbUtil dbUtil,
                         boolean bForUpdate)

      Store documents in the XBRL Database in a separate thread

      During the thread execution the process uses call back functions in other objects in order to inform the main application about progress and errors

      This version of the constructor uses the documents already read by the parent application.

      Parameters:
        `documents` - the documents
        `session` - the session
        `app` - the app
        `appLoadingBar` - the app loading bar
        `appLogPanel` - the app log panel
        `dbUtil` - the db util
        `bForUpdate` - the b for update

    - #### StoreXBRLThread

          public StoreXBRLThread()

      This constructor exist only in order to allow other classes to register the DatabaseURI Resolver before any thead for storing information is futher created.

      The process is as follows:

      - Fisrt you create an object using this void constructor.
      - Then create an empty DTSContainer
      - Then call the installURIResolver method on this object using the new DTS as first parameter and a DbUtil connection object as a second parameter.
      - The returned object is a Session that needs to be used later during the storage phase in order to properly call the constructor

  - ### Method Detail

    - #### addStorageEventListener

          public void addStorageEventListener(StorageEventListener evt)

      Adds the storage event listener.
      Parameters:
        `evt` - the evt

    - #### removeStorageEventListener

          public void removeStorageEventListener(StorageEventListener evt)

      Removes the storage event listener.
      Parameters:
        `evt` - the evt

    - #### run

          public void run()

      Specified by:
        `run` in interface `java.lang.Runnable`

    - #### getSession

          public org.hibernate.Session getSession()

      Access to the same session used to store the instance.
      Returns:
        the session

    - #### addStorageEventListeners

          public void addStorageEventListeners(StorageEventListener[] listenersArray)

      Parameters:
        `listenersArray` - array of listeners to add

    - #### addPojoExtensionListeners

          public void addPojoExtensionListeners(PojoExtension<?,?>[] listenersArray)

      Parameters:
        `listenersArray` - array of instances of classes implementing the PojoExtension interface