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

com.geotab.model.entity.user.UnknownDriver Maven / Gradle / Ivy

/*
 *
 * 2020 Copyright (C) Geotab Inc. All rights reserved.
 */

package com.geotab.model.entity.user;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.geotab.model.entity.group.CompanyGroup;
import com.geotab.model.enumeration.UserAuthenticationType;
import com.geotab.model.serialization.SystemEntitySerializationAware;
import com.google.common.collect.Lists;
import java.time.LocalDateTime;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * The default unknown driver of a {@link com.geotab.model.entity.device.Device}. Used if the driver
 * is not identified through a key.
 */
@Getter
@Setter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public final class UnknownDriver extends Driver implements SystemEntitySerializationAware {

  private static class InstanceHolder {

    private static final UnknownDriver INSTANCE = new UnknownDriver();
  }

  public static final String UNKNOWN_DRIVER_ID = "UnknownDriverId";

  private UnknownDriver() {
    super(UNKNOWN_DRIVER_ID, "**UnknownDriver", 0L, 0, 0, 0, null,
        LocalDateTime.of(1986, 1, 1, 0, 0, 0, 0),
        LocalDateTime.of(2050, 1, 1, 0, 0, 0, 0),
        null, null, false,
        null, Lists.newArrayList(), null, null, null, null,
        null, null, null, null,
        null, null, null, "", null, null,
        null, false, false, false,
        null, null, null, false, true,
        false, false, true, null, null, "",
        null, "", Lists.newArrayList(), Lists.newArrayList(), Lists.newArrayList(), false,
        null, UserAuthenticationType.NONE, null, null, null,
        null, null, null, true, Lists.newArrayList(new CompanyGroup()), null,
        false, "", "");
  }

  public static UnknownDriver getInstance() {
    return InstanceHolder.INSTANCE;
  }

  @JsonIgnore
  @Override
  public boolean isSystemEntity() {
    return true;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy