1 21 22 package org.apache.derby.iapi.sql.dictionary; 23 24 25 import org.apache.derby.catalog.UUID; 26 import org.apache.derby.iapi.services.sanity.SanityManager; 27 28 37 38 public class SubKeyConstraintDescriptor extends SubConstraintDescriptor 39 { 40 46 47 UUID indexId; 49 UUID keyConstraintId; 50 51 int raDeleteRule; int raUpdateRule; 54 55 61 public SubKeyConstraintDescriptor(UUID constraintId, UUID indexId) 62 { 63 super(constraintId); 64 this.indexId = indexId; 65 } 66 67 74 public SubKeyConstraintDescriptor(UUID constraintId, UUID indexId, UUID keyConstraintId) 75 { 76 this(constraintId, indexId); 77 this.keyConstraintId = keyConstraintId; 78 } 79 80 81 90 public SubKeyConstraintDescriptor(UUID constraintId, UUID indexId, UUID 91 keyConstraintId, int raDeleteRule, int raUpdateRule) 92 { 93 this(constraintId, indexId); 94 this.keyConstraintId = keyConstraintId; 95 this.raDeleteRule = raDeleteRule; 96 this.raUpdateRule = raUpdateRule; 97 } 98 99 100 101 102 103 108 public UUID getIndexId() 109 { 110 return indexId; 111 } 112 113 118 public UUID getKeyConstraintId() 119 { 120 return keyConstraintId; 121 } 122 123 128 public boolean hasBackingIndex() 129 { 130 return true; 131 } 132 133 138 public int getRaDeleteRule() 139 { 140 return raDeleteRule; 141 } 142 143 144 149 public int getRaUpdateRule() 150 { 151 return raUpdateRule; 152 } 153 154 155 156 161 162 public String toString() 163 { 164 if (SanityManager.DEBUG) 165 { 166 return "indexId: " + indexId + "\n" + 167 "keyConstraintId: " + keyConstraintId + "\n" + 168 "raDeleteRule: " + raDeleteRule + "\n" + 169 "raUpdateRule: " + raUpdateRule + "\n" + 170 super.toString(); 171 } 172 else 173 { 174 return ""; 175 } 176 } 177 178 } 179 | Popular Tags |