コード例 #1
0
 @Override
 public boolean deletePartitionDetail(PartitionDetail partitionDetail) {
   if (mydao.deleteData(PartitionDetail.class, partitionDetail.getIdPartitionDetail())) {
     return true;
   }
   return false;
 }
コード例 #2
0
 @Override
 public boolean updatePartitionDetail(PartitionDetail partitionDetail) {
   if (mydao.updateData(partitionDetail)) {
     return true;
   }
   return false;
 }
コード例 #3
0
 @Override
 public boolean insertPartitionDetail(PartitionDetail partitionDetail) {
   if (mydao.insertData(partitionDetail)) {
     return true;
   }
   return false;
 }
コード例 #4
0
 // 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;
 }
コード例 #5
0
 @Override
 public List<PartitionDetail> filterPartitionDetailByName(String name) {
   List<PartitionDetail> list = new ArrayList<PartitionDetail>();
   List<Object> obs = new ArrayList<Object>();
   obs = mydao.filterByCondition(PartitionDetail.class, "namePartitionDetail", name);
   if (!obs.isEmpty()) {
     int i;
     for (i = 0; i < obs.size(); i++) {
       list.add((PartitionDetail) obs.get(i));
     }
   }
   return list;
 }
コード例 #6
0
 @Override
 public List<PartitionDetail> getAllPartitionDetail() {
   List<PartitionDetail> list = new ArrayList<PartitionDetail>();
   List<Object> obs = new ArrayList<Object>();
   obs = mydao.getAllData(PartitionDetail.class);
   if (!obs.isEmpty()) {
     int i;
     for (i = 0; i < obs.size(); i++) {
       list.add((PartitionDetail) obs.get(i));
     }
   }
   return list;
 }
コード例 #7
0
 @Override
 public PartitionDetail getPartitionDetailID(String id) {
   return (PartitionDetail) mydao.getByID(PartitionDetail.class, id);
 }