MDR
Keywords: uk.ac.ic.doc.automed.MDR class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.ic.doc.automed
Class MDR

    java.lang.Object
      uk.ac.ic.doc.automed.MDR

    public class MDR

extends java.lang.Object

Properties used from the MDR data source

SQLDelime | String used to seperate multi-statement SQL strings, defaults to a semicolon at the end of its line | Optional
TestDB | SQL Query to assert existence of repository | Required

Field Summary
`static java.lang.String` | `MDR_DataSourceName`
`static java.lang.String` | `userName`

Constructor Summary
`MDR()`

Method Summary
`static void` | `cidExists(int cid)` Checks if a particular construct identifier (CID) exists in the MDR.
`static int` | `createConstruct(int mid, java.lang.String name, int constructClass, boolean isRoot)` Creates a new construct for a modelling language
`static void` | `createConstructConstraint(int cid, java.lang.String cname, java.lang.String def)` Create a new construct constraint
`static int` | `createConstructScheme(int cid, int type, int argCID, boolean isKey, int HDMType, int lowerBound, int upperBound)` Creates a new constructScheme argument for a construct
`static int` | `createModel(java.lang.String name)` Creates a new data modelling language which can then have constructs added.
`static int` | `createType(int modelID, java.lang.String typeName, int hdmEquiv, int parentType)` Create a new record in type hierarchy table
`static java.util.Vector` | `executeQuery(java.lang.String sql)` Execute a SQL query on the repository, and return the result in a `Vector`
`static int` | `executeUpdate(java.lang.String sql)` Execute a SQL update on the repository.
`static DBResultSet` | `getAllTypes(int mid)` Get the complete rows of `TypeHierarchy` objects.
`static int` | `getConstructClass(int cid)`
`static java.lang.String` | `getConstructConstraint(int cid, java.lang.String constraint_name)`
`static DBResultSet` | `getConstructConstraints(int cid)` Get all constraints associated to a construct
`static int` | `getConstructMID(int cid)` Gets the Model Identifier for a given construct
`static java.lang.String` | `getConstructName(int cid)`
`static java.lang.String[]` | `getConstructNames(int mid)` Gets a list of all construct names for a modelling language
`static java.lang.Object` | `getConstructProperty(int mid, int cid, java.lang.String name, boolean textual)`
`static int[]` | `getConstructs(int mid)` Get the CIDs of all constructs for a modelling language
`static int` | `getConstructSchemeArgCID(int cid, int pos)`
`static int` | `getConstructSchemeCount(int cid)` Gets the count of construct scheme arguments for this construct, the number is also the highest index (argument pos) usable as the construct scheme numbering starts at 1
`static int` | `getConstructSchemeHDMType(int cid, int pos)`
`static int` | `getConstructSchemeLowerBound(int cid, int pos)`
`static int` | `getConstructSchemeType(int cid, int pos)`
`static int` | `getConstructSchemeUpperBound(int cid, int pos)`
`static java.lang.String` | `getDataSourceName()` Returns the name of the repository in the local database.
`static int` | `getEquivHDMType(int tid)`
`static int[]` | `getEquivHighLevelType(int tid, int mid)`
`static java.lang.Integer` | `getIntegerConstructProperty(int mid, int cid, java.lang.String name)`
`static java.lang.String` | `getMDR_DataSourceName()` Deprecated. use `getDataSourceName()` instead
`static int` | `getModelByName(java.lang.String name)`
`static int` | `getModelForSchema(java.lang.String schemaName)` Retrieve a model for a schema
`static java.lang.String` | `getModelName(int mid)`
`static java.lang.String[]` | `getModelNames()` Gets a list of all modelling language names in the MDR
`static int[]` | `getModels()` Gets a list of all modelling language identifiers in the MDR
`static int` | `getParentType(int tid)`
`static java.lang.String` | `getStringConstructProperty(int mid, int cid, java.lang.String name)`
`static int` | `getTypeId(int mid, java.lang.String typeName)`
`static int[]` | `getTypeIds()` Get the type id of @param type_name in model @param mid
`static int` | `getTypeMID(int tid)`
`static java.lang.String` | `getTypeName(int tid)`
`static DBResultSet` | `getTypesForModel(java.lang.String modelName)` Get the complete rows of `TypeHierarchy` objects for a specific `Model`.
`static boolean` | `isConstructRoot(int cid)`
`static boolean` | `isConstructSchemeKey(int cid, int pos)`
`static void` | `main(java.lang.String[] args)` Executing this class invokes this method which supplies a command line interface to the MDR.
`static void` | `removeConstruct(int cid)` Remove the construct.
`static void` | `removeConstructScheme(int cid, int pos)` Remove the construct.
`static void` | `removeModel(int mid)` Remove the modelling language.
`static void` | `setConstructClass(int cid, int constructClass)`
`static void` | `setConstructConstraint(int cid, java.lang.String constraint_name, java.lang.String constraint_definition)`
`static void` | `setConstructMID(int cid, int mid)` Changes the modelling language that a construct belongs to
`static void` | `setConstructName(int cid, java.lang.String name)`
`static void` | `setConstructProperty(int mid, int cid, java.lang.String name, java.lang.Integer ivalue, java.lang.String svalue)`
`static void` | `setConstructRoot(int cid, boolean isRoot)`
`static void` | `setConstructSchemeArgCID(int cid, int pos, int argCID)`
`static void` | `setConstructSchemeHDMType(int cid, int pos, int HDMType)`
`static void` | `setConstructSchemeKey(int cid, int pos, boolean isKey)`
`static void` | `setConstructSchemeLowerBound(int cid, int pos, int lowerBound)`
`static void` | `setConstructSchemeType(int cid, int pos, int schemeType)`
`static void` | `setConstructSchemeUpperBound(int cid, int pos, int upperBound)`
`static void` | `setDataSourceName(java.lang.String str)` Sets the name of the repository in the local database.
`static void` | `setHdmEquiv(int tid, int hdmEquiv)` Update the hdmEquiv value for a given type
`static void` | `setMDR_DataSourceName(java.lang.String mdr)` Deprecated. use `setDataSourceName()` instead
`static void` | `setModelName(int mid, java.lang.String name)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### MDR_DataSourceName

    public static java.lang.String MDR_DataSourceName

### userName

    public static java.lang.String userName

Constructor Detail

### MDR

    public MDR()

Method Detail

### getDataSourceName

    public static java.lang.String getDataSourceName()

  Returns the name of the repository in the local database.

  Returns:
    the name of the repository in the local database.

### setDataSourceName

    public static void setDataSourceName(java.lang.String str)

  Sets the name of the repository in the local database. This name is set to `MDR` by default.

  Parameters:
    `str` - the name of the repository in the local database.

### getMDR_DataSourceName

    public static java.lang.String getMDR_DataSourceName()

  Deprecated. use `getDataSourceName()` instead

### setMDR_DataSourceName

    public static void setMDR_DataSourceName(java.lang.String mdr)

  Deprecated. use `setDataSourceName()` instead

### main

    public static void main(java.lang.String[] args)

  Executing this class invokes this method which supplies a command line interface to the MDR.

### createModel

    public static int createModel(java.lang.String name)
                           throws java.sql.SQLException,
                                  DSRException,
                                  MDRException,
                                  java.io.IOException

  Creates a new data modelling language which can then have constructs added.

  Parameters:
    `name` - The name of the modelling language
  Returns:
    The MID of the new modelling language
  Throws:
    `MDRException` - If the model name is already in use
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### removeModel

    public static void removeModel(int mid)
                            throws java.sql.SQLException,
                                   DSRException,
                                   MDRException,
                                   java.io.IOException

  Remove the modelling language. If referential constraints are enforced in the database and the key does not have cascading deletes then this will fail if there are any constructs for this modelling language.

  Parameters:
    `mid` - The model identifier of the modelling language to remove
  Throws:
    `MDRException` - If the model with MID=mid does not exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### getModels

    public static int[] getModels()
                           throws java.sql.SQLException,
                                  DSRException,
                                  MDRException,
                                  java.io.IOException

  Gets a list of all modelling language identifiers in the MDR

  Returns:
    An int array of MIDs (Model identifiers)
  Throws:
    `java.sql.SQLException`
    `DSRException`
    `MDRException`
    `java.io.IOException`

### getModelByName

    public static int getModelByName(java.lang.String name)
                              throws java.sql.SQLException,
                                     DSRException,
                                     MDRException,
                                     java.io.IOException

  Parameters:
    `name` - The name of the modelling language. This can include SQL wildcards, if there are more than one matches then the one with the lowest MID will be returned
  Returns:
    The MID (Model identifiers)
  Throws:
    `MDRException` - If the model with MID=mid does not exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### getModelForSchema

    public static int getModelForSchema(java.lang.String schemaName)
                                 throws java.sql.SQLException,
                                        DSRException,
                                        MDRException,
                                        java.io.IOException

  Retrieve a model for a schema

  Parameters:
    `schemaName` - a string representing the schema in question
  Returns:
    int the model identifier
  Throws:
    ``
    `java.sql.SQLException`
    `DSRException`
    `MDRException`
    `java.io.IOException`

### getModelNames

    public static java.lang.String[] getModelNames()
                                            throws java.sql.SQLException,
                                                   DSRException,
                                                   MDRException,
                                                   java.io.IOException

  Gets a list of all modelling language names in the MDR

  Returns:
    A String array of names
  Throws:
    `java.sql.SQLException`
    `DSRException`
    `MDRException`
    `java.io.IOException`

### getModelName

    public static java.lang.String getModelName(int mid)
                                         throws java.sql.SQLException,
                                                DSRException,
                                                MDRException,
                                                java.io.IOException

  Parameters:
    `mid` - The model identifier
  Returns:
    The name of the modelling language
  Throws:
    `MDRException` - If the model with MID=mid does not exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### setModelName

    public static void setModelName(int mid,
                                    java.lang.String name)
                             throws java.sql.SQLException,
                                    DSRException,
                                    MDRException,
                                    java.io.IOException

  Parameters:
    `mid` - The model identifier
    `name` - The new name for the modelling language
  Throws:
    `MDRException` - If the model with MID=mid does not exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### createConstruct

    public static int createConstruct(int mid,
                                      java.lang.String name,
                                      int constructClass,
                                      boolean isRoot)
                               throws java.sql.SQLException,
                                      DSRException,
                                      MDRException,
                                      java.io.IOException

  Creates a new construct for a modelling language

  Parameters:
    `mid` - The modelling language this construct belongs to
    `name` - The name of the new construct,this must not already be in use for this modelling language
    `isRoot` -
  Returns:
    The CID of the new construct
  Throws:
    `MDRException` - If the model with MID=mid does not exist, the constructClass is out of range or the construct name is already in use for the specified model
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### removeConstruct

    public static void removeConstruct(int cid)
                                throws java.sql.SQLException,
                                       DSRException,
                                       MDRException,
                                       java.io.IOException

  Remove the construct. If referential constraints are enforced in the database and the key does not have cascading deletes then this will fail if there are any constructSchemes for this construct

  Parameters:
    `cid` - The construct identifier
  Throws:
    `MDRException` - if the construct doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### getConstructs

    public static int[] getConstructs(int mid)
                               throws java.sql.SQLException,
                                      DSRException,
                                      MDRException,
                                      java.io.IOException

  Get the CIDs of all constructs for a modelling language

  Parameters:
    `mid` - The identifier of model
  Returns:
    An int array of CIDs (construct identifiers)
  Throws:
    `MDRException` - If the model with MID=mid does not exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### getConstructNames

    public static java.lang.String[] getConstructNames(int mid)
                                                throws java.sql.SQLException,
                                                       DSRException,
                                                       MDRException,
                                                       java.io.IOException

  Gets a list of all construct names for a modelling language

  Parameters:
    `The` - model identifier
  Returns:
    A String array of names
  Throws:
    `MDRException` - If the model with MID=mid does not exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### getConstructName

    public static java.lang.String getConstructName(int cid)
                                             throws java.sql.SQLException,
                                                    DSRException,
                                                    MDRException,
                                                    java.io.IOException

  Parameters:
    `cid` - identifier of an existing construct
  Returns:
    The name of the construct
  Throws:
    `MDRException` - if the construct doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### setConstructName

    public static void setConstructName(int cid,
                                        java.lang.String name)
                                 throws java.sql.SQLException,
                                        DSRException,
                                        MDRException,
                                        java.io.IOException

  Parameters:
    `cid` - identifier of an existing construct
    `name` - The new name for the construct
  Throws:
    `MDRException` - if the construct doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### getConstructMID

    public static int getConstructMID(int cid)
                               throws java.sql.SQLException,
                                      DSRException,
                                      MDRException,
                                      java.io.IOException

  Gets the Model Identifier for a given construct

  Parameters:
    `cid` - The construct identifier
  Returns:
    The MID that identifies the model this construct belongs to
  Throws:
    `MDRException` - if the construct doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### setConstructMID

    public static void setConstructMID(int cid,
                                       int mid)
                                throws java.sql.SQLException,
                                       DSRException,
                                       MDRException,
                                       java.io.IOException

  Changes the modelling language that a construct belongs to

  Parameters:
    `cid` - The construct identifier
    `mid` - The new MID for the construct
  Throws:
    `MDRException` - if the construct or the new model doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### getConstructClass

    public static int getConstructClass(int cid)
                                 throws java.sql.SQLException,
                                        DSRException,
                                        MDRException,
                                        java.io.IOException

  Parameters:
    `cid` - The construct identifier
  Returns:
    The class of the construct
  Throws:
    `MDRException` - if the construct doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`
  See Also:
    `Interface Constants for CONSTRUCT_CLASS types`

### setConstructClass

    public static void setConstructClass(int cid,
                                         int constructClass)
                                  throws java.sql.SQLException,
                                         DSRException,
                                         MDRException,
                                         java.io.IOException

  Parameters:
    `cid` - The construct identifier
    `constructClass` - The new class for the construct
  Throws:
    `MDRException` - if the construct doesn't exist or the constructClass is out of range
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`
  See Also:
    `Interface Constants for CONSTRUCT_CLASS types`

### isConstructRoot

    public static boolean isConstructRoot(int cid)
                                   throws java.sql.SQLException,
                                          DSRException,
                                          MDRException,
                                          java.io.IOException

  Parameters:
    `cid` - The construct identifier
  Returns:
    True if the construct is considered part of the modelling language (i.e. is not just a construction to help define another construct)
  Throws:
    `MDRException` - if the construct doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### setConstructRoot

    public static void setConstructRoot(int cid,
                                        boolean isRoot)
                                 throws java.sql.SQLException,
                                        DSRException,
                                        MDRException,
                                        java.io.IOException

  Parameters:
    `cid` - The construct identifier
    `isRoot` - Is this construct a root construct
  Throws:
    `MDRException` - if the construct doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### createConstructScheme

    public static int createConstructScheme(int cid,
                                            int type,
                                            int argCID,
                                            boolean isKey,
                                            int HDMType,
                                            int lowerBound,
                                            int upperBound)
                                     throws java.sql.SQLException,
                                            DSRException,
                                            MDRException,
                                            java.io.IOException

  Creates a new constructScheme argument for a construct

  Parameters:
    `cid` - The construct this scheme is for
    `type` - The type of the scheme argument
    `argCID` - If type is not SCHEME_TYPE_NAME the CID of the construct this type refers to
    `isKey` - Whether or not this argument is required when referring to a construct of type CID
    `HDMType` - The postion and function in the HDM template for the Construct's type that this argument represents or SCHEME_HDM_TYPE_C if it doesn't represent part of the HDM template. Meaningless if the Construct's type is CONSTRUCT_CLASS_CONSTRAINT
    `lowerBound` - The lower bound to how many times this argument can occur in the HDMType position
    `upperBound` - The lower bound to how many times this argument can occur in the HDMType position. If upperBound < lowerBound then there is no upper bound.
  Returns:
    The position of the new construct scheme argument
  Throws:
    `MDRException` - If the construct with CID=cid does not exist or the type or HDMType is out of range.
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`
  See Also:
    `Interface Constants for CONSTRUCT_CLASS, SCHEME_HDM and SCHEME_TYPE types.`

### removeConstructScheme

    public static void removeConstructScheme(int cid,
                                             int pos)
                                      throws java.sql.SQLException,
                                             DSRException,
                                             MDRException,
                                             java.io.IOException

  Remove the construct. If referential constraints are enforced in the database and the key does not have cascading deletes then this will fail if there are any constructSchemes for this construct

  Parameters:
    `cid` - The construct identifier
    `pos` - The position of the scheme argument
  Throws:
    `MDRException` - if the constructScheme doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### getConstructSchemeCount

    public static int getConstructSchemeCount(int cid)
                                       throws java.sql.SQLException,
                                              DSRException,
                                              MDRException,
                                              java.io.IOException

  Gets the count of construct scheme arguments for this construct, the number is also the highest index (argument pos) usable as the construct scheme numbering starts at 1

  Parameters:
    `mid` - The identifier of model
  Returns:
    The count of ConstructScheme rows with CID = cid
  Throws:
    `MDRException` - if the construct scheme doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### getConstructSchemeType

    public static int getConstructSchemeType(int cid,
                                             int pos)
                                      throws java.sql.SQLException,
                                             DSRException,
                                             MDRException,
                                             java.io.IOException

  Parameters:
    `cid` - The construct identifier
    `pos` - The argument position of th construct scheme
  Returns:
    The type of this scheme argument
  Throws:
    `MDRException` - if the construct scheme doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`
  See Also:
    `Interface Constants for CONSTRUCT_CLASS types`

### setConstructSchemeType

    public static void setConstructSchemeType(int cid,
                                              int pos,
                                              int schemeType)
                                       throws java.sql.SQLException,
                                              DSRException,
                                              MDRException,
                                              java.io.IOException

  Parameters:
    `cid` - The construct identifier
    `pos` - The argument position of the construct scheme
    `constructClass` - The new class for the construct
  Throws:
    `MDRException` - if the construct doesn't exist or the constructClass is out of range
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`
  See Also:
    `Interface Constants for CONSTRUCT_CLASS types`

### getConstructSchemeArgCID

    public static int getConstructSchemeArgCID(int cid,
                                               int pos)
                                        throws java.sql.SQLException,
                                               DSRException,
                                               MDRException,
                                               java.io.IOException

  Parameters:
    `cid` - The construct identifier
    `pos` - The argument position of the construct scheme
  Returns:
    The CID of the construct that should be given as the argument in this position of the scheme or 0 to denote none
  Throws:
    `MDRException` - if the construct scheme doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### setConstructSchemeArgCID

    public static void setConstructSchemeArgCID(int cid,
                                                int pos,
                                                int argCID)
                                         throws java.sql.SQLException,
                                                DSRException,
                                                MDRException,
                                                java.io.IOException

  Parameters:
    `cid` - The construct identifier
    `pos` - The argument position of the construct scheme
    `argCID` - The CID of the construct that should be given as the argument in this position of the scheme or 0 to denote none
  Throws:
    `MDRException` - if the construct scheme doesn't exist or the argCID is not 0 and doesn't exist.
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### isConstructSchemeKey

    public static boolean isConstructSchemeKey(int cid,
                                               int pos)
                                        throws java.sql.SQLException,
                                               DSRException,
                                               MDRException,
                                               java.io.IOException

  Parameters:
    `cid` - The construct identifier
    `pos` - The argument position of th construct scheme
  Returns:
    True if the construct scheme argument is needed to identify an instance of the construct
  Throws:
    `MDRException` - if the construct scheme doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### setConstructSchemeKey

    public static void setConstructSchemeKey(int cid,
                                             int pos,
                                             boolean isKey)
                                      throws java.sql.SQLException,
                                             DSRException,
                                             MDRException,
                                             java.io.IOException

  Parameters:
    `cid` - The construct identifier
    `pos` - The argument position of the construct scheme
    `isKey` - if the construct scheme argument is needed to identify an instance of the construct
  Throws:
    `MDRException` - if the construct doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### getConstructSchemeHDMType

    public static int getConstructSchemeHDMType(int cid,
                                                int pos)
                                         throws java.sql.SQLException,
                                                DSRException,
                                                MDRException,
                                                java.io.IOException

  Parameters:
    `cid` - The construct identifier
    `pos` - The argument position of th construct scheme
  Returns:
    The HDM type of this scheme argument
  Throws:
    `MDRException` - if the construct scheme doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`
  See Also:
    `Interface Constants for CONSTRUCT_CLASS types`

### setConstructSchemeHDMType

    public static void setConstructSchemeHDMType(int cid,
                                                 int pos,
                                                 int HDMType)
                                          throws java.sql.SQLException,
                                                 DSRException,
                                                 MDRException,
                                                 java.io.IOException

  Parameters:
    `cid` - The construct identifier
    `pos` - The argument position of the construct scheme
    `HDMType` - The new HDMType for the construct
  Throws:
    `MDRException` - if the construct doesn't exist or the HDMType is out of range
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`
  See Also:
    `Interface Constants for SCHEME_HDM_TYPEs`

### getConstructSchemeLowerBound

    public static int getConstructSchemeLowerBound(int cid,
                                                   int pos)
                                            throws java.sql.SQLException,
                                                   DSRException,
                                                   MDRException,
                                                   java.io.IOException

  Parameters:
    `cid` - The construct identifier
    `pos` - The argument position of th construct scheme
  Returns:
    The lower bound of this scheme argument
  Throws:
    `MDRException` - if the construct scheme doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`
  See Also:
    `Interface Constants for CONSTRUCT_CLASS types`

### setConstructSchemeLowerBound

    public static void setConstructSchemeLowerBound(int cid,
                                                    int pos,
                                                    int lowerBound)
                                             throws java.sql.SQLException,
                                                    DSRException,
                                                    MDRException,
                                                    java.io.IOException

  Parameters:
    `cid` - The construct identifier
    `pos` - The argument position of the construct scheme
    `lowerBound` - the least number of times this argument must be repeated
  Throws:
    `MDRException` - if the construct doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`
  See Also:
    `Interface Constants for SCHEME_HDM_TYPEs`

### getConstructSchemeUpperBound

    public static int getConstructSchemeUpperBound(int cid,
                                                   int pos)
                                            throws java.sql.SQLException,
                                                   DSRException,
                                                   MDRException,
                                                   java.io.IOException

  Parameters:
    `cid` - The construct identifier
    `pos` - The argument position of th construct scheme
  Returns:
    The upper bound of this scheme argument
  Throws:
    `MDRException` - if the construct scheme doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`
  See Also:
    `Interface Constants for CONSTRUCT_CLASS types`

### setConstructSchemeUpperBound

    public static void setConstructSchemeUpperBound(int cid,
                                                    int pos,
                                                    int upperBound)
                                             throws java.sql.SQLException,
                                                    DSRException,
                                                    MDRException,
                                                    java.io.IOException

  Parameters:
    `cid` - The construct identifier
    `pos` - The argument position of the construct scheme
    `upperBound` - the least number of times this argument must be repeated
  Throws:
    `MDRException` - if the construct doesn't exist
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`
  See Also:
    `Interface Constants for SCHEME_HDM_TYPEs`

### cidExists

    public static void cidExists(int cid)
                          throws MDRException,
                                 java.sql.SQLException,
                                 DSRException,
                                 java.io.IOException

  Checks if a particular construct identifier (CID) exists in the MDR.

  Parameters:
    `cid` - construct identifier (CID) of the construct.
  Throws:
    `MDRException` - if no record for the specified CID is found in the MDR.
    `java.sql.SQLException`
    `DSRException`
    `java.io.IOException`

### executeQuery

    public static java.util.Vector executeQuery(java.lang.String sql)

  Execute a SQL query on the repository, and return the result in a `Vector`

  Returns:
    a `Vector` or `Vector`, each of the later representing one row in the result of the SQL query.

### executeUpdate

    public static int executeUpdate(java.lang.String sql)

  Execute a SQL update on the repository.

  Parameters:
    `sql` - Statement to execute on the repository
  Returns:
    the number of rows affected by the update.

### getIntegerConstructProperty

    public static java.lang.Integer getIntegerConstructProperty(int mid,
                                                                int cid,
                                                                java.lang.String name)
                                                         throws NotFoundException

  Throws:
    `NotFoundException`

### getStringConstructProperty

    public static java.lang.String getStringConstructProperty(int mid,
                                                              int cid,
                                                              java.lang.String name)
                                                       throws NotFoundException

  Throws:
    `NotFoundException`

### getConstructProperty

    public static java.lang.Object getConstructProperty(int mid,
                                                        int cid,
                                                        java.lang.String name,
                                                        boolean textual)
                                                 throws NotFoundException

  Throws:
    `NotFoundException`

### setConstructProperty

    public static void setConstructProperty(int mid,
                                            int cid,
                                            java.lang.String name,
                                            java.lang.Integer ivalue,
                                            java.lang.String svalue)
                                     throws NotFoundException

  Throws:
    `NotFoundException`

### getConstructConstraint

    public static java.lang.String getConstructConstraint(int cid,
                                                          java.lang.String constraint_name)
                                                   throws NotFoundException

  Throws:
    `NotFoundException`

### getConstructConstraints

    public static DBResultSet getConstructConstraints(int cid)
                                               throws NotFoundException

  Get all constraints associated to a construct

  Throws:
    `NotFoundException`

### createConstructConstraint

    public static void createConstructConstraint(int cid,
                                                 java.lang.String cname,
                                                 java.lang.String def)

  Create a new construct constraint

### setConstructConstraint

    public static void setConstructConstraint(int cid,
                                              java.lang.String constraint_name,
                                              java.lang.String constraint_definition)
                                       throws NotFoundException

  Throws:
    `NotFoundException`

### getEquivHDMType

    public static int getEquivHDMType(int tid)
                               throws NotFoundException

  Parameters:
    `tid` - The type identifier of a high level type
  Returns:
    The id of the equivalent HDM type
  Throws:
    `NotFoundException` - no HDM equivalent found

### getEquivHighLevelType

    public static int[] getEquivHighLevelType(int tid,
                                              int mid)
                                       throws NotFoundException

  Parameters:
    `tid` - The type identifier of an HDM type
  Returns:
    The id of the equivalent high level type
  Throws:
    `NotFoundException` - no high level equivalent found

### getParentType

    public static int getParentType(int tid)
                             throws NotFoundException

  Parameters:
    `tid` - The type identifier
  Returns:
    The id of the parent type
  Throws:
    `NotFoundException` - no parent found

### getTypeMID

    public static int getTypeMID(int tid)
                          throws NotFoundException

  Parameters:
    `tid` - The type identifier
  Returns:
    The id of the model this type comes from
  Throws:
    `NotFoundException` - no model id found

### getTypeName

    public static java.lang.String getTypeName(int tid)
                                        throws NotFoundException

  Parameters:
    `tid` - The type identifier
  Returns:
    The name of the type
  Throws:
    `NotFoundException` - If the type with TID=tid does not exist

### getTypeId

    public static int getTypeId(int mid,
                                java.lang.String typeName)
                         throws NotFoundException

  Parameters:
    `mid` - The model identifier, @param typeName the type name
  Returns:
    The type id
  Throws:
    `NotFoundException` - If no type found

### getTypeIds

    public static int[] getTypeIds()
                            throws NotFoundException

  Get the type id of @param type_name in model @param mid

  Throws:
    `NotFoundException`

### setHdmEquiv

    public static void setHdmEquiv(int tid,
                                   int hdmEquiv)
                            throws NotFoundException

  Update the hdmEquiv value for a given type

  Parameters:
    `tid` - - the type id of the type to be updated
    `hdmEquiv` - - the id of the equivalent HDM type to this one
  Throws:
    `NotFoundException`

### getTypesForModel

    public static DBResultSet getTypesForModel(java.lang.String modelName)
                                        throws NotFoundException

  Get the complete rows of `TypeHierarchy` objects for a specific
  `Model`. This saves database connection time compared to the method of
  calling separate routines to get one column at a time.

  Parameters:
    `modelName` - the model name used as alternative key to `mid`
  Returns:
    `DBResultSet` a db result set object
  Throws:
    `{@link` - NotFoundException} if no types were found for the associated model
    `NotFoundException`

### getAllTypes

    public static DBResultSet getAllTypes(int mid)
                                   throws NotFoundException

  Get the complete rows of `TypeHierarchy` objects. This saves database
  connection time compared to the method of
  calling separate routines to get one column at a time.

  Returns:
    `DBResultSet` a db result set object
  Throws:
    `{@link` - NotFoundException} if no types were foundl
    `NotFoundException`

### createType

    public static int createType(int modelID,
                                 java.lang.String typeName,
                                 int hdmEquiv,
                                 int parentType)
                          throws NotFoundException

  Create a new record in type hierarchy table

  Returns:
    int the `TypeHierarchy` object
  Throws:
    `NotFoundException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD