// -------------------------------------------------------------------------- public DataPoint setMetricRef(Metric table) { // We add the record to the transaction if one of the key values change if (m_metricId.setValue(table.getId())) { if ((m_dirtyFlags.isEmpty()) && (GenOrmDataSource.getGenOrmConnection() != null)) GenOrmDataSource.getGenOrmConnection().addToTransaction(this); m_dirtyFlags.set(METRIC_ID_FIELD_META.getDirtyFlag()); } return ((DataPoint) this); }
public DataPoint setMetricId(String data) { boolean changed = m_metricId.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(METRIC_ID_FIELD_META.getDirtyFlag()); if (m_isNewRecord) // Force set the prev value m_metricId.setPrevValue(data); } return ((DataPoint) this); }
// --------------------------------------------------------------------------- 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); } }