Package java.math

Examples of java.math.BigDecimal.intValue()


    try {
      Object oContent = oMsg.getContent();
      if (oContent instanceof MimeMultipart) {
        try {
          saveMimeParts(oMsg, sMsgCharSeq, sBoundary, sGuMimeMsg, sMessageID, dPgMessage.intValue(), 0);
        } catch (MessagingException msge) {
          // Close Mbox file rollback and re-throw
          try { oConn.rollback(); } catch (Exception ignore) {}
          throw new MessagingException(msge.getMessage(), msge.getNextException());
        }
View Full Code Here


      if (DebugFile.trace) DebugFile.writeln("bcc count = " + pBCC.size());

      oAddr.close();

      sSQL = "INSERT INTO " + DB.k_inet_addrs + " (gu_mimemsg,id_message,pg_message,tx_email,tp_recipient,gu_user,gu_contact,gu_company,tx_personal) VALUES ('"+sGuMimeMsg+"',?,"+String.valueOf(dPgMessage.intValue())+",?,?,?,?,?,?)";

      if (DebugFile.trace) DebugFile.writeln("Connection.prepareStatement(" + sSQL + ")");

      oStmt = oConn.prepareStatement(sSQL);
View Full Code Here

            if (bd.compareTo(MAX_INT) > 0 || bd.compareTo(MIN_INT) < 0) {
                throw Error.error(ErrorCode.X_22003);
            }

            value = bd.intValue();
        } else if (a instanceof Double || a instanceof Float) {
            double d = ((Number) a).doubleValue();

            if (Double.isInfinite(d) || Double.isNaN(d)
                    || d >= (double) Integer.MAX_VALUE + 1
View Full Code Here

            {
                return value.toBigInteger();
            }
            else if (getJavaTypeMapping().getJavaType().getName().equals(ClassNameConstants.JAVA_LANG_INTEGER))
            {
                return Integer.valueOf(value.intValue());
            }
            else if (getJavaTypeMapping().getJavaType().getName().equals(ClassNameConstants.JAVA_LANG_LONG))
            {
                return Long.valueOf(value.longValue());
            }
View Full Code Here

            {
                return Long.valueOf(value.longValue());
            }
            else if (getJavaTypeMapping().getJavaType().getName().equals(ClassNameConstants.JAVA_LANG_BOOLEAN))
            {
                return Boolean.valueOf(value.intValue() == 1 ? true : false);
            }
            else if (getJavaTypeMapping().getJavaType().getName().equals(ClassNameConstants.JAVA_LANG_BYTE))
            {
                return Byte.valueOf(value.byteValue());
            }
View Full Code Here

            {
                return Double.valueOf(value.doubleValue());
            }
            else if (getJavaTypeMapping().getJavaType().getName().equals(ClassNameConstants.JAVA_LANG_CHARACTER))
            {
                return Character.valueOf((char) value.intValue());
            }
            else if (getJavaTypeMapping().getJavaType().getName().equals(ClassNameConstants.JAVA_LANG_STRING))
            {
                return Character.valueOf((char) value.intValue()).toString();
            }
View Full Code Here

            {
                return Character.valueOf((char) value.intValue());
            }
            else if (getJavaTypeMapping().getJavaType().getName().equals(ClassNameConstants.JAVA_LANG_STRING))
            {
                return Character.valueOf((char) value.intValue()).toString();
            }
            else if (getJavaTypeMapping().getJavaType().getName().equals(ClassNameConstants.JAVA_MATH_BIGDECIMAL))
            {
                return value;
            }
View Full Code Here

        pstmt.close();

        if (rows==0)
          throw new Exception("Updating not performed: the record was previously updated.");

        progressive = new BigDecimal(progressive.intValue()+1);
      }
      else {
        // record not found: it will be inserted, beginning from "initialValue"...
        rset.close();
        pstmt = conn.prepareStatement(
View Full Code Here

        pstmt.close();

        if (rows==0)
          throw new Exception("Updating not performed: the record was previously updated.");

        progressive = new BigDecimal(progressive.intValue()+incrementValue.intValue());
      }
      else {
        // record not found: it will be inserted, beginning from "initialValue"...
        pstmt = conn.prepareStatement(
            "insert into SYS20_COMPANY_PROGRESSIVES(COMPANY_CODE_SYS01,TABLE_NAME,COLUMN_NAME,VALUE,CREATE_USER,CREATE_DATE) values("+
View Full Code Here

                  qty = (BigDecimal) cells[i][j];
                }
                catch (Exception ex2) {
                  qty = new BigDecimal(0);
                }
                if (qty.intValue()>0) {
                  try {
                    vo = (ItemToPrintVO) vo.clone();
                  }
                  catch (CloneNotSupportedException ex) {
                  }
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.