Examples of addIf()


Examples of org.apache.ws.jaxme.js.JavaMethod.addIf()

    jm.addLine(query, " = ", JavaSource.getQuoted("SELECT DISTINCT"), ";");
    jm.addElse();
    jm.addLine(query, " = ", JavaSource.getQuoted("SELECT"), ";");
    jm.addEndIf();
    jm.addLine(query, " += ", JavaSource.getQuoted(" " + sb + " FROM " + table.getQName()), ";");
    jm.addIf(pQuery, " != null");
    jm.addLine(query, " += ", JavaSource.getQuoted(" WHERE "), " + ", pQuery, ";");
    jm.addEndIf();

    LocalJavaField connection = jm.newJavaField(Connection.class);
    connection.addLine("null");
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaMethod.addIf()

    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, ");");
    }
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaMethod.addIf()

    {
      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

Examples of org.apache.ws.jaxme.js.JavaMethod.addIf()

      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);
        jm.addLine("return (", String.class, ") ", pController.getXMLFieldName(), ".get(", pName, ");");
      }
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaMethod.addIf()

      }
      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");
        jm.addThrowNew(NullPointerException.class, JavaSource.getQuoted("The pValue argument must not be null."));
        jm.addEndIf();
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaMethod.addIf()

      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");
        jm.addThrowNew(NullPointerException.class, JavaSource.getQuoted("The pValue argument must not be null."));
        jm.addEndIf();
        getValidNamespaceCheck(pController, jm, pName);
        jm.addLine(pController.getXMLFieldName(), ".put(", pName, ", ", pValue, ");");
      }
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaMethod.addIf()

      }
      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);
        jm.addLine("return ", pController.getXMLFieldName(), ".remove(", pName, ") != null;");
      }
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaMethod.addIf()

          String handlerMethodName = getXMLHandlersMethodName(particle.getPropertySG());

          JavaField jf = pSource.newJavaField(handlerFieldName, JMHandler.class, JavaSource.PRIVATE);
          JavaMethod jm2 = pSource.newJavaMethod(handlerMethodName, JMHandler.class, "protected");
          jm2.addThrows(SAXException.class);
          jm2.addIf(handlerFieldName, " == null");
         
          ComplexTypeSG childSG = typeSG.getComplexTypeSG();
          JavaQName handlerClassName = childSG.getClassContext().getXMLHandlerName();
          jm2.addTry();
          if (typeSG.isGlobalClass()) {
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaMethod.addIf()

      boolean firstNamespace = true;
      for (Iterator iter = namespaces.iterator();  iter.hasNext()) {
          String uri = (String) iter.next();
          if ("".equals(uri)) {
              jm.addIf(firstNamespace, pNamespaceURI, " == null  ||  ", pNamespaceURI, ".length() == 0");
          } else {
              jm.addIf(firstNamespace, JavaSource.getQuoted(uri), ".equals(", pNamespaceURI, ")");
          }
          firstNamespace = false;
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaMethod.addIf()

      for (Iterator iter = namespaces.iterator();  iter.hasNext()) {
          String uri = (String) iter.next();
          if ("".equals(uri)) {
              jm.addIf(firstNamespace, pNamespaceURI, " == null  ||  ", pNamespaceURI, ".length() == 0");
          } else {
              jm.addIf(firstNamespace, JavaSource.getQuoted(uri), ".equals(", pNamespaceURI, ")");
          }
          firstNamespace = false;

          extendXMLHandlersStartElementMethodAddNamespace(pController, pHandlerVar, pStateVar,
                                                        jm, uri, pNamespaceURI,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.