// Lấy danh sách vùng 2 theo vùng 1 @Override public List<PartitionDetail> getPartitionDetailByPartition(Partition1 partition1) { List<PartitionDetail> list = new ArrayList<PartitionDetail>(); List<PartitionDetail> list1 = mydao.getAllData(PartitionDetail.class); if (!list1.isEmpty()) { for (PartitionDetail bean : list1) { if (bean.getIdPartition1().equals(partition1.getIdPartition1())) { list.add(bean); } } } return list; }
@Override public boolean deletePartitionDetail(PartitionDetail partitionDetail) { if (mydao.deleteData(PartitionDetail.class, partitionDetail.getIdPartitionDetail())) { return true; } return false; }