Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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
You can’t perform that action at this time.