de.esprit.appsuite.database.dbo

## Class EspritDBCreate

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<de.esprit.appsuite.database.dbo.DBCreateContext>
    - - de.esprit.appsuite.database.dbo.EspritDBCreate

- All Implemented Interfaces:
    ApplicationObject<de.esprit.appsuite.database.dbo.DBCreateContext>, SimpleLogSupport, Dumpable, Executable

      public class EspritDBCreate
      extends AbstractApplicationObject<de.esprit.appsuite.database.dbo.DBCreateContext>
      implements Executable

  This class demonstrates how a whole database can be reconstructed using DBObjects. As Each DBObject knows it's meta data it can reconstruct the database table that it represents including primary and foreign key relationships.
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EspritDBCreate(Credential credential)`
    `EspritDBCreate(de.esprit.appsuite.database.dbo.DBCreateContext ctx)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addMaster(DBObject master)`
    `protected void` | `createTables()`
    `protected void` | `createView(java.lang.String viewName, java.lang.String viewStatement)`
    `protected void` | `createViews()`
    `protected void` | `dropTables()`
    `protected void` | `dropView(java.lang.String viewName)`
    `protected void` | `dropViews()`
    `void` | `execute()` Contains the code to be executed.
    `protected void` | `executeSql(java.lang.String sql)`
    `protected void` | `fillRecords()`
    `static DBObject[]` | `getAppSuiteTables()`

    - ### Methods inherited from class de.esprit.appsuite.launch.AbstractApplicationObject

      `getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toString`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### EspritDBCreate

          public EspritDBCreate(Credential credential)

    - #### EspritDBCreate

          public EspritDBCreate(de.esprit.appsuite.database.dbo.DBCreateContext ctx)

  - ### Method Detail

    - #### getAppSuiteTables

          public static DBObject[] getAppSuiteTables()

    - #### addMaster

          public static void addMaster(DBObject master)

    - #### execute

          public void execute()
                       throws java.lang.Exception

      Description copied from interface: `Executable`
      Contains the code to be executed. This method is to be called in order to execute the code synchronously. In this case no other execution thread is involved.
      Specified by:
        `execute` in interface `Executable`
      Throws:
        `java.lang.Exception`

    - #### dropViews

          protected void dropViews()
                            throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### createViews

          protected void createViews()
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### createView

          protected final void createView(java.lang.String viewName,
                        java.lang.String viewStatement)
                                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### dropView

          protected final void dropView(java.lang.String viewName)
                                 throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### executeSql

          protected final void executeSql(java.lang.String sql)
                                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### dropTables

          protected void dropTables()

    - #### createTables

          protected void createTables()
                               throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### fillRecords

          protected void fillRecords()
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.