예제 #1
0
 private void deletePreferedByCity() {
   preferenceDao
       .queryBuilder()
       .where(
           DBPreferenceDao.Properties.City.eq(city.toUpperCase()),
           DBPreferenceDao.Properties.Country.eq(country),
           DBPreferenceDao.Properties.State.eq(province))
       .buildDelete()
       .executeDeleteWithoutDetachingEntities();
 }
예제 #2
0
  private void loadSavedAttrList() {
    List<DBPreference> preferedCompanyInThisCity =
        preferenceDao
            .queryBuilder()
            .where(
                DBPreferenceDao.Properties.City.eq(city.toUpperCase()),
                DBPreferenceDao.Properties.Country.eq(country),
                DBPreferenceDao.Properties.State.eq(province))
            .list();

    if (preferedCompanyInThisCity.size() == 0) {
      preferedAttrList = "";
    } else {
      preferedAttrList = preferedCompanyInThisCity.get(0).getAttributeList();
    }
  }