Skip to content

Instantly share code, notes, and snippets.

@engr-erum
Created June 12, 2018 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save engr-erum/aa142387796fb1c3b449619d4e6b7418 to your computer and use it in GitHub Desktop.
Save engr-erum/aa142387796fb1c3b449619d4e6b7418 to your computer and use it in GitHub Desktop.
public static List<CustomerDailyStockData> getCustomerStockDataByCustomerId(int customerMasterId) {
Realm realm = Realm.getDefaultInstance();
RealmResults<CustomerDailyStockData> stockDatas = realm.where(CustomerDailyStockData.class).equalTo(CustomerDailyStockData.CUSTOMER_MASTER_ID, customerMasterId).findAll();
if (stockDatas != null) {
List<CustomerDailyStockData> stockDatasList = (List<CustomerDailyStockData>) realm.copyFromRealm(stockDatas);
return stockDatasList;
}
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment