Package java.lang

Examples of java.lang.Integer$valueOfCache


        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

public class MysqlAutoIncrementModule implements AutoIncrementModule, 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 HsqlIdentityAutoIncrementModule implements AutoIncrementModule, 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

                        
            if (this._horizontalOffset != null) {
        if (this._horizontalOffset.isLiteralText()) {
          try {
                       
            Integer __horizontalOffset = (Integer) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._horizontalOffset.getExpressionString(),
                      Integer.class);
         
                        comp.setHorizontalOffset(__horizontalOffset.intValue());
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("horizontalOffset", this._horizontalOffset);
        }
      }
                         
            if (this._itemClass != null) {
        if (this._itemClass.isLiteralText()) {
          try {
                       
            java.lang.String __itemClass = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._itemClass.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setItemClass(__itemClass);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("itemClass", this._itemClass);
        }
      }
                        
            if (this._itemStyle != null) {
        if (this._itemStyle.isLiteralText()) {
          try {
                       
            java.lang.String __itemStyle = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._itemStyle.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setItemStyle(__itemStyle);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("itemStyle", this._itemStyle);
        }
      }
                        
            if (this._jointPoint != null) {
        if (this._jointPoint.isLiteralText()) {
          try {
                       
            java.lang.String __jointPoint = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._jointPoint.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setJointPoint(__jointPoint);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("jointPoint", this._jointPoint);
        }
      }
                        
            if (this._oncollapse != null) {
        if (this._oncollapse.isLiteralText()) {
          try {
                       
            java.lang.String __oncollapse = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._oncollapse.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setOncollapse(__oncollapse);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("oncollapse", this._oncollapse);
        }
      }
                        
            if (this._onexpand != null) {
        if (this._onexpand.isLiteralText()) {
          try {
                       
            java.lang.String __onexpand = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._onexpand.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setOnexpand(__onexpand);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("onexpand", this._onexpand);
        }
      }
                        
            if (this._ongroupactivate != null) {
        if (this._ongroupactivate.isLiteralText()) {
          try {
                       
            java.lang.String __ongroupactivate = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._ongroupactivate.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setOngroupactivate(__ongroupactivate);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("ongroupactivate", this._ongroupactivate);
        }
      }
                        
            if (this._onitemselect != null) {
        if (this._onitemselect.isLiteralText()) {
          try {
                       
            java.lang.String __onitemselect = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._onitemselect.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setOnitemselect(__onitemselect);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("onitemselect", this._onitemselect);
        }
      }
                           
            if (this._popupWidth != null) {
        if (this._popupWidth.isLiteralText()) {
          try {
                       
            java.lang.String __popupWidth = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._popupWidth.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setPopupWidth(__popupWidth);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("popupWidth", this._popupWidth);
        }
      }
                         
            if (this._selectItemClass != null) {
        if (this._selectItemClass.isLiteralText()) {
          try {
                       
            java.lang.String __selectItemClass = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._selectItemClass.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setSelectItemClass(__selectItemClass);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("selectItemClass", this._selectItemClass);
        }
      }
                        
            if (this._selectItemStyle != null) {
        if (this._selectItemStyle.isLiteralText()) {
          try {
                       
            java.lang.String __selectItemStyle = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._selectItemStyle.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setSelectItemStyle(__selectItemStyle);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("selectItemStyle", this._selectItemStyle);
        }
      }
                        
            if (this._selectedLabelClass != null) {
        if (this._selectedLabelClass.isLiteralText()) {
          try {
                       
            java.lang.String __selectedLabelClass = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._selectedLabelClass.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setSelectedLabelClass(__selectedLabelClass);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("selectedLabelClass", this._selectedLabelClass);
        }
      }
                        
            if (this._showDelay != null) {
        if (this._showDelay.isLiteralText()) {
          try {
                       
            java.lang.Integer __showDelay = (java.lang.Integer) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._showDelay.getExpressionString(),
                      java.lang.Integer.class);
         
                        comp.setShowDelay(__showDelay);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("showDelay", this._showDelay);
        }
      }
                          
            if (this._submitMode != null) {
        if (this._submitMode.isLiteralText()) {
          try {
                       
            java.lang.String __submitMode = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._submitMode.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setSubmitMode(__submitMode);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("submitMode", this._submitMode);
        }
      }
                        
            if (this._value != null) {
        if (this._value.isLiteralText()) {
          try {
                       
            java.lang.Object __value = (java.lang.Object) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._value.getExpressionString(),
                      java.lang.Object.class);
         
                        comp.setValue(__value);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("value", this._value);
        }
      }
                        
            if (this._verticalOffset != null) {
        if (this._verticalOffset.isLiteralText()) {
          try {
                       
            Integer __verticalOffset = (Integer) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._verticalOffset.getExpressionString(),
                      Integer.class);
         
                        comp.setVerticalOffset(__verticalOffset.intValue());
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("verticalOffset", this._verticalOffset);
View Full Code Here

                         
            if (this._requestDelay != null) {
        if (this._requestDelay.isLiteralText()) {
          try {
                       
            Integer __requestDelay = (Integer) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._requestDelay.getExpressionString(),
                      Integer.class);
         
                        comp.setRequestDelay(__requestDelay.intValue());
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("requestDelay", this._requestDelay);
        }
      }
                        if(null != this._sliderListener){
             if (!this._sliderListener.isLiteralText())
             {
                MethodBinding mb = new MethodBindingMethodExpressionAdaptor(this._sliderListener);
                ((HtmlDataFilterSlider)component).setSliderListener(mb);
             }
             else
             {
                getFacesContext().getExternalContext().log("Component " + component.getClientId(getFacesContext()) + " has invalid sliderListener value: " + this._sliderListener);
             }
      }
                    
            if (this._startRange != null) {
        if (this._startRange.isLiteralText()) {
          try {
                       
            java.lang.Integer __startRange = (java.lang.Integer) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._startRange.getExpressionString(),
                      java.lang.Integer.class);
         
                        comp.setStartRange(__startRange);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("startRange", this._startRange);
        }
      }
                        
            if (this._status != null) {
        if (this._status.isLiteralText()) {
          try {
                       
            java.lang.String __status = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._status.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setStatus(__status);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("status", this._status);
        }
      }
                        
            if (this._storeResults != null) {
        if (this._storeResults.isLiteralText()) {
          try {
                       
            Boolean __storeResults = (Boolean) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._storeResults.getExpressionString(),
                      Boolean.class);
         
                        comp.setStoreResults(__storeResults.booleanValue());
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("storeResults", this._storeResults);
        }
      }
                           
            if (this._timeout != null) {
        if (this._timeout.isLiteralText()) {
          try {
                       
            Integer __timeout = (Integer) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._timeout.getExpressionString(),
                      Integer.class);
         
                        comp.setTimeout(__timeout.intValue());
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("timeout", this._timeout);
View Full Code Here

  public static Object[] jwsgi(Hashtable env) throws java.io.IOException {

    if (env.containsKey("CONTENT_LENGTH")) {
      String s = (String) env.get("CONTENT_LENGTH");
      if (s.length() > 0) {
        Integer cl = Integer.parseInt( s );
        FileInputStream f = new FileInputStream( (FileDescriptor) env.get("jwsgi.input") )
        byte[] b = new byte[cl];
   
        if (f.read(b) > 0) {
          String postdata = new String(b);
View Full Code Here

TOP

Related Classes of java.lang.Integer$valueOfCache

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.