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
ConstructorsConstructorDescriptionModelData(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 aModelDatarecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Stringcompany()Returns the value of thecompanyrecord component.Returns the value of thecompanyNumberrecord component.@NotNull @Size(min=1,max=5,message="Currency must be a string between 1 to 5 characters") Stringcurrency()Returns the value of thecurrencyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanReturns the value of theincludeYTDrecord component.keyParam()Returns the value of thekeyParamrecord component.booleanlocked()Returns the value of thelockedrecord component.@NotEmpty @NotNull Stringname()Returns the value of thenamerecord 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") IntegerReturns the value of thenbHistoricalPeriodrecord 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") IntegerReturns the value of thenbProjectionPeriodrecord component.@Pattern(regexp="property|template|") StringReturns the value of thesimpleModelrecord component.@NotNull @Min(value=0L,message="Start year must be greater than 0") IntegerReturns the value of thestartYearrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aModelDatarecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentstartYear- the value for thestartYearrecord componentnbHistoricalPeriod- the value for thenbHistoricalPeriodrecord componentnbProjectionPeriod- the value for thenbProjectionPeriodrecord componentcompany- the value for thecompanyrecord componentcompanyNumber- the value for thecompanyNumberrecord componentcurrency- the value for thecurrencyrecord componentsimpleModel- the value for thesimpleModelrecord componentlocked- the value for thelockedrecord componentincludeYTD- the value for theincludeYTDrecord componentkeyParam- the value for thekeyParamrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord 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 thestartYearrecord component.- Returns:
- the value of the
startYearrecord 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 thenbHistoricalPeriodrecord component.- Returns:
- the value of the
nbHistoricalPeriodrecord 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 thenbProjectionPeriodrecord component.- Returns:
- the value of the
nbProjectionPeriodrecord component
-
company
Returns the value of thecompanyrecord component.- Returns:
- the value of the
companyrecord component
-
companyNumber
Returns the value of thecompanyNumberrecord component.- Returns:
- the value of the
companyNumberrecord 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 thecurrencyrecord component.- Returns:
- the value of the
currencyrecord component
-
simpleModel
@Pattern(regexp="property|template|") public @Pattern(regexp="property|template|") String simpleModel()Returns the value of thesimpleModelrecord component.- Returns:
- the value of the
simpleModelrecord component
-
locked
public boolean locked()Returns the value of thelockedrecord component.- Returns:
- the value of the
lockedrecord component
-
includeYTD
public boolean includeYTD()Returns the value of theincludeYTDrecord component.- Returns:
- the value of the
includeYTDrecord component
-
keyParam
Returns the value of thekeyParamrecord component.- Returns:
- the value of the
keyParamrecord component
-