Examples of addThrows()


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

  }

  protected JavaMethod getXMLHandlersNewResultMethod(ComplexTypeSG pController, JavaSource pSource) {
    JavaQName elementInterfaceClass = pController.getClassContext().getXMLInterfaceName();
    JavaMethod jm = pSource.newJavaMethod("newResult", elementInterfaceClass, JavaSource.PROTECTED);
    jm.addThrows(SAXException.class);
    if (pController.getClassContext().isGlobal()) {
      jm.addTry();
      jm.addLine("return (", elementInterfaceClass, ") getData().getFactory().getElement(",
                 elementInterfaceClass, ".class);");
      DirectAccessible e = jm.addCatch(JAXBException.class);
View Full Code Here

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

    JavaMethod jm = pSource.newJavaMethod("startElement", void.class, JavaSource.PUBLIC);
    DirectAccessible pNamespaceURI = jm.addParam(String.class, "pNamespaceURI");
    DirectAccessible pLocalName = jm.addParam(String.class, "pLocalName");
    DirectAccessible pQName = jm.addParam(String.class, "pQName");
    DirectAccessible pAttr = jm.addParam(Attributes.class, "pAttr");
    jm.addThrows(SAXException.class);

    jm.addSwitch(pLevelVar, "++");
    jm.addCase("0");

    jm.addLine("setResult(newResult());");
View Full Code Here

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

        Context typeContext = myTypeSG.getComplexTypeSG().getClassContext();
        js.addExtends(typeContext.getXMLHandlerName());
        JavaQName xmlElementInterface = pController.getClassContext().getXMLInterfaceName();
        JavaQName resultInterface = typeContext.getXMLInterfaceName();
        JavaMethod jm = js.newJavaMethod("newResult", resultInterface, JavaSource.PROTECTED);
        jm.addThrows(SAXException.class);
        jm.addTry();
        jm.addLine("return (", resultInterface, ") getData().getFactory().getElement(",
                   xmlElementInterface, ".class);");
        DirectAccessible e = jm.addCatch(JAXBException.class);
        jm.addThrowNew(SAXException.class, e);
View Full Code Here

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

   */
  protected JavaMethod getInsertRowMethod(JavaSource pSource, TableInfo pTableInfo) {
    Table table = pTableInfo.getTable();
    JavaMethod jm = pSource.newJavaMethod(getInsertRowMethodName(pTableInfo),
                                          Object[].class, JavaSource.PRIVATE);
    jm.addThrows(SQLException.class);
    DirectAccessible connection = jm.addParam(Connection.class, "pConn");
    DirectAccessible map = jm.addParam(Map.class, "pMap");
    DirectAccessible values = jm.addParam(Object[].class, "pValue");

    logFinestEntering(jm, values);
View Full Code Here

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

   */
  protected JavaMethod getInnerInsertRowMethod(JavaSource pSource, TableInfo pTableInfo) {
    Table table = pTableInfo.getTable();
    JavaMethod jm = pSource.newJavaMethod(getInsertRowMethodName(pTableInfo),
                                          JavaQNameImpl.VOID, JavaSource.PRIVATE);
    jm.addThrows(SQLException.class);
    DirectAccessible connection = jm.addParam(Connection.class, "pConn");
    DirectAccessible values = jm.addParam(Object[].class, "pValue");

    logFinestEntering(jm, null);

View Full Code Here

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

      headTable = (TableInfo) iter.next();
    }
  
    JavaQName resultType = JavaQNameImpl.getInstance(Object[].class);
    JavaMethod jm = pSource.newJavaMethod("clone", resultType, JavaSource.PUBLIC);
    jm.addThrows(SQLException.class);
    JavaComment jc = jm.newComment();
    jc.addLine("<p>This method takes as input the key values of a row in the table " +
               headTable.getTable().getQName() + ".");
    jc.addLine("The key values are given by the array <code>pRow</code>:");
    jc.addLine("<ul>");
View Full Code Here

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

     JavaSourceFactory factory = new JavaSourceFactory();
     JavaSource js = factory.newJavaSource(JavaQNameImpl.getInstance("com.foo", "Bar"), JavaSource.PUBLIC);
     JavaMethod main = js.newJavaMethod("main", JavaQNameImpl.VOID, JavaSource.PUBLIC);
     main.addParam(String[].class, "pArgs");
     main.setStatic(true);
     main.addThrows(Exception.class);
     main.addFor(int.class, " i = 1;  i < 10;  i++");
     main.newPlaceHolder("test", pAutoMode);
     main.addEndFor();
     js.setDynamicImports(true);
     return js;
View Full Code Here

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

  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);
    query.setFinal(true);
View Full Code Here

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

  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);
    query.setFinal(true);
View Full Code Here

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

  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);
    elem.addLine("(", qName, ") ", pElement);
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.