com.geotab.model.entity.diagnostic.NoDiagnostic Maven / Gradle / Ivy
/*
*
* 2020 Copyright (C) Geotab Inc. All rights reserved.
*/
package com.geotab.model.entity.diagnostic;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.geotab.model.enumeration.ValidLoggingPeriod;
import com.geotab.model.serialization.SystemEntitySerializationAware;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
/**
* A diagnostic for Geotab Devices that represents DBNull database value.
*/
@Getter
@Setter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public final class NoDiagnostic extends Diagnostic implements SystemEntitySerializationAware {
private static class InstanceHolder {
private static final NoDiagnostic INSTANCE = new NoDiagnostic();
}
public static final String NO_DIAGNOSTIC_ID = "NoDiagnosticId";
public static final String NO_DIAGNOSTIC_NAME = "***Unassigned Diagnostic";
private NoDiagnostic() {
super(NO_DIAGNOSTIC_ID, NO_DIAGNOSTIC_NAME, 0L, 0, null, null, null,
null, null, null, ValidLoggingPeriod.NONE, null);
}
public static NoDiagnostic getInstance() {
return InstanceHolder.INSTANCE;
}
@Override
@JsonIgnore
public boolean isSystemEntity() {
return true;
}
}