public void loadConceptData(String locale){
synchronized (sLoadingLock) {
    if (!locale.equals(sLoadedLocale)) {
      sConceptNames=new HashMap<>();
      try (Cursor c=mContentResolver.query(ConceptNames.CONTENT_URI,new String[]{ConceptNames.CONCEPT_UUID,ConceptNames.NAME},ConceptNames.LOCALE + " = ?",new String[]{locale},null)){
        while (c.moveToNext()) {
          sConceptNames.put(c.getString(0),c.getString(1));
        }
      }
       sConceptTypes=new HashMap<>();
      try (Cursor c=mContentResolver.query(Concepts.CONTENT_URI,new String[]{Concepts.UUID,Concepts.CONCEPT_TYPE},null,null,null)){
        while (c.moveToNext()) {
          try {
            sConceptTypes.put(c.getString(0),ConceptType.valueOf(c.getString(1)));
          }
 catch (          IllegalArgumentException e) {
          }
        }
      }
       sConceptTypes.put(ConceptUuids.ADMISSION_DATE_UUID,ConceptType.DATE);
      sLoadedLocale=locale;
    }
  }
}

public void loadConceptData ( String locale ) { synchronized ( sLoadingLock ) { if ( ! locale . equals ( sLoadedLocale ) ) { sConceptNames = new HashMap < > ( ) ; try ( Cursor c = mContentResolver . query ( ConceptNames . CONTENT_URI , new String [ ] { ConceptNames . CONCEPT_UUID , ConceptNames . NAME } , ConceptNames . LOCALE + " = ?" , new String [ ] { locale } , null ) ) { while ( c . moveToNext ( ) ) { sConceptNames . put ( c . getString ( 0 ) , c . getString ( 1 ) ) ; } } sConceptTypes = new HashMap < > ( ) ; try ( Cursor c = mContentResolver . query ( Concepts . CONTENT_URI , new String [ ] { Concepts . UUID , Concepts . CONCEPT_TYPE } , null , null , null ) ) { while ( c . moveToNext ( ) ) { try { sConceptTypes . put ( c . getString ( 0 ) , ConceptType . valueOf ( c . getString ( 1 ) ) ) ; } catch ( IllegalArgumentException e ) { } } } sConceptTypes . put ( ConceptUuids . ADMISSION_DATE_UUID , ConceptType . DATE ) ; sLoadedLocale = locale ; } } }
loads concept names and types from the app db into hashmaps in memory .
