com.geotab.model.entity.group.DefectsGroup Maven / Gradle / Ivy
package com.geotab.model.entity.group;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.geotab.model.drawing.Color;
import com.geotab.model.enumeration.DefectSeverity;
import com.geotab.model.serialization.DefectGroupChildrenDeserializer;
import java.util.ArrayList;
import java.util.List;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
/**
* This is a {@link Defect} with an Id of GroupDefectsId. This is the root defect group for vehicle
* and trailer defects. The children of this group are not user defined.
*/
@Getter
@Setter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class DefectsGroup extends Defect {
public static final String DEFECTS_GROUP_ID = "GroupDefectsId";
public static final String DEFECTS_GROUP_NAME = "**Defects**";
@Builder(builderMethodName = "defectsGroupBuilder")
public DefectsGroup(Color color, Group parent, List children, String comments,
String reference, DefectSeverity severity, List groups, Boolean isDefectList) {
super(DEFECTS_GROUP_ID, DEFECTS_GROUP_NAME, color, parent, children, comments, reference,
severity, groups, isDefectList);
}
@Override
@JsonDeserialize(using = DefectGroupChildrenDeserializer.class)
public List getChildren() {
return super.getChildren();
}
public DefectsGroup() {
super(DEFECTS_GROUP_ID, DEFECTS_GROUP_NAME, null, null, new ArrayList<>(), "", "", null,
new ArrayList<>(), false);
}
}