public DataPoint setId(int data) { boolean changed = m_id.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(ID_FIELD_META.getDirtyFlag()); if (m_isNewRecord) // Force set the prev value m_id.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); } }
// --------------------------------------------------------------------------- protected void initialize(int id) { m_id.setValue(id); m_id.setPrevValue(id); }