Package java.lang

Examples of java.lang.Integer


    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


      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

    } else if (portletAction.equals("conf_resize")) {
     
      DesktopUpdater desktopCommunicator = new DesktopUpdater();
      village.webservice.user.Window newWindow[] = new village.webservice.user.Window[1];     
      DataGetter dataCommunicator = new DataGetter();
      Integer i = 0;
      village.webservice.user.Window list[] = null;
      village.webservice.user.UserData ud = dataCommunicator.get(sid);
      list = ud.getWindows();
      /* find the window to resize */
      String currentRid = list[i].getRid();
      if (currentRid.indexOf('@') != -1)
        currentRid = currentRid.substring(0, currentRid.indexOf('@'));
      System.out.println("Rid = "+rid);
      while (!(currentRid.equals(rid.substring(0, rid.indexOf('@'))))) {
        System.out.println("CurrentRid = "+currentRid);
        i++;
        currentRid = list[i].getRid();
        if (currentRid.indexOf('@') != -1)
          currentRid = currentRid.substring(0, currentRid.indexOf('@'));
      }
      Integer height = Integer.parseInt(request.getParameter("height"));
      Integer width = Integer.parseInt(request.getParameter("width"));
      newWindow[0] = list[i];
      newWindow[0].setH(height);
      newWindow[0].setW(width);
      System.out.println("HEIGHT : "+height+", WIDTH : "+width);
      desktopCommunicator.updateDesktop(sid, newWindow);
       
    } else if (portletAction.equals("conf_move")) {

      DesktopUpdater desktopCommunicator = new DesktopUpdater();
      village.webservice.user.Window newWindow[] = new village.webservice.user.Window[1];   
      DataGetter dataCommunicator = new DataGetter();
      Integer i = 0;
      village.webservice.user.Window list[] = null;
      village.webservice.user.UserData ud = dataCommunicator.get(sid);
      list = ud.getWindows();
      /* find the window to move */
      String currentRid = list[i].getRid();
      if (currentRid.indexOf('@') != -1)
        currentRid = currentRid.substring(0, currentRid.indexOf('@'));
      System.out.println("Rid = "+rid);
      while (!(currentRid.equals(rid.substring(0, rid.indexOf('@'))))) {
        System.out.println("CurrentRid = "+currentRid);
        i++;
        currentRid = list[i].getRid();
        if (currentRid.indexOf('@') != -1)
          currentRid = currentRid.substring(0, currentRid.indexOf('@'));
      }
      String x_px = request.getParameter("left");
      Integer x = Integer.parseInt(x_px.substring(0, x_px.length() - 2));
      String y_px = request.getParameter("top");
      Integer y = Integer.parseInt(y_px.substring(0, y_px.length() - 2));
      newWindow[0] = list[i];
      newWindow[0].setX(x);
      newWindow[0].setY(y);
      System.out.println("MOVE-X : "+x+", MOVE-Y : "+y);
      desktopCommunicator.updateDesktop(sid, newWindow);

    } else if (portletAction.equals("conf_min")) {
     
      System.out.println("Bylo min\n");
      DesktopUpdater desktopCommunicator = new DesktopUpdater();
      village.webservice.user.Window newWindow[] = new village.webservice.user.Window[1];     
      DataGetter dataCommunicator = new DataGetter();
      Integer i = 0;
      village.webservice.user.Window list[] = null;
      village.webservice.user.UserData ud = dataCommunicator.get(sid);
      list = ud.getWindows();
      /* find the window to min */
      String currentRid = list[i].getRid();
      if (currentRid.indexOf('@') != -1)
        currentRid = currentRid.substring(0, currentRid.indexOf('@'));
      System.out.println("Rid = "+rid);
      while (!(currentRid.equals(rid.substring(0, rid.indexOf('@'))))) {
        System.out.println("CurrentRid = "+currentRid);
        i++;
        currentRid = list[i].getRid();
        if (currentRid.indexOf('@') != -1)
          currentRid = currentRid.substring(0, currentRid.indexOf('@'));
      }
      newWindow[0] = list[i];
      System.out.println("[pc]LastMin = "+newWindow[0].getBar());     
      newWindow[0].setBar(!(newWindow[0].getBar()));
      System.out.println("[pc]NextMin = "+newWindow[0].getBar());
      desktopCommunicator.updateDesktop(sid, newWindow);
     
    } else if (portletAction.equals("conf_max")) {
     
      System.out.println("Bylo max\n");
      DesktopUpdater desktopCommunicator = new DesktopUpdater();
      village.webservice.user.Window newWindow[] = new village.webservice.user.Window[1];     
      DataGetter dataCommunicator = new DataGetter();
      Integer i = 0;
      village.webservice.user.Window list[] = null;
      village.webservice.user.UserData ud = dataCommunicator.get(sid);
      list = ud.getWindows();
      /* find the window to max */
      String currentRid = list[i].getRid();
View Full Code Here

        if(this._verticalOffsetSet){
      return this._verticalOffset;
     }
      ValueBinding vb = getValueBinding("verticalOffset");
      if (vb != null) {
          Integer value = (Integer) vb.getValue(getFacesContext());
          if (null == value) {
          return this._verticalOffset;
          }
          return (value.intValue());
      } else {
          return (this._verticalOffset);
      }
      }
View Full Code Here

              }
        ValueBinding vb = getValueBinding("showDelay");
        if (null != vb){
            return (Integer)vb.getValue(getFacesContext());
            } else {
            return new Integer(50);
        }
      }
View Full Code Here

        if(this._horizontalOffsetSet){
      return this._horizontalOffset;
     }
      ValueBinding vb = getValueBinding("horizontalOffset");
      if (vb != null) {
          Integer value = (Integer) vb.getValue(getFacesContext());
          if (null == value) {
          return this._horizontalOffset;
          }
          return (value.intValue());
      } else {
          return (this._horizontalOffset);
      }
      }
View Full Code Here

              }
        ValueBinding vb = getValueBinding("hideDelay");
        if (null != vb){
            return (Integer)vb.getValue(getFacesContext());
            } else {
            return new Integer(800);
        }
      }
View Full Code Here

         
                 values[3] = _disabledItemStyle;
         
                 values[4] = _disabledItemClass;
         
            values[5] = new Integer(_verticalOffset);
          values[6] = Boolean.valueOf(_verticalOffsetSet)
         
                  values[7] = _selectItemStyle;
         
                 values[8] = _showDelay;
         
                  values[9] = _onexpand;
         
                 values[10] = _submitMode;
         
                 values[11] = _styleClass;
         
                 values[12] = _style;
         
                 values[13] = _itemClass;
         
                 values[14] = _oncollapse;
         
                 values[15] = _onmouseover;
         
                 values[16] = _value;
         
            values[17] = new Integer(_horizontalOffset);
          values[18] = Boolean.valueOf(_horizontalOffsetSet)
         
                 values[19] = _ongroupactivate;
         
                 values[20] = _onmouseout;
View Full Code Here

                //System.out.println( "argv = " + arguments[i] );
                //System.out.println( "leng = " + lengthOfToken );
                for ( int j = 1; j<lengthOfToken; j++ ){
                    token = bufferOfToken[j];
                    //System.out.println( "token = " + token );
                    queueOfSwitches.push( (Object ) new Integer( token ));
                    for ( int k = 0; k< argsWithOptions.length; k++) {
                        if ( token == argsWithOptions[k] ){
                            if ( this.fDbug  ) {
                                System.out.println( "token = " + token );
                            }
                            //queueOfSwitches.push( (Object ) new Integer( -1 ));
                            queueStringParameters.push( arguments[++i] );
                            continue outer;
                        }
                    }

                }

                if ( i+1 < argLength ){
                    if ( !( arguments[i+1].charAt(0) == '-') ) //next argument not start '-'
                        queueOfSwitches.push( (Object ) new Integer( -1 )); //put -1 marker
                }

            } else{
                queueOfOtherStringParameters.push( arguments[i] );
            }
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

TOP

Related Classes of java.lang.Integer

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.