예제 #1
0
  private void updateBranch(Branch branch, BranchRestInfoFull branchRestInfo) {
    Address address;

    branch.setName(branchRestInfo.getName());
    branch.setDescription(branchRestInfo.getDescription());
    branch.setPhoneNumber(branchRestInfo.getPhoneNumber());
    branch.setFaxNumber(branchRestInfo.getFaxNumber());

    address = getAddress(branchRestInfo);
    branch.setAddress(address);
  }
예제 #2
0
  private Branch createBranch(BranchRestInfoFull branchRestInfo) throws ResourceException {
    Address address;
    Branch branch = new Branch();

    // copy fields from rest info
    branch.setName(branchRestInfo.getName());
    branch.setDescription(branchRestInfo.getDescription());

    address = getAddress(branchRestInfo);
    branch.setAddress(address);

    return branch;
  }
예제 #3
0
  private void updateBranch(Branch branch, BranchRestInfoFull branchRestInfo) {
    Address address;
    String tempString;

    // do not allow empty name
    tempString = branchRestInfo.getName();
    if (!tempString.isEmpty()) {
      branch.setName(tempString);
    }

    branch.setDescription(branchRestInfo.getDescription());

    address = getAddress(branchRestInfo);
    branch.setAddress(address);
  }