de.esprit.appsuite.database.dbase

## Class DBOTypeMapCredential

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.common.util.TransferableObject
    - - de.esprit.appsuite.database.dbase.Credential
      - - de.esprit.appsuite.database.dbase.AbstractDBOCredential
        - - de.esprit.appsuite.database.dbase.DBOTypeMapCredential

- All Implemented Interfaces:
    DBTypeMapper, Clearable, DeepCloneable, Dumpable, java.io.Serializable, java.lang.Cloneable
  Direct Known Subclasses:
    EspritDBCredential

      public class DBOTypeMapCredential
      extends AbstractDBOCredential
      implements DBTypeMapper

  This class extends a credential such that it also contains the OR-type-mapping
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class de.esprit.appsuite.database.dbase.Credential

      `connUrl, connUrlKey, credentialDocType, dbPassword, dbPasswordKey, dbSchema, dbSchemaKey, dbUser, dbUserKey, DEFAULT_DATABASE_PATH, DERBY_SYSTEM_HOME, jdbcDriver, jdbcDriverKey, loginTimeout, loginTimeoutKey, maxConns, maxConnsKey, minConns, minConnsKey, systemPropsType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DBOTypeMapCredential()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addFakedForeignKey(DBColumnKey column, DBColumnKey referencingColumn)`
    `void` | `addFakedPrimaryKey(DBColumnKey column)`
    `void` | `addTableExcludePattern(java.lang.String pattern)`
    `void` | `clear()` Clears the content
    `int` | `getConstraintDefCount()`
    `int` | `getExcludeDefCount()`
    `java.lang.String` | `getFakedForeignKey(java.lang.String tableColumn)` Returns the faked foreign key reference of the given tableColumn, if one is defined.
    `java.lang.Class` | `getJavaType(java.lang.String tableColumn, java.lang.Class defaultJavaType)` Returns java-type constants for values read from the underlying type definition.
    `java.lang.Class` | `getJavaTypeByConvention(java.lang.String tableColumn, java.lang.Class defaultJavaType, int jdbcType)`
    `int` | `getTypeDefCount()`
    `java.lang.Class` | `getTypeForColumn(java.lang.String tableColumn)`
    `boolean` | `hasConstraintDefs()`
    `boolean` | `hasExcludeDefs()`
    `boolean` | `hasTypeDefs()`
    `boolean` | `isEmpty()`
    `boolean` | `isFakedPrimaryKey(java.lang.String tableColumn)` Returns true if the given tableColumn is declared as a faked primary key (if the value is 'pk').
    `boolean` | `matchesForExclusion(java.lang.String tableName)` Tells whether this tableName matches any defined exclusion pattern and thus no DBObject should be compiled for it.
    `void` | `put(DBColumnKey column, java.lang.Class javaType)` Java types added here must implement PersistentId or PersistentName
    `void` | `put(DBColumnKey column, JavaColumnType javaType)` Java types added here are columns of existing DBObjects
    `void` | `put(java.lang.String tableColumn, java.lang.Class javaType)`
    `DumpString` | `toDumpString(DumpString s)` This method allows subclasses to add values to the existing DumpString of the superclass.
    `ToString` | `toString(ToString s)` This method allows subclasses to add values to the existing ToString of the superclass.

    - ### Methods inherited from class de.esprit.appsuite.database.dbase.AbstractDBOCredential

      `getAppKey, getAuthor, getPackageDir, getTargetDir, getTargetPackage, isRebuildExistingDBOs, setAuthor, setRebuildExistingDBOs, setTargetDir, setTargetPackage, setTranslationAppKey, setUseTypeConventions, setValues, useTypeConventions, validate`

    - ### Methods inherited from class de.esprit.appsuite.database.dbase.Credential

      `getConnectionUrl, getCredFile, getDatabaseName, getDefaultSystemProperties, getDefaultSystemProperty, getJdbcDriver, getLoginTimeout, getMaxConns, getMinConns, getPassword, getSchema, getUser, initDefaultSystemProperties, isValid, putDefaultSystemProperty, read, readCommandLineParams, setConnectionUrl, setCredFile, setJdbcDriver, setLoginTimeout, setMaxConns, setMinConns, setPassword, setSchema, setUser, write`

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

      `clone, deepClone`

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

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

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

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

    - ### Methods inherited from interface de.esprit.appsuite.database.dbase.meta.DBTypeMapper

      `useTypeConventions`

    - ### Methods inherited from interface de.esprit.common.type.Dumpable

      `toDumpString, toString`

- - ### Constructor Detail

    - #### DBOTypeMapCredential

          public DBOTypeMapCredential()

  - ### Method Detail

    - #### clear

          public final void clear()

      Description copied from interface: `Clearable`
      Clears the content
      Specified by:
        `clear` in interface `Clearable`
      Overrides:
        `clear` in class `Credential`

    - #### getTypeForColumn

          public final java.lang.Class getTypeForColumn(java.lang.String tableColumn)

    - #### put

          public final void put(DBColumnKey column,
                 JavaColumnType javaType)

      Java types added here are columns of existing DBObjects

    - #### put

          public final void put(DBColumnKey column,
                 java.lang.Class javaType)

      Java types added here must implement PersistentId or PersistentName

    - #### put

          public final void put(java.lang.String tableColumn,
                 java.lang.Class javaType)

    - #### addTableExcludePattern

          public final void addTableExcludePattern(java.lang.String pattern)

    - #### addFakedPrimaryKey

          public final void addFakedPrimaryKey(DBColumnKey column)

    - #### addFakedForeignKey

          public final void addFakedForeignKey(DBColumnKey column,
                                DBColumnKey referencingColumn)

    - #### isFakedPrimaryKey

          public final boolean isFakedPrimaryKey(java.lang.String tableColumn)

      Returns true if the given tableColumn is declared as a faked primary key (if the value is 'pk').
      Specified by:
        `isFakedPrimaryKey` in interface `DBTypeMapper`

    - #### getFakedForeignKey

          public final java.lang.String getFakedForeignKey(java.lang.String tableColumn)

      Returns the faked foreign key reference of the given tableColumn, if one is defined. The faked foreign key reference entry must be of the form: 'fk:table.column'.
      Specified by:
        `getFakedForeignKey` in interface `DBTypeMapper`
      Returns:
        null if no foreign key definition was found.

    - #### hasConstraintDefs

          public final boolean hasConstraintDefs()

      Specified by:
        `hasConstraintDefs` in interface `DBTypeMapper`

    - #### getConstraintDefCount

          public final int getConstraintDefCount()

      Specified by:
        `getConstraintDefCount` in interface `DBTypeMapper`

    - #### isEmpty

          public final boolean isEmpty()

      Specified by:
        `isEmpty` in interface `DBTypeMapper`

    - #### hasTypeDefs

          public final boolean hasTypeDefs()

      Specified by:
        `hasTypeDefs` in interface `DBTypeMapper`

    - #### getTypeDefCount

          public final int getTypeDefCount()

      Specified by:
        `getTypeDefCount` in interface `DBTypeMapper`

    - #### hasExcludeDefs

          public final boolean hasExcludeDefs()

      Specified by:
        `hasExcludeDefs` in interface `DBTypeMapper`

    - #### getExcludeDefCount

          public final int getExcludeDefCount()

      Specified by:
        `getExcludeDefCount` in interface `DBTypeMapper`

    - #### getJavaType

          public java.lang.Class getJavaType(java.lang.String tableColumn,
                                    java.lang.Class defaultJavaType)

      Returns java-type constants for values read from the underlying type definition.
      Specified by:
        `getJavaType` in interface `DBTypeMapper`

    - #### getJavaTypeByConvention

          public java.lang.Class getJavaTypeByConvention(java.lang.String tableColumn,
                                                java.lang.Class defaultJavaType,
                                                int jdbcType)

      Specified by:
        `getJavaTypeByConvention` in interface `DBTypeMapper`

    - #### matchesForExclusion

          public boolean matchesForExclusion(java.lang.String tableName)

      Tells whether this tableName matches any defined exclusion pattern and thus no DBObject should be compiled for it.
      Specified by:
        `matchesForExclusion` in interface `DBTypeMapper`

    - #### toString

          public ToString toString(ToString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing ToString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toString` in interface `Dumpable`
      Overrides:
        `toString` in class `Credential`

    - #### toDumpString

          public DumpString toDumpString(DumpString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing DumpString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toDumpString` in interface `Dumpable`
      Overrides:
        `toDumpString` in class `AbstractDBOCredential`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.