Package java.lang

Examples of java.lang.Integer$valueOfCache


        }
    }

    private void firePropertyChange(String propertyName, int oldValue, int newValue) {
        if (oldValue != newValue) {
            firePropertyChange(propertyName, new Integer(oldValue), new Integer(newValue));
        }
    }
View Full Code Here


public class MysqlAutoIncrementModule implements AutoIncrementModule, ThreadSafe {

    public Object getPostValue( Configuration tableConf, Configuration columnConf, Configuration modeConf,
                                Connection conn, Statement stmt, Map objectModel 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

public class PgsqlAutoIncrementModule implements AutoIncrementModule, ThreadSafe {

    public Object getPostValue( Configuration tableConf, Configuration columnConf, Configuration modeConf,
                                Connection conn, Statement stmt, Map objectModel throws SQLException, ConfigurationException {

        Integer id = null;
        /*
          // Postgres does 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();
        */

        String sequence = modeConf.getAttribute("sequence",null);

        StringBuffer queryBuffer = new StringBuffer("SELECT currval('");
        if (sequence != null) {
            queryBuffer.append(sequence);
        } else {
            queryBuffer.append(tableConf.getAttribute("name",""));
            queryBuffer.append('_');
            queryBuffer.append(columnConf.getAttribute("name"));
            queryBuffer.append("_seq");
        }
        queryBuffer.append("')");
       
        PreparedStatement pstmt = conn.prepareStatement(queryBuffer.toString());
        ResultSet resultSet = pstmt.executeQuery();
        while ( resultSet.next() ) {
            id = new Integer(resultSet.getInt(1));
        }
        resultSet.close();

        return id;
    }
View Full Code Here

    {
        if (mxText != null)
        {
            int nPosition = mxText.getCaretPosition();
            if (nPosition+1 <= mxText.getCharacterCount())
                return new Integer (nPosition+1);
        }
        return null;
    }
View Full Code Here

    {
        if (mxText != null)
        {
            int nPosition = mxText.getCaretPosition();
            if (nPosition > 0)
                return new Integer (nPosition-1);
        }
        return null;
    }
View Full Code Here

    }

    public Object getValue ()
    {
        if (mxText != null)
            return new Integer (mxText.getCaretPosition());
        else
            return null;
    }
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 (this._similarityGroupingId != null) {
        if (this._similarityGroupingId.isLiteralText()) {
          try {
                       
            java.lang.String __similarityGroupingId = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._similarityGroupingId.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setSimilarityGroupingId(__similarityGroupingId);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("similarityGroupingId", this._similarityGroupingId);
        }
      }
                        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

                        
            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._labelClass != null) {
        if (this._labelClass.isLiteralText()) {
          try {
                       
            java.lang.String __labelClass = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._labelClass.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setLabelClass(__labelClass);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("labelClass", this._labelClass);
        }
      }
                        
            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

  public int empno;
  public EmpBeanPK(int empno) {this.empno = empno; }

  public EmpBeanPK() { }
  public String toString() {
    Integer n = new Integer(empno);
    return n.toString();
  }
View Full Code Here

    Element code = doc.createElement("error-code");
    root.appendChild(code);

    int ecode = m_sql_ex.getErrorCode();
    Integer i = new Integer(ecode);

    text = doc.createTextNode(i.toString());
    code.appendChild(text);

    Element state = doc.createElement("state");
    root.appendChild(state);
    text = doc.createTextNode(m_sql_ex.getSQLState());
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.