Package com.pixelmed.database

## Class DatabaseInformationModel

- java.lang.Object
- - com.pixelmed.database.DatabaseInformationModel

- Direct Known Subclasses:
    `DicomDatabaseInformationModel`

      public abstract class DatabaseInformationModel
      extends java.lang.Object

  The `DatabaseInformationModel` class is an abstract class that contains the core functionality for storing, accessing and maintaining a persistent representation of selected attributes of composite objects.

  It hides an underlying SQL database implementation that stores the attributes of each entity in the information model in tables.

  Abstract sub-classes, such as `DicomDatabaseInformationModel`, may refine the type of information model supported, since this base class is fairly generic and not dependent on any particular DICOM information model. Concrete sub-classes define particular models by overriding the methods that define the root entities and the relationship between entities, as well as the unique keys for each particular entity.

  In addition, the concrete sub-classes define which attributes of each entity will be included in the persistent representation (the database tables), usually by means of a specialized sub-class of `DicomDictionary` which contains the sub-set of relevant attributes and may change their mapping to information entities, such as `DicomDictionaryForPatientStudySeriesConcatenationInstanceModel`.

  For example, an application might instantiate a `PatientStudySeriesConcatenationInstanceModel` or a `StudySeriesInstanceModel`, as follows:

              final DatabaseInformationModel d = new PatientStudySeriesConcatenationInstanceModel("test");

  Composite objects previously read into a `AttributeList` from a DICOM file in a persistent location could be inserted into the persistent representation (the database) as follows, indicating in this case that the file was copied (and may later be deleted) rather than referenced:

              d.insertObject(list,fileName,DatabaseInformationModel.FILE_COPIED);

  External (unsecure) SQL access to the database is possible if a databaseServerName argument is supplied in the constructor, in which case a tool like `org.hsqldb.util.DatabaseManagerSwing` (described in detail at Hsqldb User Guide: Appendix F. Database Manager) can be used to query or manage the database. For example:

      % java -cp lib/additional/hsqldb.jar org.hsqldb.util.DatabaseManagerSwing --url "jdbc:hsqldb:hsql://hostname/databaseServerName"

  where "hostname" is the name of the host (perhaps "localhost"), and "databaseServerName" is the name supplied in the constructor.

  Note that the default username ("sa") and password (empty) are not secure.

  See Also:
    `com.pixelmed.database`

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected java.util.HashMap` | `additionalIndexMapOfColumnsToTables` |
    `protected java.sql.Connection` | `databaseConnection` |
    `protected java.lang.String` | `databaseRootName` |
    `protected static java.lang.String` | `defaultDatabaseRootName` |
    `protected DicomDictionary` | `dictionary` |
    `protected org.hsqldb.Server` | `externalServerInstance` |
    `static java.lang.String` | `FILE_COPIED` |
    `static java.lang.String` | `FILE_REFERENCED` |
    `protected java.util.HashMap` | `listsOfAttributesByInformationEntity` |
    `protected static java.lang.String` | `localFileName` |
    `protected static java.lang.String` | `localFileReferenceTypeColumnName` |
    `protected static java.lang.String` | `localParentReferenceColumnName` |
    `protected static java.lang.String` | `localPrimaryKeyColumnName` |
    `protected static java.lang.String` | `localRecordInsertionTimeColumnName` |
    `protected static java.lang.String` | `personNameCanonicalColumnNamePrefix` |
    `protected static java.lang.String` | `personNameCanonicalColumnNameSuffix` |
    `protected static java.lang.String` | `personNamePhoneticCanonicalColumnNamePrefix` |
    `protected static java.lang.String` | `personNamePhoneticCanonicalColumnNameSuffix` |
    `protected InformationEntity` | `rootInformationEntity` |
    `protected static java.lang.String` | `userColumnName1` |
    `protected static java.lang.String` | `userColumnName2` |
    `protected static java.lang.String` | `userColumnName3` |
    `protected static java.lang.String` | `userColumnName4` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DatabaseInformationModel​(java.lang.String databaseFileName, InformationEntity rootInformationEntity, DicomDictionary dictionary)` | Instantiate a persistent information model using the named database.
    `DatabaseInformationModel​(java.lang.String databaseFileName, InformationEntity rootInformationEntity, DicomDictionary dictionary, java.lang.String databaseRootName)` | Instantiate a persistent information model using the named database.
    `DatabaseInformationModel​(java.lang.String databaseFileName, java.lang.String databaseServerName, InformationEntity rootInformationEntity, DicomDictionary dictionary)` | Instantiate a persistent information model using the named database allowing external SQL access.
    `DatabaseInformationModel​(java.lang.String databaseFileName, java.lang.String databaseServerName, InformationEntity rootInformationEntity, DicomDictionary dictionary, java.lang.String databaseRootName)` | Instantiate a persistent information model using the named database allowing external SQL access.

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected static void` | `appendExactOrIsNullMatch​(java.lang.StringBuffer b, java.lang.String value)` | Append a check for a match against a string value, accounting for the need to use the "IS NULL" rather than "=" expression when wanting to explciitly have NULL match NULL rather to never match.
    `void` | `close()` | Close the underlying connection to the database and shutdown any external SQL server.
    `protected void` | `createAdditionalIndexes()` | Create any additional indexes to optimize queries, for example for UIDs.
    `protected abstract java.lang.String` | `createPrimaryKeyForSelectedInformationEntity​(InformationEntity ie)` | Create a new unique key which may be used to identify a new instance of an entity.
    `void` | `deleteRecord​(InformationEntity ie, java.lang.String localPrimaryKeyValue)` | Delete a database record (a particular instance of an information entity).
    `void` | `deleteSelectedRecord​(InformationEntity ie, java.lang.String localPrimaryKeyValue)` | Deprecated. use `deleteRecord(InformationEntity,String)` instead
    `protected void` | `doCommonConstructorStuff​(java.lang.String databaseFileName, java.lang.String databaseServerName, InformationEntity rootInformationEntity, DicomDictionary dictionary, java.lang.String databaseRootName)` | Instantiate a persistent information model using the named database.
    `protected void` | `extendCreateStatementStringWithAnyExtraAttributes​(java.lang.StringBuffer b, InformationEntity ie)` | Extend a SQL CREATE TABLE statement in the process of being constructed with any additional attributes (columns) that the model requires.
    `protected void` | `extendCreateStatementStringWithDerivedAttributes​(java.lang.StringBuffer b, InformationEntity ie)` | Extend a SQL CREATE TABLE statement in the process of being constructed with any derived attributes (columns) that the model requires.
    `protected void` | `extendCreateStatementStringWithUserColumns​(java.lang.StringBuffer b, InformationEntity ie)` | Extend a SQL CREATE TABLE statement in the process of being constructed with any user optional columns that the model requires.
    `protected abstract void` | `extendInsertStatementStringWithAttributeNamesForSelectedInformationEntity​(java.lang.StringBuffer b, AttributeList list, InformationEntity ie)` | Extend a SQL INSERT statement in the process of being constructed with the names of the attributes in the instance for the entity.
    `protected abstract void` | `extendInsertStatementStringWithAttributeValuesForSelectedInformationEntity​(java.lang.StringBuffer b, AttributeList list, InformationEntity ie, java.lang.String fileName)` | Deprecated. use `extendInsertStatementStringWithAttributeValuesForSelectedInformationEntity()` instead
    `protected abstract void` | `extendInsertStatementStringWithAttributeValuesForSelectedInformationEntity​(java.lang.StringBuffer b, AttributeList list, InformationEntity ie, java.lang.String fileName, java.lang.String fileReferenceType)` | Extend a SQL INSERT statement in the process of being constructed with the values of the attributes in the instance for the entity.
    `protected abstract void` | `extendInsertStatementStringWithDerivedAttributeNamesForSelectedInformationEntity​(java.lang.StringBuffer b, AttributeList list, InformationEntity ie)` | Extend a SQL INSERT statement in the process of being constructed with the names of the derived attributes in the instance for the entity.
    `protected abstract void` | `extendInsertStatementStringWithDerivedAttributeValuesForSelectedInformationEntity​(java.lang.StringBuffer b, AttributeList list, InformationEntity ie)` | Extend a SQL INSERT statement in the process of being constructed with the values of the derived attributes in the instance for the entity.
    `protected abstract void` | `extendInsertStatementStringWithPersonNameSearchColumnsForSelectedInformationEntity​(java.lang.StringBuffer b, AttributeList list, InformationEntity ie)` | Extend a SQL INSERT statement in the process of being constructed with the names of the additional search columns derived from person name attributes in the instance for the entity.
    `protected abstract void` | `extendInsertStatementStringWithPersonNameSearchValuesForSelectedInformationEntity​(java.lang.StringBuffer b, AttributeList list, InformationEntity ie)` | Extend a SQL INSERT statement in the process of being constructed with the values of the additional search columns derived from person name attributes in the instance for the entity.
    `protected abstract void` | `extendStatementStringWithMatchingAttributesForSelectedInformationEntity​(java.lang.StringBuffer b, AttributeList list, InformationEntity ie)` | Extend a SQL SELECT statement in the process of being constructed with matching clauses for the unique keys of the entity and all its parents.
    `protected void` | `finalize()` |
    `java.util.ArrayList` | `findAllAttributeValuesForAllRecordsForThisInformationEntity​(InformationEntity ie)` | For all records of an information entity, get the values of all the columns in the entity's database table.
    `java.util.ArrayList` | `findAllAttributeValuesForAllRecordsForThisInformationEntityWithMatchingParent​(InformationEntity ieWanted, InformationEntity ieParent, java.lang.String parentMatchingAttribute, java.lang.String parentMatchingValue)` | For all records of an information entity with all parents matching a particular attribute value, get the values of all attributes.
    `java.util.ArrayList` | `findAllAttributeValuesForAllRecordsForThisInformationEntityWithSpecifiedKeyValue​(InformationEntity ie, java.lang.String keyName, java.lang.String keyValue)` | For all records of an information entity matching the specified key value, get the values of all the columns in the entity's database table.
    `java.util.ArrayList` | `findAllAttributeValuesForAllRecordsForThisInformationEntityWithSpecifiedParent​(InformationEntity ie, java.lang.String localParentReference)` | For all records of an information entity with the specified parent, get the values of all the columns in the entity's database table.
    `java.util.ArrayList` | `findAllAttributeValuesForAllRecordsForThisInformationEntityWithSpecifiedUID​(InformationEntity ie, java.lang.String uid)` | For all records of an information entity matching the specified UID, get the values of all the columns in the entity's database table.
    `java.util.Map` | `findAllAttributeValuesForSelectedRecord​(InformationEntity ie, java.lang.String localPrimaryKeyValue)` | For a particular instance of an information entity, get the values of all the columns in the entity's database table.
    `java.lang.String` | `findSelectedAttributeValuesForSelectedRecord​(InformationEntity ie, java.lang.String localPrimaryKeyValue, java.lang.String key)` | For a particular instance of an information entity, get the value of the selected column in the entity's database table.
    `AttributeTag` | `getAttributeTagFromDatabaseColumnName​(java.lang.String columnName)` | Get the name of the DICOM element corresponding to the database table column.
    `abstract InformationEntity` | `getChildTypeForParent​(InformationEntity ie)` | For an information entity (regardless of a particular instance), find the next information entity lower down in the information model hierarchy in the general case.
    `abstract InformationEntity` | `getChildTypeForParent​(InformationEntity ie, boolean concatenation)` | For a particular instance of an information entity, find the next information entity lower down in the information model hierarchy.
    `abstract InformationEntity` | `getChildTypeForParent​(InformationEntity ie, AttributeList list)` | For a particular instance of an information entity, find the next information entity lower down in the information model hierarchy.
    `static java.lang.String` | `getDatabaseColumnNameFromDicomName​(java.lang.String descriptiveName)` | Get the name of the table column corresponding to the DICOM element name.
    `java.lang.String` | `getDatabaseColumnNameFromDicomTag​(AttributeTag tag)` | Get the name of the table column corresponding to the DICOM tag.
    `abstract java.lang.String` | `getDescriptiveColumnName​(InformationEntity ie)` | For a particular information entity, find the name of the column in the entity's database table containing the first of three descriptive attributes for the entity.
    `java.lang.String` | `getDicomNameFromDatabaseColumnName​(java.lang.String columnName)` | Get the name of the DICOM element corresponding to the database table column.
    `InformationEntity` | `getInformationEntityFromTag​(AttributeTag tag)` | Get the information entity in this information model for the specified tag
    `java.lang.String` | `getLocalFileNameColumnName​(InformationEntity ie)` | For a particular information entity, find the name of the column in the entity's database table containing the local file name of a stored object.
    `java.lang.String` | `getLocalFileReferenceTypeColumnName​(InformationEntity ie)` | For a particular information entity, find the name of the column in the entity's database table containing the reference type of a stored object.
    `java.lang.String` | `getLocalParentReferenceColumnName​(InformationEntity ie)` | For a particular information entity, find the name of the column in the entity's database table containing the reference to an instance of the entity's parent.
    `java.lang.String` | `getLocalPrimaryKeyColumnName​(InformationEntity ie)` | For a particular information entity, find the name of the column in the entity's database table containing the primary key of an instance of the entity.
    `java.lang.String` | `getLocalRecordInsertionTimeColumnName​(InformationEntity ie)` | For a particular information entity, find the name of the column in the entity's database table containing the record insertion time recorded as the value returned by `System.currentTimeMillis()`.
    `abstract java.lang.String` | `getNametoDescribeThisInstanceOfInformationEntity​(InformationEntity ie, java.util.Map returnedAttributes)` | For a particular instance of an information entity, find a descriptive name for the entity suitable for rendering.
    `abstract java.lang.String` | `getOtherDescriptiveColumnName​(InformationEntity ie)` | For a particular information entity, find the name of the column in the entity's database table containing the second of three descriptive attributes for the entity.
    `abstract java.lang.String` | `getOtherOtherDescriptiveColumnName​(InformationEntity ie)` | For a particular information entity, find the name of the column in the entity's database table containing the third of three descriptive attributes for the entity.
    `QueryResponseGeneratorFactory` | `getQueryResponseGeneratorFactory​(int debugLevel)` | Get a factory to manufacture a query response generator capable of performing a query and returning the results.
    `RetrieveResponseGeneratorFactory` | `getRetrieveResponseGeneratorFactory​(int debugLevel)` | Get a factory to manufacture a retrieve response generator capable of performing a retrieve and returning the results.
    `static java.lang.String` | `getSQLTypeFromDicomValueRepresentation​(byte[] vr)` | Given a DICOM Value Representation, determine the appropriate corresponding SQL type to use.
    `static java.lang.String` | `getTableNameForInformationEntity​(InformationEntity ie)` | Get the table name for an information entity.
    `abstract java.lang.String` | `getUIDColumnNameForInformationEntity​(InformationEntity ie)` | For a particular information entity, find the name of the column in the entity's database table containing the DICOM UID for the entity.
    `void` | `insertObject​(AttributeList list, java.lang.String fileName)` | Deprecated. use `insertObject()` instead
    `void` | `insertObject​(AttributeList list, java.lang.String fileName, java.lang.String fileReferenceType)` | Insert a DICOM composite object, and the relevant attributes of all the entities it contains, into the database.
    `protected abstract boolean` | `isInformationEntityInModel​(InformationEntity ie)` | Is the entity in the information model ?
    `protected boolean` | `isInformationEntityInModel​(java.lang.String ieName)` | Is the named entity in the information model ?
    `java.lang.String` | `localFileNameColumnName​(InformationEntity ie)` | Deprecated. use `getLocalFileNameColumnName()` instead
    `java.lang.String` | `toString()` | Returns a string describing the structure (not the contents) of the database.
    `void` | `updateSelectedRecord​(InformationEntity ie, java.lang.String localPrimaryKeyValue, java.lang.String key, java.lang.String value)` | For a particular instance of an information entity, update the record in the database table with a new value for the specified attribute (column).

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

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

- - ### Field Detail

    - #### FILE_COPIED

          public static final java.lang.String FILE_COPIED

      See Also:
        Constant Field Values

    - #### FILE_REFERENCED

          public static final java.lang.String FILE_REFERENCED

      See Also:
        Constant Field Values

    - #### defaultDatabaseRootName

          protected static final java.lang.String defaultDatabaseRootName

      See Also:
        Constant Field Values

    - #### localPrimaryKeyColumnName

          protected static final java.lang.String localPrimaryKeyColumnName

      See Also:
        Constant Field Values

    - #### localParentReferenceColumnName

          protected static final java.lang.String localParentReferenceColumnName

      See Also:
        Constant Field Values

    - #### localRecordInsertionTimeColumnName

          protected static final java.lang.String localRecordInsertionTimeColumnName

      See Also:
        Constant Field Values

    - #### localFileName

          protected static final java.lang.String localFileName

      See Also:
        Constant Field Values

    - #### localFileReferenceTypeColumnName

          protected static final java.lang.String localFileReferenceTypeColumnName

      See Also:
        Constant Field Values

    - #### personNameCanonicalColumnNamePrefix

          protected static final java.lang.String personNameCanonicalColumnNamePrefix

      See Also:
        Constant Field Values

    - #### personNameCanonicalColumnNameSuffix

          protected static final java.lang.String personNameCanonicalColumnNameSuffix

      See Also:
        Constant Field Values

    - #### personNamePhoneticCanonicalColumnNamePrefix

          protected static final java.lang.String personNamePhoneticCanonicalColumnNamePrefix

      See Also:
        Constant Field Values

    - #### personNamePhoneticCanonicalColumnNameSuffix

          protected static final java.lang.String personNamePhoneticCanonicalColumnNameSuffix

      See Also:
        Constant Field Values

    - #### userColumnName1

          protected static final java.lang.String userColumnName1

      See Also:
        Constant Field Values

    - #### userColumnName2

          protected static final java.lang.String userColumnName2

      See Also:
        Constant Field Values

    - #### userColumnName3

          protected static final java.lang.String userColumnName3

      See Also:
        Constant Field Values

    - #### userColumnName4

          protected static final java.lang.String userColumnName4

      See Also:
        Constant Field Values

    - #### rootInformationEntity

          protected InformationEntity rootInformationEntity

    - #### listsOfAttributesByInformationEntity

          protected java.util.HashMap listsOfAttributesByInformationEntity

    - #### additionalIndexMapOfColumnsToTables

          protected java.util.HashMap additionalIndexMapOfColumnsToTables

    - #### databaseConnection

          protected java.sql.Connection databaseConnection

    - #### externalServerInstance

          protected org.hsqldb.Server externalServerInstance

    - #### dictionary

          protected DicomDictionary dictionary

    - #### databaseRootName

          protected java.lang.String databaseRootName

  - ### Constructor Detail

    - #### DatabaseInformationModel

          public DatabaseInformationModel​(java.lang.String databaseFileName,
                                          InformationEntity rootInformationEntity,
                                          DicomDictionary dictionary)
                                   throws DicomException

      Instantiate a persistent information model using the named database.

      Will open a connection to the database, and create any tables if this is the first time, or re-use any persistent information if not.

      Parameters:
        `databaseFileName` - the file name of the underlying SQL database instance to be used
        `rootInformationEntity` - the top entity of the information model; specific to a particular model's constructor
        `dictionary` - used to decide which attributes to include for each entity when creating the tables
      Throws:
        `DicomException` - thrown if a connection to the database cannot be established

    - #### DatabaseInformationModel

          public DatabaseInformationModel​(java.lang.String databaseFileName,
                                          InformationEntity rootInformationEntity,
                                          DicomDictionary dictionary,
                                          java.lang.String databaseRootName)
                                   throws DicomException

      Instantiate a persistent information model using the named database.

      Will open a connection to the database, and create any tables if this is the first time, or re-use any persistent information if not.

      Parameters:
        `databaseFileName` - the file name of the underlying SQL database instance to be used
        `rootInformationEntity` - the top entity of the information model; specific to a particular model's constructor
        `dictionary` - used to decide which attributes to include for each entity when creating the tables
        `databaseRootName` - the name used for the root node of the database in TreeModel
      Throws:
        `DicomException` - thrown if a connection to the database cannot be established

    - #### DatabaseInformationModel

          public DatabaseInformationModel​(java.lang.String databaseFileName,
                                          java.lang.String databaseServerName,
                                          InformationEntity rootInformationEntity,
                                          DicomDictionary dictionary)
                                   throws DicomException

      Instantiate a persistent information model using the named database allowing external SQL access.

      Will open a connection to the database, and create any tables if this is the first time, or re-use any persistent information if not.

      Parameters:
        `databaseFileName` - the file name of the underlying SQL database instance to be used
        `databaseServerName` - the name to use for external TCP access to database (such a server will not be started if this value is null or zero length)
        `rootInformationEntity` - the top entity of the information model; specific to a particular model's constructor
        `dictionary` - used to decide which attributes to include for each entity when creating the tables
      Throws:
        `DicomException` - thrown if a connection to the database cannot be established

    - #### DatabaseInformationModel

          public DatabaseInformationModel​(java.lang.String databaseFileName,
                                          java.lang.String databaseServerName,
                                          InformationEntity rootInformationEntity,
                                          DicomDictionary dictionary,
                                          java.lang.String databaseRootName)
                                   throws DicomException

      Instantiate a persistent information model using the named database allowing external SQL access.

      Will open a connection to the database, and create any tables if this is the first time, or re-use any persistent information if not.

      Parameters:
        `databaseFileName` - the file name of the underlying SQL database instance to be used
        `databaseServerName` - the name to use for external TCP access to database (such a server will not be started if this value is null or zero length)
        `rootInformationEntity` - the top entity of the information model; specific to a particular model's constructor
        `dictionary` - used to decide which attributes to include for each entity when creating the tables
        `databaseRootName` - the name used for the root node of the database in TreeModel
      Throws:
        `DicomException` - thrown if a connection to the database cannot be established

  - ### Method Detail

    - #### doCommonConstructorStuff

          protected void doCommonConstructorStuff​(java.lang.String databaseFileName,
                                                  java.lang.String databaseServerName,
                                                  InformationEntity rootInformationEntity,
                                                  DicomDictionary dictionary,
                                                  java.lang.String databaseRootName)
                                           throws DicomException

      Instantiate a persistent information model using the named database.

      Will open a connection to the database, and create any tables if this is the first time, or re-use any persistent information if not.

      Parameters:
        `databaseFileName` - the file name of the underlying SQL database instance to be used (or "mem:name" if the database is to be in-memory and not persisted)
        `databaseServerName` - the name to use for external TCP access to database (such a server will not be started if this value is null or zero length)
        `rootInformationEntity` - the top entity of the information model; specific to a particular model's constructor
        `dictionary` - used to decide which attributes to include for each entity when creating the tables
        `databaseRootName` - the name used for the root node of the database in TreeModel
      Throws:
        `DicomException` - thrown if a connection to the database cannot be established

    - #### close

          public void close()

      Close the underlying connection to the database and shutdown any external SQL server.

      Prior to actually closing will also try to formally shutdown and compact the database.

    - #### finalize

          protected void finalize()

      Overrides:
        `finalize` in class `java.lang.Object`

    - #### isInformationEntityInModel

          protected abstract boolean isInformationEntityInModel​(InformationEntity ie)

      Is the entity in the information model ?

      Will be specific to a particular concrete information model.

      Returns:
        boolean the information entity is in the information model

    - #### isInformationEntityInModel

          protected boolean isInformationEntityInModel​(java.lang.String ieName)

      Is the named entity in the information model ?

      Will be specific to a particular concrete information model.

      Parameters:
        `ieName` - a String name, whose case is ignored (e.g., a database table named for the corresponding information entity)
      Returns:
        the name corresponds to an information entity that is in the information model

    - #### getDatabaseColumnNameFromDicomTag

          public java.lang.String getDatabaseColumnNameFromDicomTag​(AttributeTag tag)

      Get the name of the table column corresponding to the DICOM tag.

      Parameters:
        `tag` - the tag of the DICOM element
      Returns:
        a `String` column name, or null if not known

    - #### getDatabaseColumnNameFromDicomName

          public static java.lang.String getDatabaseColumnNameFromDicomName​(java.lang.String descriptiveName)

      Get the name of the table column corresponding to the DICOM element name.

      Parameters:
        `descriptiveName` - the name of the DICOM element
      Returns:
        the upper case `String` column name, or null if not known

    - #### getDicomNameFromDatabaseColumnName

          public java.lang.String getDicomNameFromDatabaseColumnName​(java.lang.String columnName)

      Get the name of the DICOM element corresponding to the database table column.

      Parameters:
        `columnName` - the name of the database column
      Returns:
        a `String` descriptive name of the DICOM element, or null if not known

    - #### getAttributeTagFromDatabaseColumnName

          public AttributeTag getAttributeTagFromDatabaseColumnName​(java.lang.String columnName)

      Get the name of the DICOM element corresponding to the database table column.

      Parameters:
        `columnName` - the name of the database column
      Returns:
        the tag, or null if not known

    - #### createAdditionalIndexes

          protected void createAdditionalIndexes()
                                          throws DicomException

      Create any additional indexes to optimize queries, for example for UIDs.

      Called after creating tables and default indexes.

      Throws:
        `DicomException`

    - #### extendCreateStatementStringWithAnyExtraAttributes

          protected void extendCreateStatementStringWithAnyExtraAttributes​(java.lang.StringBuffer b,
                                                                           InformationEntity ie)

      Extend a SQL CREATE TABLE statement in the process of being constructed with any additional attributes (columns) that the model requires.

      Called when creating the tables for a new database.

      Specific to each concrete information model extending `DatabaseInformationModel`. Defaults to adding no extra columns if not overridden (i.e. it is not abstract).

      For example, there may be a DICOM attribute that is defined to be in a particular information entity in the dictionary (for example InstanceNumber is at the concatenation level), but for the convenience of the user of tree and table browsers it may be nice to replicate it into the tables for lower levels of the information model as well; hence this method might add InstanceNumber at the instance level. Once created, such attributes will automatically be included during database inserts. See also `PatientStudySeriesConcatenationInstanceModel` for example.

      Parameters:
        `b` - the statement being constructed
        `ie` - the `InformationEntity` for which a create table statement is being constructed

    - #### extendCreateStatementStringWithDerivedAttributes

          protected void extendCreateStatementStringWithDerivedAttributes​(java.lang.StringBuffer b,
                                                                          InformationEntity ie)

      Extend a SQL CREATE TABLE statement in the process of being constructed with any derived attributes (columns) that the model requires.

      Called when creating the tables for a new database.

      Specific to each concrete information model extending `DatabaseInformationModel`. Defaults to adding no extra columns if not overridden (i.e. it is not abstract).

      For example, there may be dates and times derived from DICOM attributes.

      Parameters:
        `b` - the statement being constructed
        `ie` - the `InformationEntity` for which a create table statement is being constructed

    - #### extendCreateStatementStringWithUserColumns

          protected void extendCreateStatementStringWithUserColumns​(java.lang.StringBuffer b,
                                                                    InformationEntity ie)

      Extend a SQL CREATE TABLE statement in the process of being constructed with any user optional columns that the model requires.

      Called when creating the tables for a new database.

      Specific to each concrete information model extending `DatabaseInformationModel`. Defaults to adding four extra columns for each table if not overridden (i.e. it is not abstract).

      Parameters:
        `b` - the statement being constructed
        `ie` - the `InformationEntity` for which a create table statement is being constructed

    - #### deleteSelectedRecord

          public void deleteSelectedRecord​(InformationEntity ie,
                                           java.lang.String localPrimaryKeyValue)
                                    throws DicomException

      Deprecated.
      use `deleteRecord(InformationEntity,String)` instead
      Throws:
        `DicomException`

    - #### deleteRecord

          public void deleteRecord​(InformationEntity ie,
                                   java.lang.String localPrimaryKeyValue)
                            throws DicomException

      Delete a database record (a particular instance of an information entity).

      For example, for the study entity, this would delete a particular study.

      Does NOT delete its children, if any.

      Does NOT delete any referenced files, if any.

      Parameters:
        `ie` - the `InformationEntity` that corresponds to the table containing the record to be deleted
        `localPrimaryKeyValue` - primary key of the record
      Throws:
        `DicomException` - thrown if there are problems executing the database statement

    - #### insertObject

          public void insertObject​(AttributeList list,
                                   java.lang.String fileName)
                            throws DicomException

      Deprecated.
      use `insertObject()` instead

      Insert a DICOM composite object, and the relevant attributes of all the entities it contains, into the database.

      Such a composite object may contain information about the patient, study, series and instance and so on, and for each of these entities the appropriate records will be created in the appropriate tables

      If records for any entities already exist (as they will often do when inserting multiple objects for the same patient or study, for example), they are matched based on the unique key for the appropriate level. They are not replaced and they are not updated, even if some of the attributes for that entity (other than the unique key) are different or additional. Even at the instance level (e.g. if an object with the same `SOPInstanceUID` is received), the first record will not be overwritten. Whether or not the application calling this method will have overwritten the corresponding file in the supplied argument or not is outside the scope of this class.

      The information is taken from the supplied `AttributeList`, which is presumed to have already been read from a file or obtained through some other means. The supplied filename is only used to fill in the appropriate instance level attribute.

      The file reference type is left empty since unknown.

      Parameters:
        `list` - the DICOM attributes of a composite object, containing the attributes describing this instance of the entity
        `fileName` - the name of a file where the object is stored and from whence it may later be read
      Throws:
        `DicomException` - thrown if there are problems extracting the DICOM attributes

    - #### insertObject

          public void insertObject​(AttributeList list,
                                   java.lang.String fileName,
                                   java.lang.String fileReferenceType)
                            throws DicomException

      Insert a DICOM composite object, and the relevant attributes of all the entities it contains, into the database.

      Such a composite object may contain information about the patient, study, series and instance and so on, and for each of these entities the appropriate records will be created in the appropriate tables

      If records for any entities already exist (as they will often do when inserting multiple objects for the same patient or study, for example), they are matched based on the unique key for the appropriate level. They are not replaced and they are not updated, even if some of the attributes for that entity (other than the unique key) are different or additional. Even at the instance level (e.g. if an object with the same `SOPInstanceUID` is received), the first record will not be overwritten. Whether or not the application calling this method will have overwritten the corresponding file in the supplied argument or not is outside the scope of this class.

      The information is taken from the supplied `AttributeList`, which is presumed to have already been read from a file or obtained through some other means. The supplied filename is only used to fill in the appropriate instance level attribute.

      Parameters:
        `list` - the DICOM attributes of a composite object, containing the attributes describing this instance of the entity
        `fileName` - the name of a file where the object is stored and from whence it may later be read
        `fileReferenceType` - "C" for copied (i.e., delete on purge), "R" for referenced (i.e., do not delete on purge)
      Throws:
        `DicomException` - thrown if there are problems extracting the DICOM attributes

    - #### extendInsertStatementStringWithPersonNameSearchColumnsForSelectedInformationEntity

          protected abstract void extendInsertStatementStringWithPersonNameSearchColumnsForSelectedInformationEntity​(java.lang.StringBuffer b,
                                                                                                                     AttributeList list,
                                                                                                                     InformationEntity ie)
                                                                                                              throws DicomException

      Extend a SQL INSERT statement in the process of being constructed with the names of the additional search columns derived from person name attributes in the instance for the entity.

      Called when inserting a new record for an instance of the entity.

      Specific to each concrete information model extending `DatabaseInformationModel`.

      Parameters:
        `b` - the statement being constructed
        `list` - the DICOM attributes of a composite object, containing the attributes describing this instance of the entity
        `ie` - the `InformationEntity` for which a select statement is being constructed
      Throws:
        `DicomException` - thrown if there are problems extracting the DICOM attributes

    - #### extendInsertStatementStringWithPersonNameSearchValuesForSelectedInformationEntity

          protected abstract void extendInsertStatementStringWithPersonNameSearchValuesForSelectedInformationEntity​(java.lang.StringBuffer b,
                                                                                                                    AttributeList list,
                                                                                                                    InformationEntity ie)
                                                                                                             throws DicomException

      Extend a SQL INSERT statement in the process of being constructed with the values of the additional search columns derived from person name attributes in the instance for the entity.

      Called when inserting a new record for an instance of the entity.

      Specific to each concrete information model extending `DatabaseInformationModel`.

      Parameters:
        `b` - the statement being constructed
        `list` - the DICOM attributes of a composite object, containing the attributes describing this instance of the entity
        `ie` - the `InformationEntity` for which a select statement is being constructed
      Throws:
        `DicomException` - thrown if there are problems extracting the DICOM attributes

    - #### extendStatementStringWithMatchingAttributesForSelectedInformationEntity

          protected abstract void extendStatementStringWithMatchingAttributesForSelectedInformationEntity​(java.lang.StringBuffer b,
                                                                                                          AttributeList list,
                                                                                                          InformationEntity ie)
                                                                                                   throws DicomException

      Extend a SQL SELECT statement in the process of being constructed with matching clauses for the unique keys of the entity and all its parents.

      For example, a model might specify the unique key for the patient to be `PatientID`, the study to be `StudyInstanceUID`, the series to be `SeriesInstanceUID` and so on. A match requested at the series level would then require `PatientID`, `StudyInstanceUID` and `SeriesInstanceUID` to match what was in the supplied `AttributeList`

      Called when inserting a new record for an instance of the entity.

      Specific to each concrete information model extending `DatabaseInformationModel`.

      Parameters:
        `b` - the statement being constructed
        `list` - the DICOM attributes of a composite object, containing the attributes describing this instance of the entity
        `ie` - the `InformationEntity` for which a select statement is being constructed
      Throws:
        `DicomException` - thrown if there are problems extracting the DICOM attributes

    - #### extendInsertStatementStringWithAttributeNamesForSelectedInformationEntity

          protected abstract void extendInsertStatementStringWithAttributeNamesForSelectedInformationEntity​(java.lang.StringBuffer b,
                                                                                                            AttributeList list,
                                                                                                            InformationEntity ie)
                                                                                                     throws DicomException

      Extend a SQL INSERT statement in the process of being constructed with the names of the attributes in the instance for the entity.

      Called when inserting a new record for an instance of the entity.

      Specific to each concrete information model extending `DatabaseInformationModel`.

      Parameters:
        `b` - the statement being constructed
        `list` - the DICOM attributes of a composite object, containing the attributes describing this instance of the entity
        `ie` - the `InformationEntity` for which an insert statement is being constructed
      Throws:
        `DicomException` - thrown if there are problems extracting the DICOM attributes

    - #### extendInsertStatementStringWithAttributeValuesForSelectedInformationEntity

          protected abstract void extendInsertStatementStringWithAttributeValuesForSelectedInformationEntity​(java.lang.StringBuffer b,
                                                                                                             AttributeList list,
                                                                                                             InformationEntity ie,
                                                                                                             java.lang.String fileName)
                                                                                                      throws DicomException

      Deprecated.
      use `extendInsertStatementStringWithAttributeValuesForSelectedInformationEntity()` instead

      Extend a SQL INSERT statement in the process of being constructed with the values of the attributes in the instance for the entity.

      Called when inserting a new record for an instance of the entity.

      Specific to each concrete information model extending `DatabaseInformationModel`.

      The file reference type is left empty since unknown.

      Parameters:
        `b` - the statement being constructed
        `list` - the DICOM attributes of a composite object, containing the attributes describing this instance of the entity
        `ie` - the `InformationEntity` for which an insert statement is being constructed
        `fileName` - the local filename, which may be non-null for `INSTANCE` level insertions
      Throws:
        `DicomException` - thrown if there are problems extracting the DICOM attributes

    - #### extendInsertStatementStringWithAttributeValuesForSelectedInformationEntity

          protected abstract void extendInsertStatementStringWithAttributeValuesForSelectedInformationEntity​(java.lang.StringBuffer b,
                                                                                                             AttributeList list,
                                                                                                             InformationEntity ie,
                                                                                                             java.lang.String fileName,
                                                                                                             java.lang.String fileReferenceType)
                                                                                                      throws DicomException

      Extend a SQL INSERT statement in the process of being constructed with the values of the attributes in the instance for the entity.

      Called when inserting a new record for an instance of the entity.

      Specific to each concrete information model extending `DatabaseInformationModel`.

      Parameters:
        `b` - the statement being constructed
        `list` - the DICOM attributes of a composite object, containing the attributes describing this instance of the entity
        `ie` - the `InformationEntity` for which an insert statement is being constructed
        `fileName` - the local filename, which may be non-null for `INSTANCE` level insertions
        `fileReferenceType` - "C" for copied (i.e., delete on purge), "R" for referenced (i.e., do not delete on purge)
      Throws:
        `DicomException` - thrown if there are problems extracting the DICOM attributes

    - #### extendInsertStatementStringWithDerivedAttributeNamesForSelectedInformationEntity

          protected abstract void extendInsertStatementStringWithDerivedAttributeNamesForSelectedInformationEntity​(java.lang.StringBuffer b,
                                                                                                                   AttributeList list,
                                                                                                                   InformationEntity ie)
                                                                                                            throws DicomException

      Extend a SQL INSERT statement in the process of being constructed with the names of the derived attributes in the instance for the entity.

      Called when inserting a new record for an instance of the entity.

      Specific to each concrete information model extending `DatabaseInformationModel`.

      Parameters:
        `b` - the statement being constructed
        `list` - the DICOM attributes of a composite object, containing the attributes describing this instance of the entity
        `ie` - the `InformationEntity` for which an insert statement is being constructed
      Throws:
        `DicomException` - thrown if there are problems extracting the DICOM attributes

    - #### extendInsertStatementStringWithDerivedAttributeValuesForSelectedInformationEntity

          protected abstract void extendInsertStatementStringWithDerivedAttributeValuesForSelectedInformationEntity​(java.lang.StringBuffer b,
                                                                                                                    AttributeList list,
                                                                                                                    InformationEntity ie)
                                                                                                             throws DicomException

      Extend a SQL INSERT statement in the process of being constructed with the values of the derived attributes in the instance for the entity.

      Called when inserting a new record for an instance of the entity.

      Specific to each concrete information model extending `DatabaseInformationModel`.

      Parameters:
        `b` - the statement being constructed
        `list` - the DICOM attributes of a composite object, containing the attributes describing this instance of the entity
        `ie` - the `InformationEntity` for which an insert statement is being constructed
      Throws:
        `DicomException` - thrown if there are problems extracting the DICOM attributes

    - #### createPrimaryKeyForSelectedInformationEntity

          protected abstract java.lang.String createPrimaryKeyForSelectedInformationEntity​(InformationEntity ie)

      Create a new unique key which may be used to identify a new instance of an entity.

      Called when inserting a new record for an instance of the entity.

      Parameters:
        `ie` - the `InformationEntity` for which a key is requested
      Returns:
        string value of a unique key

    - #### updateSelectedRecord

          public void updateSelectedRecord​(InformationEntity ie,
                                           java.lang.String localPrimaryKeyValue,
                                           java.lang.String key,
                                           java.lang.String value)
                                    throws DicomException

      For a particular instance of an information entity, update the record in the database table with a new value for the specified attribute (column).

      For example, for the study entity, this would update an attribute of a particular study, for example the `StudyID` attribute.

      Parameters:
        `ie` - the `InformationEntity` of the record to be updated
        `localPrimaryKeyValue` - the string value of the unique key which identifies the instance of the entity (not including wildcards)
        `key` - the string name of the attribute (column) to be set (updated)
        `value` - the string value to set
      Throws:
        `DicomException` - thrown if the update fails

    - #### findAllAttributeValuesForSelectedRecord

          public java.util.Map findAllAttributeValuesForSelectedRecord​(InformationEntity ie,
                                                                       java.lang.String localPrimaryKeyValue)
                                                                throws DicomException

      For a particular instance of an information entity, get the values of all the columns in the entity's database table.

      For example, for the study entity, this would return the attributes for a particular study.

      Parameters:
        `ie` - the `InformationEntity` of the record to be returned
        `localPrimaryKeyValue` - the string value of the unique key which identifies the instance of the entity (not including wildcards)
      Returns:
        a `TreeMap` of `String` values indexed by `String` upper case column names
      Throws:
        `DicomException` - thrown if the query fails

    - #### findSelectedAttributeValuesForSelectedRecord

          public java.lang.String findSelectedAttributeValuesForSelectedRecord​(InformationEntity ie,
                                                                               java.lang.String localPrimaryKeyValue,
                                                                               java.lang.String key)
                                                                        throws DicomException

      For a particular instance of an information entity, get the value of the selected column in the entity's database table.

      Parameters:
        `ie` - the `InformationEntity` of the record to be returned
        `localPrimaryKeyValue` - the string value of the unique key which identifies the instance of the entity (not including wildcards)
        `key` - the name of the attribute to be returned
      Returns:
        a `String` value, or an empty string if not found
      Throws:
        `DicomException` - thrown if the query fails

    - #### findAllAttributeValuesForAllRecordsForThisInformationEntity

          public java.util.ArrayList findAllAttributeValuesForAllRecordsForThisInformationEntity​(InformationEntity ie)
                                                                                          throws DicomException

      For all records of an information entity, get the values of all the columns in the entity's database table.

      For example, for the study entity, this would return the attributes for all the studies in the database.

      Parameters:
        `ie` - the `InformationEntity` of the records to be returned
      Returns:
        an `ArrayList` of records, each value of which is a `TreeMap` of `String` values indexed by `String` upper case column names
      Throws:
        `DicomException` - thrown if the query fails

    - #### findAllAttributeValuesForAllRecordsForThisInformationEntityWithSpecifiedUID

          public java.util.ArrayList findAllAttributeValuesForAllRecordsForThisInformationEntityWithSpecifiedUID​(InformationEntity ie,
                                                                                                                 java.lang.String uid)
                                                                                                          throws DicomException

      For all records of an information entity matching the specified UID, get the values of all the columns in the entity's database table.

      For example, for the study entity, this would return the attributes for all the studies with the specified UID in the database.

      For the instance entity, this would return the attributes for all the instances with the specified UID in the database.

      In an ideal world, this method should only ever return one record, since the DICOM model is predicated on UIDs being unique !

      Parameters:
        `ie` - the `InformationEntity` of the records to be returned
        `uid` - the `String` UID of the records to be returned
      Returns:
        an `ArrayList` of records, each value of which is a `TreeMap` of `String` values indexed by `String` upper case column names
      Throws:
        `DicomException` - thrown if the query fails

    - #### findAllAttributeValuesForAllRecordsForThisInformationEntityWithSpecifiedKeyValue

          public java.util.ArrayList findAllAttributeValuesForAllRecordsForThisInformationEntityWithSpecifiedKeyValue​(InformationEntity ie,
                                                                                                                      java.lang.String keyName,
                                                                                                                      java.lang.String keyValue)
                                                                                                               throws DicomException

      For all records of an information entity matching the specified key value, get the values of all the columns in the entity's database table.

      For example, for the study entity, this would return the attributes for all the studies with the specified key value in the database.

      Parameters:
        `ie` - the `InformationEntity` of the records to be returned
        `keyName` - the `String` name of the key to be matched
        `keyValue` - the `String` value of the key to be matched
      Returns:
        an `ArrayList` of records, each value of which is a `TreeMap` of `String` values indexed by `String` upper case column names
      Throws:
        `DicomException` - thrown if the query fails

    - #### findAllAttributeValuesForAllRecordsForThisInformationEntityWithSpecifiedParent

          public java.util.ArrayList findAllAttributeValuesForAllRecordsForThisInformationEntityWithSpecifiedParent​(InformationEntity ie,
                                                                                                                    java.lang.String localParentReference)
                                                                                                             throws DicomException

      For all records of an information entity with the specified parent, get the values of all the columns in the entity's database table.

      For example, for the series entity, this would return the attributes for all the series of a particular study (parent).

      Parameters:
        `ie` - the `InformationEntity` of the records to be returned
        `localParentReference` - the string value of the unique key which identifies the instance of the parent entity (not including wildcards)
      Returns:
        an `ArrayList` of records, each value of which is a `TreeMap` of `String` values indexed by `String` upper case column names
      Throws:
        `DicomException` - thrown if the query fails

    - #### findAllAttributeValuesForAllRecordsForThisInformationEntityWithMatchingParent

          public java.util.ArrayList findAllAttributeValuesForAllRecordsForThisInformationEntityWithMatchingParent​(InformationEntity ieWanted,
                                                                                                                   InformationEntity ieParent,
                                                                                                                   java.lang.String parentMatchingAttribute,
                                                                                                                   java.lang.String parentMatchingValue)
                                                                                                            throws DicomException

      For all records of an information entity with all parents matching a particular attribute value, get the values of all attributes.

      For example, for the instance entity, this could return the instance local file name for all the series (parents) with a particular frame of reference UID.

      Parameters:
        `ieWanted` - the `InformationEntity` of the record level of the attribute to be returned
        `ieParent` - the `InformationEntity` of the record level of the parent to be matched
        `parentMatchingAttribute` - the string name of the attribute of the parent whose value is to be matched
        `parentMatchingValue` - the string value of the attribute of the parent to be matched (not including wildcards)
      Returns:
        an `ArrayList` of records, each value of which is a `TreeMap` of `String` values indexed by `String` upper case column names
      Throws:
        `DicomException` - thrown if the query fails

    - #### getTableNameForInformationEntity

          public static java.lang.String getTableNameForInformationEntity​(InformationEntity ie)

      Get the table name for an information entity.

      Parameters:
        `ie` - the `InformationEntity` that is the parent, such as a patient, study, etc.
      Returns:
        the upper case name of the table as used in the database

    - #### getChildTypeForParent

          public abstract InformationEntity getChildTypeForParent​(InformationEntity ie)

      For an information entity (regardless of a particular instance), find the next information entity lower down in the information model hierarchy in the general case.

      For a patient, this might be a study.

      For a series, this might be a concatenation or an instance, depending on the information model.

      This method essentially returns the most complex model possible and is used when building the database table schema.

      Parameters:
        `ie` - the `InformationEntity` that is the parent, such as a patient, study, etc.
      Returns:
        the `InformationEntity` that is the child

    - #### getChildTypeForParent

          public abstract InformationEntity getChildTypeForParent​(InformationEntity ie,
                                                                  boolean concatenation)

      For a particular instance of an information entity, find the next information entity lower down in the information model hierarchy.

      For a patient, this might be a study. For a series, this might be a concatenation or an instance, depending on both the information model and whether concatenations are to be considered in the model.

      This method may return a simpler view than the more general method, and is used when traversing the database tables.

      Parameters:
        `ie` - the `InformationEntity` that is the parent, such as a patient, study, etc.
        `concatenation` - true if concatenations are to be considered in the model
      Returns:
        the `InformationEntity` that is the child

    - #### getChildTypeForParent

          public abstract InformationEntity getChildTypeForParent​(InformationEntity ie,
                                                                  AttributeList list)

      For a particular instance of an information entity, find the next information entity lower down in the information model hierarchy.

      For a patient, this might be a study. For a series, this might be a concatenation or an instance, depending on both the information model and the contents of the instance itself.

      This method may return a simpler view than the more general method, and is used when traversing the database tables.

      Parameters:
        `ie` - the `InformationEntity` that is the parent, such as a patient, study, etc.
        `list` - the `AttributeList` that are the contents the instance
      Returns:
        the `InformationEntity` that is the child

    - #### getNametoDescribeThisInstanceOfInformationEntity

          public abstract java.lang.String getNametoDescribeThisInstanceOfInformationEntity​(InformationEntity ie,
                                                                                            java.util.Map returnedAttributes)

      For a particular instance of an information entity, find a descriptive name for the entity suitable for rendering.

      For a patient, this might be the name `Patient`. For an instance, this will depend on the SOPClassUID, and might be an `Image`, a `Waveform`, etc.

      Parameters:
        `ie` - the `InformationEntity`, such as a patient, study, etc.
        `returnedAttributes` - the attributes from the selected row of the table for this instance of the entity
      Returns:
        a human-readable string name of the entity

    - #### getDescriptiveColumnName

          public abstract java.lang.String getDescriptiveColumnName​(InformationEntity ie)

      For a particular information entity, find the name of the column in the entity's database table containing the first of three descriptive attributes for the entity.

      For example, for an instance (e.g. an image), this might be the `InstanceNumber`. For a patient, this might be the `PatientName`.

      Parameters:
        `ie` - the `InformationEntity`, such as a patient, study, etc.
      Returns:
        the upper case string name of the column, or `null` if there is no such column

    - #### getOtherDescriptiveColumnName

          public abstract java.lang.String getOtherDescriptiveColumnName​(InformationEntity ie)

      For a particular information entity, find the name of the column in the entity's database table containing the second of three descriptive attributes for the entity.

      For example, for an instance (e.g. an image), this might be the `InConcatenationNumber`. Frequently null for other entities.

      Parameters:
        `ie` - the `InformationEntity`, such as a patient, study, etc.
      Returns:
        the upper case string name of the column, or `null` if there is no such column

    - #### getOtherOtherDescriptiveColumnName

          public abstract java.lang.String getOtherOtherDescriptiveColumnName​(InformationEntity ie)

      For a particular information entity, find the name of the column in the entity's database table containing the third of three descriptive attributes for the entity.

      For example, for an instance (e.g. an image), this might be the `ImageComments`. For a patient, this might be the `PatientID`.

      Parameters:
        `ie` - the `InformationEntity`, such as a patient, study, etc.
      Returns:
        the upper case string name of the column, or `null` if there is no such column

    - #### getUIDColumnNameForInformationEntity

          public abstract java.lang.String getUIDColumnNameForInformationEntity​(InformationEntity ie)

      For a particular information entity, find the name of the column in the entity's database table containing the DICOM UID for the entity.

      For example, for an instance (e.g. an image), this might be the name of the column corresponding to the SOP Instance UID.

      Parameters:
        `ie` - the `InformationEntity`, such as a study, series, instance, etc.
      Returns:
        the upper case string name of the column, or `null` if there is no such column

    - #### getLocalPrimaryKeyColumnName

          public java.lang.String getLocalPrimaryKeyColumnName​(InformationEntity ie)

      For a particular information entity, find the name of the column in the entity's database table containing the primary key of an instance of the entity.

      Parameters:
        `ie` - the `InformationEntity`, such as a patient, study, etc.
      Returns:
        the upper case string name of the column

    - #### getLocalFileNameColumnName

          public java.lang.String getLocalFileNameColumnName​(InformationEntity ie)

      For a particular information entity, find the name of the column in the entity's database table containing the local file name of a stored object.

      Parameters:
        `ie` - the `InformationEntity`, such as a instance (e.g. an image)
      Returns:
        the upper case string name of the column

    - #### localFileNameColumnName

          public java.lang.String localFileNameColumnName​(InformationEntity ie)

      Deprecated.
      use `getLocalFileNameColumnName()` instead

      For a particular information entity, find the name of the column in the entity's database table containing the local file name of a stored object.

      Parameters:
        `ie` - the `InformationEntity`, such as a instance (e.g. an image)
      Returns:
        the upper case string name of the column

    - #### getLocalFileReferenceTypeColumnName

          public java.lang.String getLocalFileReferenceTypeColumnName​(InformationEntity ie)

      For a particular information entity, find the name of the column in the entity's database table containing the reference type of a stored object.

      Parameters:
        `ie` - the `InformationEntity`, such as a instance (e.g. an image)
      Returns:
        the upper case string name of the column

    - #### getLocalParentReferenceColumnName

          public java.lang.String getLocalParentReferenceColumnName​(InformationEntity ie)

      For a particular information entity, find the name of the column in the entity's database table containing the reference to an instance of the entity's parent.

      Parameters:
        `ie` - the `InformationEntity`, such as a patient, study, etc.
      Returns:
        the upper case string name of the column

    - #### getLocalRecordInsertionTimeColumnName

          public java.lang.String getLocalRecordInsertionTimeColumnName​(InformationEntity ie)

      For a particular information entity, find the name of the column in the entity's database table containing the record insertion time recorded as the value returned by `System.currentTimeMillis()`.

      Parameters:
        `ie` - the `InformationEntity`, such as a patient, study, etc.
      Returns:
        the upper case string name of the column

    - #### getSQLTypeFromDicomValueRepresentation

          public static java.lang.String getSQLTypeFromDicomValueRepresentation​(byte[] vr)

      Given a DICOM Value Representation, determine the appropriate corresponding SQL type to use.

      For example, the DICOM AE VR should be represented as a CHAR(16), an SS as an INTEGER, and so on.

      Parameters:
        `vr` - the 2 letter DICOM Value Representation as an array of two ASCII bytes.
      Returns:
        the string representing the SQL type.

    - #### appendExactOrIsNullMatch

          protected static void appendExactOrIsNullMatch​(java.lang.StringBuffer b,
                                                         java.lang.String value)

      Append a check for a match against a string value, accounting for the need to use the "IS NULL" rather than "=" expression when wanting to explciitly have NULL match NULL rather to never match.

      Parameters:
        `b` - the buffer to append to
        `value` - either NULL or the quoted escaped string value to append

    - #### getQueryResponseGeneratorFactory

          public QueryResponseGeneratorFactory getQueryResponseGeneratorFactory​(int debugLevel)

      Get a factory to manufacture a query response generator capable of performing a query and returning the results.

      Parameters:
        `debugLevel` - zero for no debugging messages, higher values more verbose messages
      Returns:
        the response generator factory

    - #### getRetrieveResponseGeneratorFactory

          public RetrieveResponseGeneratorFactory getRetrieveResponseGeneratorFactory​(int debugLevel)

      Get a factory to manufacture a retrieve response generator capable of performing a retrieve and returning the results.

      Parameters:
        `debugLevel` - zero for no debugging messages, higher values more verbose messages
      Returns:
        the response generator factory

    - #### getInformationEntityFromTag

          public InformationEntity getInformationEntityFromTag​(AttributeTag tag)

      Get the information entity in this information model for the specified tag
      Parameters:
        `tag` -

    - #### toString

          public java.lang.String toString()

      Returns a string describing the structure (not the contents) of the database.

      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        a list of all the attributes for each information entities followed by a description of each table obtained from the database metadata, if a connection can be established, or the string value of the exception if it cannot.