All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.geotab.model.entity.group.SystemGroupBase Maven / Gradle / Ivy

package com.geotab.model.entity.group;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty.Access;
import com.geotab.model.drawing.Color;
import com.geotab.model.enumeration.SpeedLimitCategory;
import java.util.List;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * The base class for all groups that are a system group.
 */
@NoArgsConstructor
@Getter
@Setter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class SystemGroupBase extends Group {

  @JsonProperty(access = Access.WRITE_ONLY)
  public String getName() {
    return super.getName();
  }

  @Builder(builderMethodName = "systemGroupBaseBuilder")
  public SystemGroupBase(String id, String name, Group parent, List children,
      String comments, String reference, SpeedLimitCategory speedLimitCategory) {
    super(id, name, Color.EMPTY, parent, children, comments, reference, speedLimitCategory);
  }

  public SystemGroupBase(String id, String name, Group parent, List children,
      String comments, String reference) {
    super(id, name, Color.EMPTY, parent, children, comments, reference, null);
  }

  protected SystemGroupBase(String id, String name) {
    super(id, name);
  }

  @Override
  public Color getColor() {
    return Color.EMPTY;
  }

  /**
   * Returns if the class is a system entity.
   *
   * @return Returns true if the class is a system entity, false otherwise.
   */
  @JsonIgnore
  @Override
  public boolean isSystemEntity() {
    return true;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy