com.geotab.model.entity.failuremode.NoFailureMode Maven / Gradle / Ivy
/*
*
* 2020 Copyright (C) Geotab Inc. All rights reserved.
*/
package com.geotab.model.entity.failuremode;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.geotab.model.serialization.SystemEntitySerializationAware;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
/**
* A {@link FailureMode} for diagnostics with no real world failure mode.
*/
@Getter
@Setter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public final class NoFailureMode extends FailureMode implements SystemEntitySerializationAware {
private static class InstanceHolder {
private static final NoFailureMode INSTANCE = new NoFailureMode();
}
public static final String NO_FAILURE_MODE_ID = "NoFailureModeId";
private NoFailureMode() {
super(NO_FAILURE_MODE_ID, "**No Failure Mode", null, null);
}
public static NoFailureMode getInstance() {
return InstanceHolder.INSTANCE;
}
@JsonIgnore
@Override
public boolean isSystemEntity() {
return true;
}
}