Пример #1
0
  public DataPoint setTimestamp(java.sql.Timestamp data) {
    boolean changed = m_timestamp.setValue(data);

    // Add the now dirty record to the transaction only if it is not previously dirty
    if (changed) {
      if (m_dirtyFlags.isEmpty()) GenOrmDataSource.getGenOrmConnection().addToTransaction(this);

      m_dirtyFlags.set(TIMESTAMP_FIELD_META.getDirtyFlag());

      if (m_isNewRecord) // Force set the prev value
      m_timestamp.setPrevValue(data);
    }

    return ((DataPoint) this);
  }
Пример #2
0
  public DataPoint setTimestampNull() {
    boolean changed = m_timestamp.setNull();

    if (changed) {
      if (m_dirtyFlags.isEmpty()) GenOrmDataSource.getGenOrmConnection().addToTransaction(this);

      m_dirtyFlags.set(TIMESTAMP_FIELD_META.getDirtyFlag());
    }

    return ((DataPoint) this);
  }
Пример #3
0
  // ---------------------------------------------------------------------------
  protected void initialize(java.sql.ResultSet rs) {
    try {
      if (s_logger.isDebug()) {
        java.sql.ResultSetMetaData meta = rs.getMetaData();
        for (int I = 1; I <= meta.getColumnCount(); I++) {
          s_logger.debug("Reading - " + meta.getColumnName(I) + " : " + rs.getString(I));
        }
      }
      m_id.setValue(rs, 1);
      m_metricId.setValue(rs, 2);
      m_timestamp.setValue(rs, 3);
      m_longValue.setValue(rs, 4);
      m_doubleValue.setValue(rs, 5);

    } catch (java.sql.SQLException sqle) {
      throw new GenOrmException(sqle);
    }
  }
Пример #4
0
  // ---------------------------------------------------------------------------
  public String toString() {
    StringBuilder sb = new StringBuilder();

    sb.append("id=\"");
    sb.append(m_id.getValue());
    sb.append("\" ");
    sb.append("metric_id=\"");
    sb.append(m_metricId.getValue());
    sb.append("\" ");
    sb.append("timestamp=\"");
    sb.append(m_timestamp.getValue());
    sb.append("\" ");
    sb.append("long_value=\"");
    sb.append(m_longValue.getValue());
    sb.append("\" ");
    sb.append("double_value=\"");
    sb.append(m_doubleValue.getValue());
    sb.append("\" ");

    return (sb.toString().trim());
  }
Пример #5
0
 public boolean isTimestampNull() {
   return (m_timestamp.isNull());
 }
Пример #6
0
 public java.sql.Timestamp getTimestamp() {
   return (m_timestamp.getValue());
 }