Package org.apache.juddi.datatype

Examples of org.apache.juddi.datatype.AddressLine


      statement.setInt(3,addressID);

      int listSize = lineList.size();
      for (int lineID=0; lineID<listSize; lineID++)
      {
        AddressLine line = (AddressLine)lineList.elementAt(lineID);
        statement.setInt(4,lineID);
        statement.setString(5,line.getLineValue());
        statement.setString(6,line.getKeyName());
        statement.setString(7,line.getKeyValue());

        if (log.isDebugEnabled()) {
            log.debug("insert into "+ tablePrefix + "ADDRESS_LINE table:\n\n\t" + insertSQL +
              "\n\t BUSINESS_KEY=" + businessKey.toString() +
              "\n\t CONTACT_ID=" + contactID +
              "\n\t ADDRESS_ID=" + addressID +
              "\n\t ADDRESS_LINE_ID=" + lineID +
              "\n\t LINE=" + line.getLineValue() +
              "\n\t KEY_NAME=" + line.getKeyName() +
              "\n\t KEY_VALUE=" + line.getKeyValue() + "\n");
        }

        statement.executeUpdate();
      }
    }
View Full Code Here


      // execute the statement
      resultSet = statement.executeQuery();
      while (resultSet.next())
      {
        AddressLine line = new AddressLine();
        line.setLineValue(resultSet.getString(1));//("LINE")
        line.setKeyName(resultSet.getString(2));//("KEY_NAME"));
        line.setKeyValue(resultSet.getString(3));//("KEY_VALUE"));
        lineList.add(line);
      }

      return lineList;
    }
View Full Code Here

    Address address = new Address();
    address.setUseType("myAddressUseType");
    address.setSortCode("sortThis");
    address.setTModelKey(null);
    address.addAddressLine(new AddressLine("AddressLine1","keyNameAttr","keyValueAttr"));
    address.addAddressLine(new AddressLine("AddressLine2"));

    Contact contact = new Contact();
    contact.setUseType("myAddressUseType");
    contact.setPersonNameValue("Bob Whatever");
    contact.addDescription(new Description("Bob is a big fat jerk"));
View Full Code Here

    Address address = new Address();
    address.setUseType("myAddressUseType");
    address.setSortCode("sortThis");
    address.setTModelKey(null);
    address.addAddressLine(new AddressLine("AddressLine1","keyNameAttr","keyValueAttr"));
    address.addAddressLine(new AddressLine("AddressLine2"));

    Contact contact = new Contact();
    contact.setUseType("myAddressUseType");
    contact.setPersonNameValue("Bob Whatever");
    contact.addDescription(new Description("Bob is a big fat jerk"));
View Full Code Here

    Address address = new Address();
    address.setUseType("myAddressUseType");
    address.setSortCode("sortThis");
    address.setTModelKey(null);
    address.addAddressLine(new AddressLine("AddressLine1","keyNameAttr","keyValueAttr"));
    address.addAddressLine(new AddressLine("AddressLine2"));

    Contact contact = new Contact();
    //contact.setUseType("myAddressUseType");
    contact.setPersonNameValue("Bob Whatever");
    contact.addDescription(new Description("Bob is a big fat jerk"));
View Full Code Here

    // unmarshal & marshal (object->xml->object)
    HandlerMaker maker = HandlerMaker.getInstance();
    AbstractHandler handler = maker.lookup(PropertyHandler.TAG_NAME);
    Element element = null;
    handler.marshal(inprop,element);
    AddressLine outprop = (AddressLine)handler.unmarshal(element);

    // compare unmarshaled with marshaled obj
    if (outprop.equals(inprop))
      System.out.println("Input and output are the same.");
    else
      System.out.println("Input and output are NOT the same!");
  }
View Full Code Here

    Address address = new Address();
    address.setUseType("myAddressUseType");
    address.setSortCode("sortThis");
    address.setTModelKey(null);
    address.addAddressLine(new AddressLine("AddressLine1","keyNameAttr","keyValueAttr"));
    address.addAddressLine(new AddressLine("AddressLine2"));

    Contact contact = new Contact();
    contact.setUseType("myAddressUseType");
    contact.setPersonNameValue("Bob Whatever");
    contact.addDescription(new Description("Bob is a big fat jerk"));
View Full Code Here

    Address address = new Address();
    address.setUseType("myAddressUseType");
    address.setSortCode("sortThis");
    address.setTModelKey(null);
    address.addAddressLine(new AddressLine("AddressLine1","keyNameAttr","keyValueAttr"));
    address.addAddressLine(new AddressLine("AddressLine2"));

    Contact contact = new Contact();
    contact.setUseType("myAddressUseType");
    contact.setPersonNameValue("Bob Whatever");
    contact.addDescription(new Description("Bob is a big fat jerk"));
View Full Code Here

  {
  }

  public RegistryObject unmarshal(Element element)
  {
    AddressLine obj = new AddressLine();

    // Attributes
    String keyName = element.getAttribute("keyName");
    if ((keyName != null) && (keyName.trim().length() > 0))
      obj.setKeyName(keyName);

    String keyValue = element.getAttribute("keyValue");
    if ((keyValue != null) && (keyValue.trim().length() > 0))
      obj.setKeyValue(keyValue);

    // Text Node Value
    obj.setLineValue(XMLUtils.getText(element));

    // Child Elements
    // {none}

    return obj;
View Full Code Here

    return obj;
  }

  public void marshal(RegistryObject object,Element parent)
  {
    AddressLine line = (AddressLine)object;
   
    String generic = getGeneric(null);
    String namespace = getUDDINamespace(generic);
    Element element = parent.getOwnerDocument().createElementNS(namespace,TAG_NAME);

    String keyName = line.getKeyName();
    if ((keyName != null) && (keyName.trim().length() > 0))
      element.setAttribute("keyName",keyName);

    String keyValue = line.getKeyValue();
    if ((keyValue != null) && (keyValue.trim().length() > 0))
      element.setAttribute("keyValue",keyValue);

    String lineValue = line.getLineValue();
    if (lineValue != null)
      element.appendChild(parent.getOwnerDocument().createTextNode(lineValue));

    parent.appendChild(element);
  }
View Full Code Here

TOP

Related Classes of org.apache.juddi.datatype.AddressLine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.