method2testcases stringlengths 118 6.63k |
|---|
### Question:
MotherRepository extends DrishtiRepository { @Override protected void onCreate(SQLiteDatabase database) { database.execSQL(MOTHER_SQL); database.execSQL(MOTHER_TYPE_INDEX_SQL); database.execSQL(MOTHER_REFERENCE_DATE_INDEX_SQL); } void add(Mother mother); void switchToPNC(String caseId); List<Mother> allA... |
### Question:
MotherRepository extends DrishtiRepository { public void add(Mother mother) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.insert(MOTHER_TABLE_NAME, null, createValuesFor(mother, TYPE_ANC)); } void add(Mother mother); void switchToPNC(String caseId); List<Mother> allANCs(); ... |
### Question:
MotherRepository extends DrishtiRepository { public void update(Mother mother) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.update(MOTHER_TABLE_NAME, createValuesFor(mother, TYPE_ANC), ID_COLUMN + " = ?", new String[]{mother.caseId()}); } void add(Mother mother); void swit... |
### Question:
MotherRepository extends DrishtiRepository { public List<Mother> allANCs() { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = database.query(MOTHER_TABLE_NAME, MOTHER_TABLE_COLUMNS, TYPE_COLUMN + " = ? AND " + IS_CLOSED_COLUMN + " = ?", new String[]{TYPE_ANC, NOT_CLOSED}, ... |
### Question:
MotherRepository extends DrishtiRepository { public List<Mother> allPNCs() { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = database.query(MOTHER_TABLE_NAME, MOTHER_TABLE_COLUMNS, TYPE_COLUMN + " =" + " ? AND " + IS_CLOSED_COLUMN + " = ?", new String[]{TYPE_PNC, NOT_CLOS... |
### Question:
MotherRepository extends DrishtiRepository { public List<Mother> findAllCasesForEC(String ecCaseId) { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = database .query(MOTHER_TABLE_NAME, MOTHER_TABLE_COLUMNS, EC_CASEID_COLUMN + " = ?", new String[]{ecCaseId}, null, null, nu... |
### Question:
MotherRepository extends DrishtiRepository { public Mother findById(String entityId) { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = database .query(MOTHER_TABLE_NAME, MOTHER_TABLE_COLUMNS, ID_COLUMN + " = ?", new String[]{entityId}, null, null, null, null); return read... |
### Question:
MotherRepository extends DrishtiRepository { public Mother findMotherWithOpenStatusByECId(String ecId) { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = database.query(MOTHER_TABLE_NAME, MOTHER_TABLE_COLUMNS, EC_CASEID_COLUMN + " = ? AND " + IS_CLOSED_COLUMN + " = ?", new... |
### Question:
MotherRepository extends DrishtiRepository { public Mother findOpenCaseByCaseID(String caseId) { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = database.query(MOTHER_TABLE_NAME, MOTHER_TABLE_COLUMNS, ID_COLUMN + " = ? AND " + IS_CLOSED_COLUMN + " = ?", new String[]{caseI... |
### Question:
MotherRepository extends DrishtiRepository { public List<Mother> findByCaseIds(String... caseIds) { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = database.rawQuery( String.format("SELECT * FROM %s WHERE %s IN (%s)", MOTHER_TABLE_NAME, ID_COLUMN, insertPlaceholdersForInC... |
### Question:
MotherRepository extends DrishtiRepository { public List<Pair<Mother, EligibleCouple>> allMothersOfATypeWithEC(String type) { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = database.rawQuery( "SELECT " + tableColumnsForQuery(MOTHER_TABLE_NAME, MOTHER_TABLE_COLUMNS) + ", ... |
### Question:
MotherRepository extends DrishtiRepository { public void closeAllCasesForEC(String ecCaseId) { List<Mother> mothers = findAllCasesForEC(ecCaseId); for (Mother mother : mothers) { close(mother.caseId()); } } void add(Mother mother); void switchToPNC(String caseId); List<Mother> allANCs(); Mother findById(... |
### Question:
LocationRepository extends BaseRepository { public void addOrUpdate(Location location) { if (StringUtils.isBlank(location.getId())) throw new IllegalArgumentException("id not provided"); ContentValues contentValues = new ContentValues(); contentValues.put(ID, location.getId()); contentValues.put(UUID, loc... |
### Question:
LocationRepository extends BaseRepository { public List<Location> getAllLocations() { Cursor cursor = null; List<Location> locations = new ArrayList<>(); try { cursor = getReadableDatabase().rawQuery("SELECT * FROM " + getLocationTableName(), null); while (cursor.moveToNext()) { locations.add(readCursor(c... |
### Question:
LocationRepository extends BaseRepository { public List<Location> getLocationsByParentId(String parentId) { return getLocationsByParentId(parentId, getLocationTableName()); } static void createTable(SQLiteDatabase database); void addOrUpdate(Location location); void deleteLocations(@NonNull Set<String> l... |
### Question:
LocationRepository extends BaseRepository { public Location getLocationById(String id) { return getLocationById(id, getLocationTableName()); } static void createTable(SQLiteDatabase database); void addOrUpdate(Location location); void deleteLocations(@NonNull Set<String> locationIdentifiers); List<Locati... |
### Question:
LocationRepository extends BaseRepository { public Location getLocationByUUId(String uuid) { Cursor cursor = null; try { cursor = getReadableDatabase().rawQuery("SELECT * FROM " + getLocationTableName() + " WHERE " + UUID + " =?", new String[]{uuid}); if (cursor.moveToFirst()) { return readCursor(cursor);... |
### Question:
LocationRepository extends BaseRepository { public Location getLocationByName(String name) { Cursor cursor = null; try { cursor = getReadableDatabase().rawQuery("SELECT * FROM " + getLocationTableName() + " WHERE " + NAME + " =?", new String[]{name}); if (cursor.moveToFirst()) { return readCursor(cursor);... |
### Question:
LocationRepository extends BaseRepository { public List<Location> getLocationsByIds(List<String> ids) { return getLocationsByIds(ids, true); } static void createTable(SQLiteDatabase database); void addOrUpdate(Location location); void deleteLocations(@NonNull Set<String> locationIdentifiers); List<Locati... |
### Question:
LocationRepository extends BaseRepository { public List<Location> getLocationsByTagName(String tagName) { LocationTagRepository locationTagRepository = new LocationTagRepository(); List<LocationTag> locationTags = locationTagRepository.getLocationTagsByTagName(tagName); List<String> locationIds = location... |
### Question:
ManifestRepository extends BaseRepository { public void addOrUpdate(Manifest manifest) { ContentValues contentValues = new ContentValues(); if (manifest.getId() != null) contentValues.put(ID, manifest.getId()); contentValues.put(VERSION, manifest.getVersion()); contentValues.put(APP_VERSION, manifest.getA... |
### Question:
ManifestRepository extends BaseRepository { public List<Manifest> getAllManifests() { List<Manifest> manifests = new ArrayList<>(); try (Cursor cursor = getReadableDatabase().rawQuery("SELECT * FROM " + getManifestTableName() + " ORDER BY " + CREATED_AT + " DESC ", null)) { while (cursor.moveToNext()) { m... |
### Question:
ManifestRepository extends BaseRepository { public List<Manifest> getManifestByAppVersion(String appVersion) { List<Manifest> manifests = new ArrayList<>(); try (Cursor cursor = getReadableDatabase().rawQuery("SELECT * FROM " + getManifestTableName() + " WHERE " + APP_VERSION + " =?", new String[]{appVers... |
### Question:
ManifestRepository extends BaseRepository { public Manifest getActiveManifest() { try (Cursor cursor = getReadableDatabase().rawQuery("SELECT * FROM " + getManifestTableName() + " WHERE " + ACTIVE + " =?", new String[]{"1"})) { if (cursor.moveToFirst()) { return readCursor(cursor); } } catch (Exception e)... |
### Question:
Hia2ReportRepository extends BaseRepository { public List<JSONObject> getUnSyncedReports(int limit) { List<JSONObject> reports = new ArrayList<JSONObject>(); String query = "select " + report_column.json + "," + report_column.syncStatus + " from " + Table.hia2_report.name() + " where " + report_column.syn... |
### Question:
Hia2ReportRepository extends BaseRepository { public List<String> getUnValidatedReportFormSubmissionIds(int limit) { List<String> ids = new ArrayList<String>(); final String validateFilter = " where " + report_column.syncStatus + " = ? " + " AND ( " + report_column.validationStatus + " is NULL or " + repo... |
### Question:
Hia2ReportRepository extends BaseRepository { public void addReport(JSONObject jsonObject) { try { ContentValues values = new ContentValues(); values.put(report_column.json.name(), jsonObject.toString()); values.put(report_column.reportType.name(), jsonObject.has(report_column.reportType.name()) ? jsonObj... |
### Question:
Hia2ReportRepository extends BaseRepository { public void markReportsAsSynced(List<JSONObject> syncedReports) { try { if (syncedReports != null && !syncedReports.isEmpty()) { for (JSONObject report : syncedReports) { String formSubmissionId = report.getString(report_column.formSubmissionId .name()); markR... |
### Question:
DetailsRepository extends DrishtiRepository { @Override protected void onCreate(SQLiteDatabase database) { database.execSQL(SQL); } void add(String baseEntityId, String key, String value, Long timestamp); Map<String, String> getAllDetailsForClient(String baseEntityId); Map<String, String> updateDetails(C... |
### Question:
DetailsRepository extends DrishtiRepository { public void add(String baseEntityId, String key, String value, Long timestamp) { SQLiteDatabase database = masterRepository.getWritableDatabase(); Boolean exists = getIdForDetailsIfExists(baseEntityId, key, value); if (exists == null) { return; } ContentValues... |
### Question:
DetailsRepository extends DrishtiRepository { public Map<String, String> getAllDetailsForClient(String baseEntityId) { Cursor cursor = null; Map<String, String> clientDetails = new HashMap<String, String>(); try { SQLiteDatabase db = masterRepository.getReadableDatabase(); String query = "SELECT * FROM " ... |
### Question:
DetailsRepository extends DrishtiRepository { public Map<String, String> updateDetails(CommonPersonObjectClient commonPersonObjectClient) { Map<String, String> details = getAllDetailsForClient(commonPersonObjectClient.entityId()); details.putAll(commonPersonObjectClient.getColumnmaps()); if (commonPersonO... |
### Question:
DetailsRepository extends DrishtiRepository { public boolean deleteDetails(String baseEntityId) { try { SQLiteDatabase db = masterRepository.getWritableDatabase(); int afftectedRows = db .delete(TABLE_NAME, BASE_ENTITY_ID_COLUMN + " = ?", new String[]{baseEntityId}); if (afftectedRows > 0) { return true; ... |
### Question:
AllBeneficiaries { public Mother findMotherWithOpenStatus(String caseId) { return motherRepository.findOpenCaseByCaseID(caseId); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
AlertRepository alertRepository, TimelineEventRepository
... |
### Question:
AllBeneficiaries { public Mother findMother(String caseId) { List<Mother> mothers = motherRepository.findByCaseIds(caseId); if (mothers.isEmpty()) { return null; } return mothers.get(0); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
Aler... |
### Question:
AllBeneficiaries { public Mother findMotherByECCaseId(String ecCaseId) { List<Mother> mothers = motherRepository.findAllCasesForEC(ecCaseId); if (mothers.isEmpty()) { return null; } return mothers.get(0); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
... |
### Question:
AllBeneficiaries { public List<Child> findAllChildrenByCaseIDs(List<String> caseIds) { return childRepository.findChildrenByCaseIds(caseIds.toArray(new String[caseIds.size()])); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
AlertReposito... |
### Question:
AllBeneficiaries { public List<Child> allChildrenWithMotherAndEC() { return childRepository.allChildrenWithMotherAndEC(); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
AlertRepository alertRepository, TimelineEventRepository
... |
### Question:
AllBeneficiaries { public List<Child> findAllChildrenByECId(String ecId) { return childRepository.findAllChildrenByECId(ecId); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
AlertRepository alertRepository, TimelineEventRepository
... |
### Question:
AllBeneficiaries { public Mother findMotherWithOpenStatusByECId(String ecId) { return motherRepository.findMotherWithOpenStatusByECId(ecId); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
AlertRepository alertRepository, TimelineEventRepo... |
### Question:
AllBeneficiaries { public boolean isPregnant(String ecId) { return motherRepository.isPregnant(ecId); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
AlertRepository alertRepository, TimelineEventRepository
... |
### Question:
AllBeneficiaries { public void switchMotherToPNC(String entityId) { motherRepository.switchToPNC(entityId); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
AlertRepository alertRepository, TimelineEventRepository
... |
### Question:
AllBeneficiaries { public List<Mother> findAllMothersByCaseIDs(List<String> caseIds) { return motherRepository.findByCaseIds(caseIds.toArray(new String[caseIds.size()])); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
AlertRepository aler... |
### Question:
AllBeneficiaries { public List<Child> findAllChildrenByMotherId(String entityId) { return childRepository.findByMotherCaseId(entityId); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
AlertRepository alertRepository, TimelineEventRepositor... |
### Question:
AllBeneficiaries { public Child findChild(String caseId) { return childRepository.find(caseId); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
AlertRepository alertRepository, TimelineEventRepository
ti... |
### Question:
AllBeneficiaries { public long ancCount() { return motherRepository.ancCount(); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
AlertRepository alertRepository, TimelineEventRepository
timelineEventRepos... |
### Question:
AllBeneficiaries { public long pncCount() { return motherRepository.pncCount(); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
AlertRepository alertRepository, TimelineEventRepository
timelineEventRepos... |
### Question:
AllBeneficiaries { public long childCount() { return childRepository.count(); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
AlertRepository alertRepository, TimelineEventRepository
timelineEventReposit... |
### Question:
AllBeneficiaries { public List<Pair<Mother, EligibleCouple>> allANCsWithEC() { return motherRepository.allMothersOfATypeWithEC(TYPE_ANC); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
AlertRepository alertRepository, TimelineEventReposit... |
### Question:
AllBeneficiaries { public List<Pair<Mother, EligibleCouple>> allPNCsWithEC() { return motherRepository.allMothersOfATypeWithEC(TYPE_PNC); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
AlertRepository alertRepository, TimelineEventReposit... |
### Question:
AllBeneficiaries { public void closeMother(String entityId) { alertRepository.deleteAllAlertsForEntity(entityId); timelineEventRepository.deleteAllTimelineEventsForEntity(entityId); motherRepository.close(entityId); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
... |
### Question:
AllBeneficiaries { public void closeAllMothersForEC(String ecId) { List<Mother> mothers = motherRepository.findAllCasesForEC(ecId); if (mothers == null || mothers.isEmpty()) { return; } for (Mother mother : mothers) { closeMother(mother.caseId()); } } AllBeneficiaries(MotherRepository motherRepository, Ch... |
### Question:
AllBeneficiaries { public void closeChild(String entityId) { alertRepository.deleteAllAlertsForEntity(entityId); timelineEventRepository.deleteAllTimelineEventsForEntity(entityId); childRepository.close(entityId); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
... |
### Question:
AllBeneficiaries { public void updateChild(Child child) { childRepository.update(child); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
AlertRepository alertRepository, TimelineEventRepository
timelineE... |
### Question:
AllBeneficiaries { public void updateMother(Mother mother) { motherRepository.update(mother); } AllBeneficiaries(MotherRepository motherRepository, ChildRepository childRepository,
AlertRepository alertRepository, TimelineEventRepository
time... |
### Question:
AllSharedPreferences { public void updateANMUserName(String userName) { preferences.edit().putString(ANM_IDENTIFIER_PREFERENCE_KEY, userName).commit(); Set<String> anmIdentifiers = new HashSet<>(preferences.getStringSet(ANM_IDENTIFIER_SET_PREFERENCE_KEY, new HashSet<>())); anmIdentifiers.add(userName); pr... |
### Question:
AllSharedPreferences { public boolean fetchForceRemoteLogin(String username) { return preferences.getBoolean(new StringBuffer(AllConstants.FORCE_REMOTE_LOGIN).append('_').append(username).toString(), true); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); Str... |
### Question:
AllSharedPreferences { public String fetchServerTimeZone() { return preferences.getString(AllConstants.SERVER_TIMEZONE, null); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String userName); boolean fetc... |
### Question:
AllSharedPreferences { public void saveServerTimeZone(String serverTimeZone) { preferences.edit().putString(AllConstants.SERVER_TIMEZONE, serverTimeZone).commit(); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegiste... |
### Question:
AllSharedPreferences { public String fetchPioneerUser() { return preferences.getString(AllConstants.PIONEER_USER, null); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String userName); boolean fetchForce... |
### Question:
AllSharedPreferences { public Long fetchLastUpdatedAtDate(long lastSyncDate) { return preferences.getLong(LAST_UPDATED_AT_DATE, lastSyncDate); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String userNam... |
### Question:
AllSharedPreferences { public void saveLastUpdatedAtDate(long lastSyncDate) { preferences.edit().putLong(LAST_UPDATED_AT_DATE, lastSyncDate).commit(); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String... |
### Question:
AllSharedPreferences { public String fetchCurrentLocality() { return preferences.getString(AllConstants.CURRENT_LOCALITY, null); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String userName); boolean fe... |
### Question:
AllSharedPreferences { public void saveCurrentLocality(String currentLocality) { preferences.edit().putString(AllConstants.CURRENT_LOCALITY, currentLocality).commit(); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isReg... |
### Question:
AllSharedPreferences { public String fetchCurrentDataStrategy() { return preferences.getString(AllConstants.DATA_STRATEGY, AllConstants.DATA_CAPTURE_STRATEGY.NORMAL); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegi... |
### Question:
AllSharedPreferences { public void saveCurrentDataStrategy(String currentDataStrategy) { preferences.edit().putString(AllConstants.DATA_STRATEGY, currentDataStrategy).commit(); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); bool... |
### Question:
AllSharedPreferences { public void saveLanguagePreference(String languagePreference) { preferences.edit().putString(AllConstants.LANGUAGE_PREFERENCE_KEY, languagePreference).commit(); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(... |
### Question:
AllSharedPreferences { public String fetchBaseURL(String baseurl) { String url = preferences.getString(AllConstants.DRISHTI_BASE_URL, baseurl); return StringUtils.isNotBlank(url) && url.endsWith("/") ? url.substring(0, url.length() - 1) : url; } AllSharedPreferences(SharedPreferences preferences); void up... |
### Question:
AllSharedPreferences { public void savePreference(String key, String value) { preferences.edit().putString(key, value).commit(); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String userName); boolean fe... |
### Question:
AllSharedPreferences { public String getPreference(String key) { return preferences.getString(key, ""); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String userName); boolean fetchForceRemoteLogin(Strin... |
### Question:
AllSharedPreferences { public void updateANMPreferredName(String userName, String preferredName) { preferences.edit().putString(userName, preferredName).commit(); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegister... |
### Question:
AllSharedPreferences { public String getANMPreferredName(String userName) { return preferences.getString(userName, ""); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String userName); boolean fetchForceR... |
### Question:
AllSharedPreferences { public String fetchHost(String host) { if ((host == null || host.isEmpty()) && preferences.getString(HOST, host).equals(host)) { updateUrl(fetchBaseURL("")); } return preferences.getString(HOST, host); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(Str... |
### Question:
AllSharedPreferences { public Integer fetchPort(Integer port) { return Integer.parseInt(preferences.getString(PORT, "" + port)); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String userName); boolean fe... |
### Question:
AllSharedPreferences { public void savePioneerUser(String username) { preferences.edit().putString(AllConstants.PIONEER_USER, username).commit(); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String user... |
### Question:
AllSharedPreferences { public void saveDefaultLocalityId(String username, String localityId) { if (username != null) { preferences.edit().putString(AllConstants.DEFAULT_LOCALITY_ID_PREFIX + username, localityId) .commit(); } } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(Str... |
### Question:
AllSharedPreferences { public String fetchDefaultLocalityId(String username) { if (username != null) { return preferences.getString(AllConstants.DEFAULT_LOCALITY_ID_PREFIX + username, null); } return null; } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); Stri... |
### Question:
AllSharedPreferences { public void saveForceRemoteLogin(boolean forceRemoteLogin, String username) { preferences.edit().putBoolean(new StringBuffer(AllConstants.FORCE_REMOTE_LOGIN).append('_').append(username).toString(), forceRemoteLogin).commit(); } AllSharedPreferences(SharedPreferences preferences); v... |
### Question:
AllSharedPreferences { public String fetchRegisteredANM() { return preferences.getString(ANM_IDENTIFIER_PREFERENCE_KEY, "").trim(); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String userName); boolean... |
### Question:
AllSharedPreferences { public String fetchLanguagePreference() { return preferences.getString(AllConstants.LANGUAGE_PREFERENCE_KEY, AllConstants.DEFAULT_LOCALE).trim(); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRe... |
### Question:
AllSharedPreferences { public Boolean fetchIsSyncInProgress() { return preferences.getBoolean(AllConstants.IS_SYNC_IN_PROGRESS_PREFERENCE_KEY, false); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String... |
### Question:
AllSharedPreferences { public void saveIsSyncInProgress(Boolean isSyncInProgress) { preferences.edit().putBoolean(AllConstants.IS_SYNC_IN_PROGRESS_PREFERENCE_KEY, isSyncInProgress).commit(); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegiste... |
### Question:
AllSharedPreferences { public Boolean fetchIsSyncInitial() { return preferences.getBoolean(AllConstants.IS_SYNC_INITIAL_KEY, false); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String userName); boolea... |
### Question:
AllSharedPreferences { public void saveUserLocalityId(String username, String localityId) { if (username != null) { preferences.edit().putString(AllConstants.USER_LOCALITY_ID_PREFIX + username, localityId) .commit(); } } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String us... |
### Question:
AllSharedPreferences { public String fetchUserLocalityId(String username) { if (username != null) { return preferences.getString(AllConstants.USER_LOCALITY_ID_PREFIX + username, null); } return null; } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fet... |
### Question:
AllSharedPreferences { public void saveDefaultTeam(String username, String team) { if (username != null) { preferences.edit().putString(AllConstants.DEFAULT_TEAM_PREFIX + username, team) .commit(); } } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fet... |
### Question:
AllSharedPreferences { public String fetchDefaultTeam(String username) { if (username != null) { return preferences.getString(AllConstants.DEFAULT_TEAM_PREFIX + username, null); } return null; } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegis... |
### Question:
AllSharedPreferences { public String fetchDefaultTeamId(String username) { if (username != null) { return preferences.getString(AllConstants.DEFAULT_TEAM_ID_PREFIX + username, null); } return null; } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetch... |
### Question:
AllSharedPreferences { public Long fetchLastSyncDate(long lastSyncDate) { return preferences.getLong(LAST_SYNC_DATE, lastSyncDate); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String userName); boolean... |
### Question:
AllSharedPreferences { public void saveLastSyncDate(long lastSyncDate) { preferences.edit().putLong(LAST_SYNC_DATE, lastSyncDate).commit(); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String userName);... |
### Question:
AllSharedPreferences { public void saveIsSyncInitial(boolean initialSynStatus) { preferences.edit().putBoolean(AllConstants.IS_SYNC_INITIAL_KEY, initialSynStatus).commit(); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean ... |
### Question:
AllSharedPreferences { public long fetchLastCheckTimeStamp() { return preferences.getLong(LAST_CHECK_TIMESTAMP, 0); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String userName); boolean fetchForceRemot... |
### Question:
AllSharedPreferences { public void updateLastCheckTimeStamp(long lastSyncTimeStamp) { preferences.edit().putLong(LAST_CHECK_TIMESTAMP, lastSyncTimeStamp).commit(); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegiste... |
### Question:
AllSharedPreferences { public void updateLastSettingsSyncTimeStamp(long lastSettingsSync) { preferences.edit().putLong(LAST_SETTINGS_SYNC_TIMESTAMP, lastSettingsSync).commit(); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); bool... |
### Question:
AllSharedPreferences { public long fetchLastSettingsSyncTimeStamp() { return preferences.getLong(LAST_SETTINGS_SYNC_TIMESTAMP, 0); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String userName); boolean ... |
### Question:
AllSharedPreferences { public boolean isMigratedToSqlite4() { return preferences.getBoolean(MIGRATED_TO_SQLITE_4, false); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String userName); boolean fetchForc... |
### Question:
AllSharedPreferences { public void setMigratedToSqlite4() { preferences.edit().putBoolean(MIGRATED_TO_SQLITE_4, true).commit(); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String userName); boolean fet... |
### Question:
AllSharedPreferences { public int getLastPeerToPeerSyncProcessedEvent() { return preferences.getInt(PEER_TO_PEER_SYNC_LAST_PROCESSED_RECORD, -1); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String user... |
### Question:
AllSharedPreferences { public void setLastPeerToPeerSyncProcessedEvent(int lastEventRowId) { preferences.edit().putInt(PEER_TO_PEER_SYNC_LAST_PROCESSED_RECORD, lastEventRowId).commit(); } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredAN... |
### Question:
AllSharedPreferences { public boolean isPeerToPeerUnprocessedEvents() { return getLastPeerToPeerSyncProcessedEvent() != -1; } AllSharedPreferences(SharedPreferences preferences); void updateANMUserName(String userName); String fetchRegisteredANM(); boolean isRegisteredANM(String userName); boolean fetchFo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.