/** * Call "read" to lookup an entity record by it's unique identifier. * If not found then return null or throw an UnknownRecException based * on checked. * NOTE: Was final */ public HDict readById(HRef id, bool bChecked) { HDict rec = onReadById(id); if (rec != null) { return(rec); } if (bChecked) { throw new Exception("rec not found for: " + id.ToString()); } return(null); }
public static HaystackReference Map(HRef value) { return(value.Source); }
// Subclass hook for readById, return null if not found. protected abstract HDict onReadById(HRef id);
////////////////////////////////////////////////////////////////////////// // Read by id ////////////////////////////////////////////////////////////////////////// // Convenience for "readById(id, true)" NOTE: Was final public HDict readById(HRef id) { return(readById(id, true)); }
/** * Write a set of history time-series data to the given point record. * The record must already be defined and must be properly tagged as * a historized point. The timestamp timezone must exactly match the * point's configured "tz" tag. If duplicate or out-of-order items are * inserted then they must be gracefully merged. */ public abstract void hisWrite(HRef id, HHisItem[] items);
////////////////////////////////////////////////////////////////////////// // Historian ////////////////////////////////////////////////////////////////////////// /** * Read history time-series data for given record and time range. The * items returned are exclusive of start time and inclusive of end time. * Raise exception if id does not map to a record with the required tags * "his" or "tz". The range may be either a String or a HDateTimeRange. * If HTimeDateRange is passed then must match the timezone configured on * the history record. Otherwise if a String is passed, it is resolved * relative to the history record's timezone. */ public abstract HGrid hisRead(HRef id, object range);