Examples of ForeignKeyConstraintDescriptor


Examples of org.apache.derby.iapi.sql.dictionary.ForeignKeyConstraintDescriptor

    ** all others get a row in SYSKEYS.
    */
    if (descriptor.getConstraintType()
        == DataDictionary.FOREIGNKEY_CONSTRAINT)
    {
      ForeignKeyConstraintDescriptor fkDescriptor =
          (ForeignKeyConstraintDescriptor)descriptor;

      if (SanityManager.DEBUG)
      {
        if (!(descriptor instanceof ForeignKeyConstraintDescriptor))
        {
          SanityManager.THROWASSERT("descriptor not an fk descriptor, is "+
            descriptor.getClass().getName());
        }
      }
     
      ti = getNonCoreTI(SYSFOREIGNKEYS_CATALOG_NUM);
      SYSFOREIGNKEYSRowFactory fkkeysRF = (SYSFOREIGNKEYSRowFactory)ti.getCatalogRowFactory();

      row = fkkeysRF.makeRow(fkDescriptor, null);

      /*
      ** Now we need to bump the reference count of the
      ** contraint that this FK references
      */
      ReferencedKeyConstraintDescriptor refDescriptor =
              fkDescriptor.getReferencedConstraint();

      refDescriptor.incrementReferenceCount();

      int[] colsToSet = new int[1];
      colsToSet[0] = SYSCONSTRAINTSRowFactory.SYSCONSTRAINTS_REFERENCECOUNT;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.