com.ibm.pdp.maf.rpp.pac.blockbase

Interface DRLine

  • All Superinterfaces:
    Element


    public interface DRLine
    extends Element

    A -DR Line specify which SQL objects make up the relational BlockBase (tables, views, index). It displays the type and external name of the object, the code of the Segment representing the BlockBase, the key type supported by the Segment, and the generation code.

    • Method Detail

      • getDRKLines

        java.util.List<DRKLine> getDRKLines()

        This gives you the columns making up the table key or the columns selected in an alter table and indicate an SQL order for the generation.

        Returns:
      • getExternalName

        java.lang.String getExternalName()

        This is the name used by the user. It is prohibited for a primary key (K-type line, DB2, DB2/2, DB2/6000, or DATACOM/DB). It is required for a table space (P type). For all other objects, this name can be defined at several levels. Upon generation, the external name taken into account is, in a decreasing order of priority:

        • The external name defined here,

        • The one defined in the Structure code field on the Segment Definition tab, defining the corresponding object,

        • The code of the Segment defining the corresponding object.

        For a foreign key (J type line), two separate codes are required: The constraint name (8 char. maximum) and the Segment code of the reference table, that is to say, the Segment code of the table line preceding the foreign key.

        Prefixing Mode:

        The presence of a dot in the external name of a table or view determines the prefixing mode for DB2, SQL/DS, DB2/2, and DB2/6000:

        • If you have the external name as PREFIX.NAME, this name is processed as such by Pacbase and the DBMS, that is as explicitly prefixed by you.

        • If the external name does not contain a dot or a prefix, Pacbase prefixes it with your user code (eight characters). The DBMS processes it as such, that is as explicitly prefixed by Pacbase.

        • If you haver the external name as .NAME, Pacbase generates it without the dot so that the DBMS ensures the prefixing.

        Returns:
      • getGCLines

        java.util.List<GLine> getGCLines()

        These lines are used for documentation purposes. Comments are available with all entities. You can write or edit text in relation to the selected instance. You can write, modify, move, or delete text lines using basic word-processing functions.

        Returns:
      • getGenerationTransactionType

        GenerationTransactionTypeValues getGenerationTransactionType()

        The generation transaction type is used to define CREATE, ALTER or DROP statements.

        Returns:
      • getGGLines

        java.util.List<GLine> getGGLines()

        In the -GG lines, you have the information contained in the BlockBase Description lines before they are generated.

        Depending on the type of description line, lines are automatically displayed, in order to guide you when you enter the physical information of the BlockBase. These lines are identified by 'VIRT' or 'GUID' in the last field of the table of the -GG lines. Collectively, these lines are called 'virtual' lines. The lines identified by 'VIRT' are generated. These lines can be overridden.

        The lines will be taken into account at generation time, depending on a G Type.

        • *: comment lines to be generated,

        • V: lines generated before the automatically generated elements,

        • G: line generated instead of the automatically generated elements,

        The description gives the generation elements or comments you want to be generated. Its content depends on the type of BlockBase and type of line selected.

        For relational BlockBases, virtual lines are automatically generated for each SQL record type (table, view, index). They can be overridden so that you can modify the characteristics of a column, insert new lines to specify the source of a column in a view.

        Returns:
      • getKeyType

        KeyTypeValues getKeyType()

        It indicates the type of key to be generated.

        Returns:
      • getReferencedTable

        AbstractSegment getReferencedTable()

        This indicates the segment that references the table of the constraint name for the foreign key

        Returns:
      • getSQLRecordType

        SQLRecordTypeValues getSQLRecordType()

        The type of the SQL object varies according to the BlockBase type of the BlockBase.

        Some SQL objects are not recognized in some BlockBase types:

        The space object is not recognized in SQL SERVER, NONSTOP SQL, DBD2/D2, DB2/600, INTEREL RDBC, INTEREL RFM, and SYBASE. For ALLBASE/SQL, the notion of space has been assimilated to the notion of DBEfileset.

        The alter table object is recognized in INTEREL RFM, but you can only add columns.

        The foreign key object is not recognized in NONSTOP SQL, ORACLE (versions before V6), INTEREL RDBC, and INTEREL RFM.

        Other SQL objects are recognized only in ORACLE V7, SYBASE and SQL SERVER:

        • Package: package of functions and procedures.

        • Function,

        • Procedure,

        • Trigger.

        Objects are related to the space which precedes them. An alter table must follow the table it modifies. An index must follow the table to which it is related. A primary key or foreign key must follow the table which has the same table code. It is not possible to create an index associated with a view; the generated CREATE INDEX command will be rejected when the catalog is updated. For RDMS and ALLBASE/SQL, the primary key is not generated by an I line. It is included in the generation of the table that precedes it (T line). The type of index, primary key or foreign key must not be modified: These lines must be deleted, then created with another type. The table code entered on index, primary key or alter lines must not be modified.

        Returns:
      • getTableOrViewCode

        java.lang.String getTableOrViewCode()

        It indicates the code of the Segment which represents the columns of a table, an alter table, or a view. For an index, a primary or foreign key, you must select the Segment which supports the key. For a table space, this field must be left blank. To enter or modify the contents of this field, click Change. In the dialog box that opens, you can select a Segment in the list or create a Segment in a creation wizard that opens when you click New Segment.

        CAUTION:

        The DB2 or ORACLE BlockBases only can call Segments containing Large Objects in their composition. The LOBs are not compatible with any other BlockBase types

        When you select a Segment, its code is displayed here, followed by its label. An icon is displayed before the Segment code; it shows whether the Segment is a MonoStructure Segment or not.

        Clicking the Segment code switches to the editor of the selected Segment, where you can see its composition for example.

        Returns: