/** * Deletes the record with the specified primary keys. The point of this api is to prevent a hit * on the db to see if the record is there. This call will add a record to the next transaction * that is marked for delete. * * @return Returns true if the record was previous created and existed either in the transaction * cache or the db. */ public boolean delete(int id) { boolean ret = false; DataPoint rec = new DataPoint(); ((DataPoint_base) rec).initialize(id); GenOrmConnection con = GenOrmDataSource.getGenOrmConnection(); DataPoint cachedRec = (DataPoint) con.getCachedRecord(rec.getRecordKey()); if (cachedRec != null) { ret = true; cachedRec.delete(); } else { rec = (DataPoint) con.getUniqueRecord(rec); // This adds the record to the cache rec.delete(); ret = rec.flush(); rec.setIgnored(true); // So the system does not try to delete it again at commmit } return (ret); }