Package java.lang

Examples of java.lang.Integer$IntegerCache


      stmt.setBigDecimal(pos, new BigDecimal(p.getValue()));
    }

    if (type.equalsIgnoreCase("boolean"))
    {
      Integer i = new Integer( p.getValue() );
      boolean b = ((i.intValue() != 0) ? false : true);
      stmt.setBoolean(pos, b);
    }

    if (type.equalsIgnoreCase("bytes"))
    {
View Full Code Here


public class MysqlAutoIncrementHelper implements AutoIncrementHelper, ThreadSafe {
   
    public Object getPostValue( Configuration tableConf, Configuration columnConf, Configuration modeConf,
                                Connection conn, Statement stmt, Request request throws SQLException, ConfigurationException {

        Integer id = null;
        /*
          // if mysql did support callable statements ...  i'm not sure what what would go here, maybe:

          CallableStatement callStmt = conn.prepareCall("? = {CALL LAST_INSERT_ID()}");
          callStmt.registerOutParameter(1, Types.INTEGER);
          ResultSet resultSet = callStmt.executeQuery();
        */
       
        PreparedStatement pstmt = conn.prepareStatement("SELECT LAST_INSERT_ID()");
        ResultSet resultSet = pstmt.executeQuery();
        while ( resultSet.next() ) {
            id = new Integer(resultSet.getInt(1));
        }
        resultSet.close();
       
        return id;
    }
View Full Code Here

        int maxid = set.getInt("maxid");
        set.close();
        select_statement.close();
        if (getLogger().isDebugEnabled())
            getLogger().debug("autoincrementValue " + (maxid+1));
        return new Integer(maxid + 1);
    }
View Full Code Here

   
    public Object getPostValue( Configuration tableConf, Configuration columnConf, Configuration modeConf,
                                Connection conn, Statement stmt, Request request )
        throws SQLException, ConfigurationException {

        return new Integer(((com.informix.jdbc.IfxStatement) stmt).getSerial());
    };
View Full Code Here

public class HsqlIdentityAutoIncrementHelper implements AutoIncrementHelper, ThreadSafe {
   
    public Object getPostValue( Configuration tableConf, Configuration columnConf, Configuration modeConf,
                                Connection conn, Statement stmt, Request request throws SQLException, ConfigurationException {

        Integer id = null;
        /*
          // if hsqldb did support callable statements ...

          CallableStatement callStmt = conn.prepareCall("? = {CALL IDENTITY()}");
          callStmt.registerOutParameter(1, Types.INTEGER);
          ResultSet resultSet = callStmt.executeQuery();
        */
       
        PreparedStatement pstmt = conn.prepareStatement("CALL IDENTITY()");
        ResultSet resultSet = pstmt.executeQuery();
        while ( resultSet.next() ) {
            id = new Integer(resultSet.getInt(1));
        }
        resultSet.close();
       
        return id;
    }
View Full Code Here

    public Object getPostValue( Configuration tableConf, Configuration columnConf, Configuration modeConf,
                                Connection conn, Statement stmt, Request request )
        throws SQLException, ConfigurationException {

        return new Integer(((com.informix.jdbc.IfxStatement) stmt).getSerial());
    };
View Full Code Here

            throw new JobDefinitionException("A valid image-service implementation must be given.");
        }

        this.masterValues = (ArrayList) jobProperties.getProperty(ReportEngineParameterNames.INPUT_MASTER_VALUES);
        this.detailColumns = (ArrayList) jobProperties.getProperty(ReportEngineParameterNames.INPUT_DETAIL_COLUMNS);
        Integer maxRows=(Integer) jobProperties.getProperty(ReportEngineParameterNames.MAXROWS);

        this.resourceManager = new ResourceManager();
        this.resourceManager.registerDefaults();
        this.resourceManager.registerLoader(new InputRepositoryLoader(inputRepository));
View Full Code Here

        list.ensureCapacity(minCapacity);

        int needToAdd = minCapacity - list.size();
        if (needToAdd > 0) {
            for (int i = 0; i < needToAdd; i++) {
                list.add(new Integer(fillValue));
            }
        }
    }
View Full Code Here

     *                 we wish to set.
     *  @param  value  The integer value that we assign to the
     *                 selected element of the list.
     */
    public void set(int index, int value) {
        list.set(index, new Integer(value));
    }
View Full Code Here

     *
     *  @param  value  The integer value that we assign to the
     *                 element that we are appending to the list.
     */
    public void add(int value) {
        list.add(new Integer(value));
    }
View Full Code Here

TOP

Related Classes of java.lang.Integer$IntegerCache

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.