Package org.apache.ws.jaxme.js

Examples of org.apache.ws.jaxme.js.LocalJavaField.addLine()


        LocalJavaField l = pMethod.newJavaField(long.class);
        l.addLine(pRs, ".getLong(", pParamNum, ")");
        return new Object[]{"(", pRs, ".wasNull() ? null : new Long(", l, ")"};
      } else if (Column.Type.DOUBLE.equals(type)) {
        LocalJavaField d = pMethod.newJavaField(double.class);
        d.addLine(pRs, ".getDouble(", pParamNum, ")");
        return new Object[]{"(", pRs, ".wasNull() ? null : new Double(", d, ")"};
      } else if (Column.Type.FLOAT.equals(type)) {
        LocalJavaField f = pMethod.newJavaField(float.class);
        f.addLine(pRs, ".getFloat(", pParamNum, ")");
        return new Object[]{"(", pRs, ".wasNull() ? null : new Float(", f, ")"};
View Full Code Here


        LocalJavaField d = pMethod.newJavaField(double.class);
        d.addLine(pRs, ".getDouble(", pParamNum, ")");
        return new Object[]{"(", pRs, ".wasNull() ? null : new Double(", d, ")"};
      } else if (Column.Type.FLOAT.equals(type)) {
        LocalJavaField f = pMethod.newJavaField(float.class);
        f.addLine(pRs, ".getFloat(", pParamNum, ")");
        return new Object[]{"(", pRs, ".wasNull() ? null : new Float(", f, ")"};
      } else if (Column.Type.INTEGER.equals(type)) {
        LocalJavaField i = pMethod.newJavaField(int.class);
        i.addLine(pRs, ".getInt(", pParamNum, ")");
        return new Object[]{"(", pRs, ".wasNull() ? null : new Integer(", i, ")"};
View Full Code Here

        LocalJavaField f = pMethod.newJavaField(float.class);
        f.addLine(pRs, ".getFloat(", pParamNum, ")");
        return new Object[]{"(", pRs, ".wasNull() ? null : new Float(", f, ")"};
      } else if (Column.Type.INTEGER.equals(type)) {
        LocalJavaField i = pMethod.newJavaField(int.class);
        i.addLine(pRs, ".getInt(", pParamNum, ")");
        return new Object[]{"(", pRs, ".wasNull() ? null : new Integer(", i, ")"};
      } else if (Column.Type.SMALLINT.equals(type)) {
        LocalJavaField s = pMethod.newJavaField(short.class);
        s.addLine(pRs, ".getShort(", pParamNum, ")");
        return new Object[]{"(", pRs, ".wasNull() ? null : new Short(", s, ")"};
View Full Code Here

        LocalJavaField i = pMethod.newJavaField(int.class);
        i.addLine(pRs, ".getInt(", pParamNum, ")");
        return new Object[]{"(", pRs, ".wasNull() ? null : new Integer(", i, ")"};
      } else if (Column.Type.SMALLINT.equals(type)) {
        LocalJavaField s = pMethod.newJavaField(short.class);
        s.addLine(pRs, ".getShort(", pParamNum, ")");
        return new Object[]{"(", pRs, ".wasNull() ? null : new Short(", s, ")"};
      } else if (Column.Type.TINYINT.equals(type)) {
        LocalJavaField b = pMethod.newJavaField(byte.class);
        b.addLine(pRs, ".getByte(", pParamNum, ")");
        return new Object[]{"(", pRs, ".wasNull() ? null : new Byte(", b, ")"};
View Full Code Here

        LocalJavaField s = pMethod.newJavaField(short.class);
        s.addLine(pRs, ".getShort(", pParamNum, ")");
        return new Object[]{"(", pRs, ".wasNull() ? null : new Short(", s, ")"};
      } else if (Column.Type.TINYINT.equals(type)) {
        LocalJavaField b = pMethod.newJavaField(byte.class);
        b.addLine(pRs, ".getByte(", pParamNum, ")");
        return new Object[]{"(", pRs, ".wasNull() ? null : new Byte(", b, ")"};
      } else {
        throw new IllegalStateException("Unknown column type: " + type);
      }
    }
View Full Code Here

    Table table = pData.getTable();

    String q = table.getSchema().getSQLFactory().newSQLGenerator().getQuery(table.getInsertStatement());
    LocalJavaField query = jm.newJavaField(String.class);
    query.setFinal(true);
    query.addLine(JavaSource.getQuoted(q));

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

    query.setFinal(true);
    query.addLine(JavaSource.getQuoted(q));

    JavaQName qName = pController.getComplexTypeSG().getClassContext().getXMLInterfaceName();
    LocalJavaField elem = jm.newJavaField(qName);
    elem.addLine("(", qName, ") ", pElement);

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

    JavaQName qName = pController.getComplexTypeSG().getClassContext().getXMLInterfaceName();
    LocalJavaField elem = jm.newJavaField(qName);
    elem.addLine("(", qName, ") ", pElement);

    LocalJavaField connection = jm.newJavaField(Connection.class);
    connection.addLine("null");
    jm.addTry();
    jm.addLine(connection, " = getConnection();");
    LocalJavaField stmt = jm.newJavaField(PreparedStatement.class);
    stmt.addLine(connection, ".prepareStatement(", query, ")");
    jm.addTry();
View Full Code Here

    LocalJavaField connection = jm.newJavaField(Connection.class);
    connection.addLine("null");
    jm.addTry();
    jm.addLine(connection, " = getConnection();");
    LocalJavaField stmt = jm.newJavaField(PreparedStatement.class);
    stmt.addLine(connection, ".prepareStatement(", query, ")");
    jm.addTry();
    getPreparedStatementParameters(jm, stmt, elem, table.getColumns(), 0);
    jm.addLine(stmt, ".executeUpdate();");
    getFinally(jm, stmt, null, null);
    getFinally(jm, connection, new Object[]{JavaSource.getQuoted("Failed to execute query "),
View Full Code Here

    Table table = pData.getTable();

    String q = table.getSchema().getSQLFactory().newSQLGenerator().getQuery(table.getUpdateStatement());
    LocalJavaField query = jm.newJavaField(String.class);
    query.setFinal(true);
    query.addLine(JavaSource.getQuoted(q));

    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.