38 void rename(std::string value);
57 void apply(std::string nameValue,
int yearValue, std::vector<std::string> analysisIdsValue);
108 void moveAnalysisId(
const std::string& value, std::size_t newPosition);
120 [[nodiscard]]
bool hasYear() const noexcept;
126 [[nodiscard]]
bool isEmpty() const noexcept;
132 std::vector<std::
string> analysisIds_;
133 std::
string createdAt_;
134 std::
string updatedAt_;
138 [[nodiscard]] const std::
string&
id() const noexcept;
139 [[nodiscard]] const std::
string&
name() const noexcept;
140 [[nodiscard]] const
int&
year() const noexcept;
141 [[nodiscard]] const std::vector<std::
string>&
analysisIds() const noexcept;
142 [[nodiscard]] const std::
string&
createdAt() const noexcept;
143 [[nodiscard]] const std::
string&
updatedAt() const noexcept;
146 void setId(std::
string value);
Shared annual validation helpers.
Small value object for normalized entity display names.
Value object for annual year validation.
void moveAnalysisId(const std::string &value, std::size_t newPosition)
Moves an analysis id to a new position.
void setAnalysisIds(std::vector< std::string > value)
Replaces the linked analysis ids with normalized values.
std::size_t analysisCount() const noexcept
Returns the number of linked analysis ids.
void apply(std::string nameValue, int yearValue, std::vector< std::string > analysisIdsValue)
Applies the complete annual definition in one normalized domain step.
std::size_t indexOfAnalysisId(const std::string &value) const
Returns the index of an analysis id.
void addAnalysisId(std::string value)
Adds an analysis id when it is not already present.
void setId(std::string value)
Annual(const Annual &)=delete
void setUpdatedAt(std::string value)
void setYear(Year value)
Sets the annual year from a value object.
Annual & operator=(const Annual &)=delete
const int & year() const noexcept
void removeAnalysisId(const std::string &value)
Removes an analysis id from the annual aggregate.
const std::vector< std::string > & analysisIds() const noexcept
void setCreatedAt(std::string value)
const std::string & updatedAt() const noexcept
void clearAnalysisIds()
Clears all linked analysis ids.
bool isEmpty() const noexcept
Checks whether the annual aggregate is empty.
void insertAnalysisId(std::string value, std::size_t position)
Inserts an analysis id at a requested position.
bool containsAnalysisId(const std::string &value) const
Checks whether an analysis id exists.
void rename(EntityName value)
Renames the annual aggregate with normalized entity text.
const std::string & createdAt() const noexcept
const std::string & name() const noexcept
Annual & operator=(Annual &&)=delete
bool hasYear() const noexcept
Checks whether the annual year is valid.