Record Class ModelData

java.lang.Object
java.lang.Record
app.valuationcontrol.multimodule.library.records.ModelData

public record ModelData(Long id, @NotEmpty @NotNull String name, @NotNull @Min(value=0L,message="Start year must be greater than 0") Integer startYear, @NotNull @Min(value=0L,message="Number of historical periods can\'t be less than 0") @Max(value=5L,message="You can only have 5 years of historical periods") Integer nbHistoricalPeriod, @NotNull @Min(value=1L,message="You need at least one projection period") @Max(value=21L,message="You can only have 20 years of projection periods") Integer nbProjectionPeriod, @NotNull String company, String companyNumber, @NotNull @Size(min=1,max=5,message="Currency must be a string between 1 to 5 characters") String currency, @Pattern(regexp="property|template|") String simpleModel, boolean locked, boolean includeYTD, KeyParam keyParam) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    ModelData(Long id, @NotEmpty @NotNull String name, @NotNull @Min(value=0L,message="Start year must be greater than 0") Integer startYear, @NotNull @Min(value=0L,message="Number of historical periods can\'t be less than 0") @Max(value=5L,message="You can only have 5 years of historical periods") Integer nbHistoricalPeriod, @NotNull @Min(value=1L,message="You need at least one projection period") @Max(value=21L,message="You can only have 20 years of projection periods") Integer nbProjectionPeriod, @NotNull String company, String companyNumber, @NotNull @Size(min=1,max=5,message="Currency must be a string between 1 to 5 characters") String currency, @Pattern(regexp="property|template|") String simpleModel, boolean locked, boolean includeYTD, KeyParam keyParam)
    Creates an instance of a ModelData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull String
    Returns the value of the company record component.
    Returns the value of the companyNumber record component.
    @NotNull @Size(min=1,max=5,message="Currency must be a string between 1 to 5 characters") String
    Returns the value of the currency record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    id()
    Returns the value of the id record component.
    boolean
    Returns the value of the includeYTD record component.
    Returns the value of the keyParam record component.
    boolean
    Returns the value of the locked record component.
    @NotEmpty @NotNull String
    Returns the value of the name record component.
    @NotNull @Min(value=0L,message="Number of historical periods can\'t be less than 0") @Max(value=5L,message="You can only have 5 years of historical periods") Integer
    Returns the value of the nbHistoricalPeriod record component.
    @NotNull @Min(value=1L,message="You need at least one projection period") @Max(value=21L,message="You can only have 20 years of projection periods") Integer
    Returns the value of the nbProjectionPeriod record component.
    @Pattern(regexp="property|template|") String
    Returns the value of the simpleModel record component.
    @NotNull @Min(value=0L,message="Start year must be greater than 0") Integer
    Returns the value of the startYear record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ModelData

      public ModelData(Long id, @NotEmpty @NotNull @NotEmpty @NotNull String name, @NotNull @Min(value=0L,message="Start year must be greater than 0") @NotNull @Min(value=0L,message="Start year must be greater than 0") Integer startYear, @NotNull @Min(value=0L,message="Number of historical periods can\'t be less than 0") @Max(value=5L,message="You can only have 5 years of historical periods") @NotNull @Min(value=0L,message="Number of historical periods can\'t be less than 0") @Max(value=5L,message="You can only have 5 years of historical periods") Integer nbHistoricalPeriod, @NotNull @Min(value=1L,message="You need at least one projection period") @Max(value=21L,message="You can only have 20 years of projection periods") @NotNull @Min(value=1L,message="You need at least one projection period") @Max(value=21L,message="You can only have 20 years of projection periods") Integer nbProjectionPeriod, @NotNull @NotNull String company, String companyNumber, @NotNull @Size(min=1,max=5,message="Currency must be a string between 1 to 5 characters") @NotNull @Size(min=1,max=5,message="Currency must be a string between 1 to 5 characters") String currency, @Pattern(regexp="property|template|") @Pattern(regexp="property|template|") String simpleModel, boolean locked, boolean includeYTD, KeyParam keyParam)
      Creates an instance of a ModelData record class.
      Parameters:
      id - the value for the id record component
      name - the value for the name record component
      startYear - the value for the startYear record component
      nbHistoricalPeriod - the value for the nbHistoricalPeriod record component
      nbProjectionPeriod - the value for the nbProjectionPeriod record component
      company - the value for the company record component
      companyNumber - the value for the companyNumber record component
      currency - the value for the currency record component
      simpleModel - the value for the simpleModel record component
      locked - the value for the locked record component
      includeYTD - the value for the includeYTD record component
      keyParam - the value for the keyParam record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public Long id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • name

      @NotEmpty @NotNull public @NotEmpty @NotNull String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • startYear

      @NotNull @Min(value=0L, message="Start year must be greater than 0") public @NotNull @Min(value=0L,message="Start year must be greater than 0") Integer startYear()
      Returns the value of the startYear record component.
      Returns:
      the value of the startYear record component
    • nbHistoricalPeriod

      @NotNull @Min(value=0L, message="Number of historical periods can\'t be less than 0") @Max(value=5L, message="You can only have 5 years of historical periods") public @NotNull @Min(value=0L,message="Number of historical periods can\'t be less than 0") @Max(value=5L,message="You can only have 5 years of historical periods") Integer nbHistoricalPeriod()
      Returns the value of the nbHistoricalPeriod record component.
      Returns:
      the value of the nbHistoricalPeriod record component
    • nbProjectionPeriod

      @NotNull @Min(value=1L, message="You need at least one projection period") @Max(value=21L, message="You can only have 20 years of projection periods") public @NotNull @Min(value=1L,message="You need at least one projection period") @Max(value=21L,message="You can only have 20 years of projection periods") Integer nbProjectionPeriod()
      Returns the value of the nbProjectionPeriod record component.
      Returns:
      the value of the nbProjectionPeriod record component
    • company

      @NotNull public @NotNull String company()
      Returns the value of the company record component.
      Returns:
      the value of the company record component
    • companyNumber

      public String companyNumber()
      Returns the value of the companyNumber record component.
      Returns:
      the value of the companyNumber record component
    • currency

      @NotNull @Size(min=1, max=5, message="Currency must be a string between 1 to 5 characters") public @NotNull @Size(min=1,max=5,message="Currency must be a string between 1 to 5 characters") String currency()
      Returns the value of the currency record component.
      Returns:
      the value of the currency record component
    • simpleModel

      @Pattern(regexp="property|template|") public @Pattern(regexp="property|template|") String simpleModel()
      Returns the value of the simpleModel record component.
      Returns:
      the value of the simpleModel record component
    • locked

      public boolean locked()
      Returns the value of the locked record component.
      Returns:
      the value of the locked record component
    • includeYTD

      public boolean includeYTD()
      Returns the value of the includeYTD record component.
      Returns:
      the value of the includeYTD record component
    • keyParam

      public KeyParam keyParam()
      Returns the value of the keyParam record component.
      Returns:
      the value of the keyParam record component