예제 #1
0
 /*----------------------------------------------------------------------------------------------------*/
 private void addEnglishTASEInstruments(List<Instrument> databaseInstruments) {
   HashSet<Instrument> taseInstrumentSet = taseDatasource.getAllTASEInstrumentsCVSEnglish();
   for (Instrument instrument : taseInstrumentSet) {
     if (databaseInstruments.contains(instrument)) continue;
     databaseInstruments.add(instrument);
   }
 }
예제 #2
0
 /*----------------------------------------------------------------------------------------------------*/
 private void addHebrewTASEInstrumentFields(List<Instrument> databaseInstruments) {
   HashSet<Instrument> taseHebrewInstrumentSet = taseDatasource.getAllTASEInstrumentsCVSHebrew();
   for (Instrument instrument : taseHebrewInstrumentSet) {
     HashSet<Instrument> dbInstrumentSet = new HashSet<>();
     String taseInstrumentNumber = instrument.getIsin();
     for (Instrument databaseInstrument : databaseInstruments) {
       String isin = databaseInstrument.getIsin();
       if (isin.contains(taseInstrumentNumber)) {
         dbInstrumentSet.add(databaseInstrument);
       }
     }
     if (dbInstrumentSet.isEmpty() || dbInstrumentSet.size() > 1) {
       LOGGER.error("This ISIN Has Probably More Than One Like: " + instrument);
       continue;
     }
     Instrument dbInstrument = (Instrument) dbInstrumentSet.toArray()[0];
     dbInstrument.addInstrumentNameField(
         instrument.getInstrumentNameFieldForLocale("iw", Instrument.INSTRUMENT_NAME_FIELD_TYPE));
     dbInstrument.addInstrumentNameField(
         instrument.getInstrumentNameFieldForLocale(
             "iw", Instrument.INSTRUMENT_ASSET_CLASS_FIELD_TYPE));
   }
 }