Package Framework

Examples of Framework.DateTimeData


              cachedRowSet.updateBigDecimal(pColOrdinal, value.getBigDecimal());
            } else if (pValue instanceof BooleanData) {
              BooleanData value = (BooleanData) pValue;
              cachedRowSet.updateBoolean(pColOrdinal, value.getBooleanValue());
            } else if (pValue instanceof DateTimeData) {
              DateTimeData value = (DateTimeData) pValue;
              cachedRowSet.updateDate(pColOrdinal, new Date(value.asDate().getTime()));
            } else if (pValue instanceof BinaryData) {
              BinaryData value = (BinaryData) pValue;
              cachedRowSet.updateBinaryStream(pColOrdinal, new ByteArrayInputStream(value.getValue()), value.getActualSize());
            }
          } catch (SQLException e) {
            UsageException errorVar = new UsageException(e.getMessage(), Framework.Constants.SP_ER_USER, Framework.Constants.SP_ER_PARAMETERERROR, e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
View Full Code Here


            if (o == null || resultSet.wasNull()) {
                throw new UsageException(
                        "getDateTimeData(int) could not handle column " + pColumnID + ". Result =" + o,
                        SP_ER_PARAMETERERROR, SP_ER_USER, UsageException.qq_Resolver.cMESSAGE_REASONCODE_SEVERITY);
            }
            DateTimeData dt = new DateTimeData(resultSet.getTimestamp(pColumnID));
            return dt;
        } catch (SQLException e) {
          throw processException(e);
        }
    }
View Full Code Here

            if (o == null || resultSet.wasNull()) {
                throw new UsageException(
                        "getDateTimeData(String) could not handle column " + pColumnName + ". Result =" + o,
                        SP_ER_USER, SP_ER_PARAMETERERROR, UsageException.qq_Resolver.cMESSAGE_REASONCODE_SEVERITY);
            }
            DateTimeData dt = new DateTimeData(resultSet
                    .getTimestamp(pColumnName));
            return dt;
        } catch (SQLException e) {
          throw processException(e);
        }
View Full Code Here

        format = dateFormat;
    }

    protected DataValue setDataValueFromString(DataValue dataValue, String value) throws ParseException
    {
        DateTimeData dateTimeValue = (DateTimeData) dataValue;
        if (value != null && value.length() > 0)
        {
            dateTimeValue.setValue((Date) format.parseObject(value));
        }
        else {
            if (dataValue.isNullable()) {
                dateTimeValue.setNullValue(true);
            }
            else {
                dateTimeValue = null;
            }
        }
View Full Code Here

        return dateTimeValue;
    }

    protected String dataValueToString(DataValue value)
    {
        DateTimeData dateTimeValue = (DateTimeData) value;
        return format.format(dateTimeValue.asDate());
    }
View Full Code Here

TOP

Related Classes of Framework.DateTimeData

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.