use of com.serotonin.m2m2.db.dao.CompoundEventDetectorDao in project ma-core-public by infiniteautomation.
the class CompoundDetectorEventType method jsonWrite.
//
//
// Serialization
//
@Override
public void jsonWrite(ObjectWriter writer) throws IOException, JsonException {
super.jsonWrite(writer);
writer.writeEntry("XID", new CompoundEventDetectorDao().getCompoundEventDetector(compoundDetectorId).getXid());
}
use of com.serotonin.m2m2.db.dao.CompoundEventDetectorDao in project ma-core-public by infiniteautomation.
the class CompoundDetectorEventType method getCompoundEventDetectorId.
protected int getCompoundEventDetectorId(JsonObject json, String name) throws JsonException {
String xid = json.getString(name);
if (xid == null)
throw new TranslatableJsonException("emport.error.eventType.missing.reference", name);
CompoundEventDetectorVO ced = new CompoundEventDetectorDao().getCompoundEventDetector(xid);
if (ced == null)
throw new TranslatableJsonException("emport.error.eventType.invalid.reference", name, xid);
return ced.getId();
}
Aggregations