use of com.serotonin.m2m2.vo.publish.PublishedPointVO in project ma-core-public by MangoAutomation.
the class PublishedPointDao method saveEnabledColumn.
/**
* Update the enabled column
*
* @param existing point for which to update the enabled column
* @param enabled if the point should be enabled or disabled
* @return updated publshed point
*/
public PublishedPointVO saveEnabledColumn(PublishedPointVO existing, boolean enabled) {
create.update(table).set(table.enabled, boolToChar(enabled)).where(table.id.eq(existing.getId())).execute();
PublishedPointVO result = existing.copy();
result.setEnabled(enabled);
this.publishEvent(new DaoEvent<>(this, DaoEventType.UPDATE, result, existing));
this.publishAuditEvent(new ToggleAuditEvent<>(this.auditEventType, Common.getUser(), result));
return result;
}
Aggregations