コード例 #1
0
ファイル: ProfileType.java プロジェクト: tourapp/tourapp
 /** 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, DESCRIPTION_KEY);
     keyArea.addKeyField(DESCRIPTION, DBConstants.ASCENDING);
   }
   if (keyArea == null) keyArea = super.setupKey(iKeyArea);
   return keyArea;
 }
コード例 #2
0
ファイル: Country.java プロジェクト: tourapp/tourapp
 /** 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;
 }