Package org.apache.derby.catalog

Examples of org.apache.derby.catalog.ReferencedColumns


    String          type = null;
    String          enabled = null;
    String          triggerDefinition = null;
    String          oldReferencingName = null;
    String          newReferencingName = null;
    ReferencedColumns rcd = null;
    boolean          referencingOld = false;
    boolean          referencingNew = false;

    if (td != null)
    {
View Full Code Here


    boolean          isBefore;
    boolean          isRow;
    boolean          isEnabled;
    boolean          referencingOld;
    boolean          referencingNew;
    ReferencedColumns rcd;
    TriggerDescriptor    descriptor;
    DataDescriptorGenerator  ddg = dd.getDataDescriptorGenerator();

    if (SanityManager.DEBUG)
    {
      SanityManager.ASSERT(row.nColumns() == SYSTRIGGERS_COLUMN_COUNT,
                 "Wrong number of columns for a SYSTRIGGERS row");
    }

    // 1st column is TRIGGERID (UUID - char(36))
    col = row.getColumn(1);
    uuidStr = col.getString();
    uuid = getUUIDFactory().recreateUUID(uuidStr);

    // 2nd column is TRIGGERNAME (varchar(128))
    col = row.getColumn(2);
    name = col.getString();

    // 3rd column is SCHEMAID (UUID - char(36))
    col = row.getColumn(3);
    uuidStr = col.getString();
    suuid = getUUIDFactory().recreateUUID(uuidStr);

    // 4th column is CREATIONTIMESTAMP (TIMESTAMP)
    col = row.getColumn(4);
    createTime = (Timestamp) col.getObject();

    // 5th column is EVENT (char(1))
    col = row.getColumn(5);
    theChar = col.getString().charAt(0);
    switch (theChar)
    {
      case 'U':
            eventMask = TriggerDescriptor.TRIGGER_EVENT_UPDATE;
            break;

      case 'I':
            eventMask = TriggerDescriptor.TRIGGER_EVENT_INSERT;
            break;

      case 'D':
            eventMask = TriggerDescriptor.TRIGGER_EVENT_DELETE;
            break;

      default:
          if (SanityManager.DEBUG
          {
            SanityManager.THROWASSERT("bad event mask: "+theChar);
          }
    }
   
    // 6th column is FIRINGTIME (char(1))
    isBefore = getCharBoolean(row.getColumn(6), 'B', 'A');

    // 7th column is TYPE (char(1))
    isRow = getCharBoolean(row.getColumn(7), 'R', 'S');

    // 8th column is STATE (char(1))
    isEnabled = getCharBoolean(row.getColumn(8), 'E', 'D');

    // 9th column is TABLEID (UUID - char(36))
    col = row.getColumn(9);
    uuidStr = col.getString();
    tuuid = getUUIDFactory().recreateUUID(uuidStr);

    // 10th column is WHENSTMTID (UUID - char(36))
    col = row.getColumn(10);
    uuidStr = col.getString();
    if (uuidStr != null)
      whenSPSID = getUUIDFactory().recreateUUID(uuidStr);

    // 11th column is ACTIONSTMTID (UUID - char(36))
    col = row.getColumn(11);
    uuidStr = col.getString();
    if (uuidStr != null)
      actionSPSID = getUUIDFactory().recreateUUID(uuidStr);

    // 12th column is REFERENCEDCOLUMNS user type org.apache.derby.catalog.ReferencedColumns
    col = row.getColumn(12);
    rcd = (ReferencedColumns) col.getObject();

    // 13th column is TRIGGERDEFINITION (longvarhar)
    col = row.getColumn(13);
    triggerDefinition = col.getString();

    // 14th column is REFERENCINGOLD (boolean)
    col = row.getColumn(14);
    referencingOld = col.getBoolean();

    // 15th column is REFERENCINGNEW (boolean)
    col = row.getColumn(15);
    referencingNew = col.getBoolean();

    // 16th column is REFERENCINGNAME (varchar(128))
    col = row.getColumn(16);
    oldReferencingName = col.getString();

    // 17th column is REFERENCINGNAME (varchar(128))
    col = row.getColumn(17);
    newReferencingName = col.getString();

    descriptor = new TriggerDescriptor(
                  dd,
                  dd.getSchemaDescriptor(suuid, null),
                  uuid,
                  name,
                  eventMask,
                  isBefore,
                  isRow,
                  isEnabled,
                  dd.getTableDescriptor(tuuid),
                  whenSPSID,
                  actionSPSID,
                  createTime,
                  (rcd == null) ? (int[])null : rcd.getReferencedColumnPositions(),
                  triggerDefinition,
                  referencingOld,
                  referencingNew,
                  oldReferencingName,
                  newReferencingName
View Full Code Here

            int[] refCols,
            SchemaDescriptor schemaDesc,
            boolean isEnabled
            )
  {
    ReferencedColumns referencedColumns = new ReferencedColumnsDescriptorImpl(refCols);
    return new CheckConstraintDescriptor(dataDictionary, table, constraintName,
        deferrable, initiallyDeferred,
        constraintId,
        constraintText, referencedColumns, schemaDesc, isEnabled);
  }
View Full Code Here

            int[] refCols,
            SchemaDescriptor schemaDesc,
            boolean isEnabled
            )
  {
    ReferencedColumns referencedColumns = new ReferencedColumnsDescriptorImpl(refCols);
    return new CheckConstraintDescriptor(dataDictionary, table, constraintName,
        deferrable, initiallyDeferred,
        constraintId,
        constraintText, referencedColumns, schemaDesc, isEnabled);
  }
View Full Code Here

  public ExecRow makeRow(TupleDescriptor  td, TupleDescriptor parent)
          throws StandardException
  {
    DataValueDescriptor    col;
    ExecIndexRow      row;
    ReferencedColumns rcd = null;
    String          checkDefinition = null;
    String          constraintID = null;

    if (td != null)
    {
View Full Code Here

        "Wrong number of columns for a SYSCHECKS row");
    }

    DataValueDescriptor    col;
    DataDescriptorGenerator ddg;
    ReferencedColumns  referencedColumns;
    String        constraintText;
    String        constraintUUIDString;
    UUID        constraintUUID;

    ddg = dd.getDataDescriptorGenerator();
View Full Code Here

            int[] refCols,
            SchemaDescriptor schemaDesc,
            boolean isEnabled
            )
  {
    ReferencedColumns referencedColumns = new ReferencedColumnsDescriptorImpl(refCols);
    return new CheckConstraintDescriptor(dataDictionary, table, constraintName,
        deferrable, initiallyDeferred,
        constraintId,
        constraintText, referencedColumns, schemaDesc, isEnabled);
  }
View Full Code Here

  public ExecRow makeRow(TupleDescriptor  td, TupleDescriptor parent)
          throws StandardException
  {
    DataValueDescriptor    col;
    ExecIndexRow      row;
    ReferencedColumns rcd = null;
    String          checkDefinition = null;
    String          constraintID = null;

    if (td != null)
    {
View Full Code Here

        "Wrong number of columns for a SYSCHECKS row");
    }

    DataValueDescriptor    col;
    DataDescriptorGenerator ddg;
    ReferencedColumns  referencedColumns;
    String        constraintText;
    String        constraintUUIDString;
    UUID        constraintUUID;

    ddg = dd.getDataDescriptorGenerator();
View Full Code Here

    String          type = null;
    String          enabled = null;
    String          triggerDefinition = null;
    String          oldReferencingName = null;
    String          newReferencingName = null;
    ReferencedColumns rcd = null;
    boolean          referencingOld = false;
    boolean          referencingNew = false;

    if (td != null)
    {
View Full Code Here

TOP

Related Classes of org.apache.derby.catalog.ReferencedColumns

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.