/** * Override this to open the main file. * <p />You should pass this record owner to the new main file (ie., new MyNewTable(thisRecordOwner)). * @return The new record. */ public Record openMainRecord() { return new Region(this); }
/** * Constructor. */ public Region(RecordOwner screen) { this(); this.init(screen); } /**
/** * 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 (iKeyArea == 2) { keyArea = this.makeIndex(DBConstants.NOT_UNIQUE, CONTINENT_ID_KEY); keyArea.addKeyField(CONTINENT_ID, DBConstants.ASCENDING); keyArea.addKeyField(DESCRIPTION, DBConstants.ASCENDING); } if (keyArea == null) keyArea = super.setupKey(iKeyArea); return keyArea; }
/** * Override this to open the main file. * <p />You should pass this record owner to the new main file (ie., new MyNewTable(thisRecordOwner)). * @return The new record. */ public Record openMainRecord() { return new Region(this); } /**
/** * Get (or make) the current record for this reference. */ public Record makeReferenceRecord(RecordOwner recordOwner) { return new Region(recordOwner); } /**
/** * Override this to open other session files. */ public void openOtherRecords() { super.openOtherRecords(); new Region(this); new Country(this); new State(this); new City(this); } /**
recLocation = new Continent(this); else if (Region.REGION_FILE.equalsIgnoreCase(strRecordName)) recLocation = new Region(this); else if (Country.COUNTRY_FILE.equalsIgnoreCase(strRecordName)) recLocation = new Country(this);