コード例 #1
0
 public AlarmStateHistory(
     String alarmId,
     List<MetricDefinition> metrics,
     AlarmState oldState,
     AlarmState newState,
     List<AlarmTransitionSubAlarm> subAlarms,
     String reason,
     String reasonData,
     DateTime timestamp) {
   this.alarmId = alarmId;
   this.setMetrics(metrics);
   this.oldState = oldState;
   this.newState = newState;
   this.subAlarms = subAlarms;
   this.reason = reason;
   this.reasonData = reasonData;
   this.timestamp = Conversions.variantToDateTime(timestamp);
   this.id = String.valueOf(this.timestamp.getMillis());
 }
コード例 #2
0
 public void setTimestamp(DateTime timestamp) {
   this.timestamp = timestamp;
   // Set the id in the AbstractEntity class.
   id = String.valueOf(Conversions.variantToDateTime(timestamp).getMillis());
 }