コード例 #1
0
  public DonViHanhChinhSoap getDonViHanhchinhTheoId(Long id) {
    DonViHanhChinh chinh;
    try {
      chinh = DonViHanhChinhLocalServiceUtil.fetchDonViHanhChinh(id);
      if (chinh != null) {
        return DonViHanhChinhSoap.toSoapModel(chinh);
      } else {
        chinh = DonViHanhChinhLocalServiceUtil.fetchDonViHanhChinh(id);
        if (chinh != null) {
          return DonViHanhChinhSoap.toSoapModel(chinh);
        }
      }
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    return null;
  }
コード例 #2
0
  @Override
  public DonViHanhChinhSoap getDonViHanhChinhTheoId(Long donviId) {
    try {
      DonViHanhChinh donViHanhChinh = DonViHanhChinhLocalServiceUtil.fetchDonViHanhChinh(donviId);
      DonViHanhChinhSoap donViHanhChinhSoap = null;
      if (donViHanhChinh != null) {
        donViHanhChinhSoap = DonViHanhChinhSoap.toSoapModel(donViHanhChinh);
      }

      return donViHanhChinhSoap;
    } catch (Exception e) {
      // TODO: handle exception
      e.printStackTrace();
    }
    return null;
  }