Package org.apache.ws.jaxme.js

Examples of org.apache.ws.jaxme.js.Parameter


  }

  protected JavaMethod getPMClassInsertMethod(TypeSG pController, JavaSource pSource, CustomTableData pData)
      throws SAXException {
    JavaMethod jm = pSource.newJavaMethod("insert", JavaQNameImpl.VOID, JavaSource.PUBLIC);
    Parameter pElement = jm.addParam(Element.class, "pElement");
    jm.addThrows(PMException.class);
    Table table = pData.getTable();

    String q = table.getSchema().getSQLFactory().newSQLGenerator().getQuery(table.getInsertStatement());
    LocalJavaField query = jm.newJavaField(String.class);
View Full Code Here


  }

  protected JavaMethod getPMClassUpdateMethod(TypeSG pController, JavaSource pSource, CustomTableData pData)
      throws SAXException {
    JavaMethod jm = pSource.newJavaMethod("update", JavaQNameImpl.VOID, JavaSource.PUBLIC);
    Parameter pElement = jm.addParam(Element.class, "pElement");
    jm.addThrows(PMException.class);
    Table table = pData.getTable();

    String q = table.getSchema().getSQLFactory().newSQLGenerator().getQuery(table.getUpdateStatement());
    LocalJavaField query = jm.newJavaField(String.class);
View Full Code Here

  }

  protected JavaMethod getPMClassDeleteMethod(TypeSG pController, JavaSource pSource, CustomTableData pData)
      throws SAXException {
    JavaMethod jm = pSource.newJavaMethod("delete", JavaQNameImpl.VOID, JavaSource.PUBLIC);
    Parameter pElement = jm.addParam(Element.class, "pElement");
    jm.addThrows(PMException.class);
    Table table = pData.getTable();

    JavaQName qName = pController.getComplexTypeSG().getClassContext().getXMLInterfaceName();
    LocalJavaField elem = jm.newJavaField(qName);
View Full Code Here

  }

  protected JavaMethod getPMClassSelectMethod(TypeSG pController, JavaSource pSource, CustomTableData pData)
      throws SAXException {
    JavaMethod jm = pSource.newJavaMethod("select", JavaQNameImpl.VOID, JavaSource.PUBLIC);
    Parameter pObserver = jm.addParam(Observer.class, "pObserver");
    Parameter pQuery = jm.addParam(String.class, "pQuery");
    Parameter pParams = jm.addParam(PMParams.class, "pParams");
    jm.addThrows(PMException.class);
    Table table = pData.getTable();

    JavaQName qName = pController.getComplexTypeSG().getClassContext().getXMLInterfaceName();
    StringBuffer sb = new StringBuffer();
View Full Code Here

          throw new IllegalStateException("No such placeholder: 'GroupSG' in method 'startElement'");
      }
      placeHolder.remove();

      Parameter[] parameters = jm.getParams();
      Parameter pNamespaceURI = parameters[0];
      Parameter pLocalName = parameters[1];
      Parameter pQName = parameters[2];
      Parameter pAttr = parameters[3];
     
      jm.addCase("1");
      Set namespaces = new HashSet();
      for (int i = 0;  i < myParticles.length;  i++) {
          ParticleSG child = myParticles[i];
View Full Code Here

                 JAXBContext.class, ".newInstance(",
                 JavaSource.getQuoted(pPackageName), ");");

    JavaMethod newInstanceMethod = js.newJavaMethod("newInstance", Object.class, "public");
    newInstanceMethod.addThrows(JAXBException.class);
    Parameter pElementInterface = newInstanceMethod.addParam(Class.class, "pElementInterface");
    newInstanceMethod.addLine("return ", jf, ".getElement(", pElementInterface, ");");

    {
      JavaMethod getPropertyMethod = js.newJavaMethod("getProperty", Object.class, "public");
      Parameter pName = getPropertyMethod.addParam(String.class, "pName");
      getPropertyMethod.addIf(properties, " == null");
      getPropertyMethod.addLine("return null;");
      getPropertyMethod.addEndIf();
      getPropertyMethod.addLine("return ", properties, ".get(", pName, ");");
    }

    {
      JavaMethod setPropertyMethod = js.newJavaMethod("setProperty", void.class, "public");
      Parameter pName = setPropertyMethod.addParam(String.class, "pName");
      Parameter pValue = setPropertyMethod.addParam(Object.class, "pValue");
      setPropertyMethod.addIf(properties, " == null");
      setPropertyMethod.addLine(properties, " = new ", HashMap.class, "();");
      setPropertyMethod.addEndIf();
      setPropertyMethod.addLine(properties, ".put(", pName, ", ", pValue, ");");
    }
View Full Code Here

      jc.addLine("@return Attribute value or null, if the attribute is not set.");
      jc.addLine("@throws NullPointerException The <code>pName</code> argument is null.");
      if (!namespaceList.isAny()) {
          jc.addLine("@throws IllegalArgumentException The namespace <code>pName.getNamespaceURI()</code> is invalid.");
      }
      Parameter pName = jm.addParam(QName.class, "pName");
      if (!pSource.isInterface()) {
        jm.addIf(pName, " == null");
        jm.addThrowNew(NullPointerException.class, JavaSource.getQuoted("The pName argument must not be null."));
        jm.addEndIf();
        getValidNamespaceCheck(pController, jm, pName);
View Full Code Here

      jc.addLine("<p>Sets the 'anyAttribute' named <code>pName</code> to the value <code>pValue</code>.</p>");
      if (!namespaceList.isAny()) {
          jc.addLine("@throws IllegalArgumentException The namespace <code>pName.getNamespaceURI()</code> is invalid.");
      }
      jc.addLine("@throws NullPointerException Either of the arguments <code>pName</code> or <code>pValue</code> is null.");
      Parameter pName = jm.addParam(QName.class, "pName");
      Parameter pValue = jm.addParam(String.class, "pValue");
      if (!pSource.isInterface()) {
        jm.addIf(pName, " == null");
        jm.addThrowNew(NullPointerException.class, JavaSource.getQuoted("The pName argument must not be null."));
        jm.addEndIf();
        jm.addIf(pValue, " == null");
View Full Code Here

      if (!namespaceList.isAny()) {
          jc.addLine("@throws IllegalArgumentException The namespace <code>pName.getNamespaceURI()</code> is invalid.");
      }
      jc.addLine("@throws NullPointerException Either of the arguments <code>pName</code> or <code>pValue</code> is null.");
      jc.addLine("@return True, if the attribute was set, otherwise false.");
      Parameter pName = jm.addParam(QName.class, "pName");
      if (!pSource.isInterface()) {
        jm.addIf(pName, " == null");
        jm.addThrowNew(NullPointerException.class, JavaSource.getQuoted("The pName argument must not be null."));
        jm.addEndIf();
        getValidNamespaceCheck(pController, jm, pName);
View Full Code Here

  }

  protected JavaMethod getXMLSerializersMarshalChildsMethod(ComplexTypeSG pController, JavaSource pSource) throws SAXException {
      JavaMethod jm = pSource.newJavaMethod("marshalChilds", void.class, JavaSource.PUBLIC);
      jm.addThrows(SAXException.class);
      Parameter pData = jm.addParam(JMXmlSerializer.Data.class, "pData");
      Parameter pElement = jm.addParam(Object.class, "pElement");
      JavaQName elementInterface = pController.getClassContext().getXMLInterfaceName();
      LocalJavaField element = jm.newJavaField(elementInterface);
      element.addLine("(", elementInterface, ") ", pElement);
      LocalJavaField chars = jm.newJavaField(String.class);
      SimpleContentSG simpleContent = pController.getSimpleContentSG();
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.js.Parameter

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.