Exemple #1
0
 /** Add this key area description to the Record. */
 public KeyArea setupKey(int iKeyArea) {
   KeyArea keyArea = null;
   if (iKeyArea == 0) {
     keyArea = this.makeIndex(DBConstants.UNIQUE, ID_KEY);
     keyArea.addKeyField(ID, DBConstants.ASCENDING);
   }
   if (keyArea == null) keyArea = super.setupKey(iKeyArea);
   return keyArea;
 }
Exemple #2
0
 /** Add this key area description to the Record. */
 public KeyArea setupKey(int iKeyArea) {
   KeyArea keyArea = null;
   if (iKeyArea == 0) {
     keyArea = this.makeIndex(DBConstants.UNIQUE, ID_KEY);
     keyArea.addKeyField(ID, DBConstants.ASCENDING);
   }
   if (iKeyArea == 1) {
     keyArea = this.makeIndex(DBConstants.NOT_UNIQUE, NAME_KEY);
     keyArea.addKeyField(NAME, DBConstants.ASCENDING);
   }
   if (iKeyArea == 2) {
     keyArea = this.makeIndex(DBConstants.SECONDARY_KEY, CODE_KEY);
     keyArea.addKeyField(CODE, DBConstants.ASCENDING);
   }
   if (iKeyArea == 3) {
     keyArea = this.makeIndex(DBConstants.NOT_UNIQUE, REGION_ID_KEY);
     keyArea.addKeyField(REGION_ID, DBConstants.ASCENDING);
     keyArea.addKeyField(NAME, DBConstants.ASCENDING);
   }
   if (keyArea == null) keyArea = super.setupKey(iKeyArea);
   return keyArea;
 }