Exemplo n.º 1
0
  public Map<String, Ida> genderInterIdaAuto(String interfaceId) {
    Map<String, Ida> result = new HashMap<String, Ida>();
    Ida rootIda = new Ida();
    rootIda.setInterfaceId(interfaceId);
    rootIda.setParentId(null);
    rootIda.setStructName(Constants.ElementAttributes.ROOT_NAME);
    rootIda.setStructAlias(Constants.ElementAttributes.ROOT_ALIAS);
    rootIda.setXpath(Constants.ElementAttributes.ROOT_XPATH);
    rootIda.setState(Constants.IDA_STATE_COMMON);
    idaDAOImpl.save(rootIda);
    result.put(Constants.ElementAttributes.ROOT_NAME, rootIda);

    Ida reqIda = new Ida();
    reqIda.setInterfaceId(interfaceId);
    reqIda.setParentId(rootIda.getId());
    reqIda.setStructName(Constants.ElementAttributes.REQUEST_NAME);
    reqIda.setStructAlias(Constants.ElementAttributes.REQUEST_ALIAS);
    reqIda.setXpath(Constants.ElementAttributes.REQUEST_XPATH);
    reqIda.setSeq(0);
    reqIda.setState(Constants.IDA_STATE_COMMON);
    idaDAOImpl.save(reqIda);
    result.put(Constants.ElementAttributes.REQUEST_NAME, reqIda);

    Ida resIda = new Ida();
    resIda.setInterfaceId(interfaceId);
    resIda.setParentId(rootIda.getId());
    resIda.setSeq(1);
    resIda.setStructName(Constants.ElementAttributes.RESPONSE_NAME);
    resIda.setStructAlias(Constants.ElementAttributes.RESPONSE_ALIAS);
    resIda.setXpath(Constants.ElementAttributes.RESPONSE_XPATH);
    resIda.setState(Constants.IDA_STATE_COMMON);
    idaDAOImpl.save(resIda);
    result.put(Constants.ElementAttributes.RESPONSE_NAME, resIda);
    return result;
  }
Exemplo n.º 2
0
 public IdaMappingBean(Ida ida) {
   setId(ida.getId());
   setStructName(ida.getStructName());
   setStructAlias(ida.getStructAlias());
   setMetadataId(ida.getMetadataId());
   setSeq(ida.getSeq());
   setXpath(ida.getXpath());
   if (ida.getType() != null) {
     if (ida.getLength() != null) {
       setType(ida.getType() + "(" + ida.getLength() + ")");
     } else {
       setType(ida.getType());
     }
   }
   setScale(ida.getScale());
   setLength(ida.getLength());
   setRequired(ida.getRequired());
   set_parentId(ida.getParentId());
   setInterfaceId(ida.getInterfaceId());
   setPotUser(ida.getPotUser());
   setPotDate(ida.getPotDate());
   setHeadId(ida.getHeadId());
   setVersion(ida.getVersion());
   setRemark(ida.getRemark());
 }