37 void rename(std::string value);
83 void moveTransaction(
const std::string& value, std::size_t newPosition);
105 [[nodiscard]]
bool empty() const noexcept;
110 std::vector<std::
string> transactionIds_;
111 std::
string createdAt_;
112 std::
string updatedAt_;
116 [[nodiscard]] const std::
string&
id() const noexcept;
117 [[nodiscard]] const std::
string&
name() const noexcept;
118 [[nodiscard]] const std::vector<std::
string>&
transactionIds() const noexcept;
119 [[nodiscard]] const std::
string&
createdAt() const noexcept;
120 [[nodiscard]] const std::
string&
updatedAt() const noexcept;
123 void setId(std::
string value);
Small value object for normalized entity display names.
Shared statement membership and normalization helpers.
const std::string & updatedAt() const noexcept
Statement & operator=(Statement &&)=delete
void addTransaction(std::string value)
Adds a normalized transaction id when it is not already present.
std::size_t transactionCount() const noexcept
Returns the number of linked transactions.
bool containsTransaction(const std::string &value) const
Checks whether a transaction id exists.
Statement(const Statement &)=delete
void removeTransaction(const std::string &value)
Removes a transaction id from the statement.
void moveTransaction(const std::string &value, std::size_t newPosition)
Moves a transaction id to a new position.
const std::string & name() const noexcept
const std::string & createdAt() const noexcept
void clearTransactions()
Clears all linked transactions.
void setTransactionIds(std::vector< std::string > value)
Replaces the transaction id list with normalized values.
void setCreatedAt(std::string value)
void insertTransaction(std::string value, std::size_t position)
Inserts a transaction id at a requested position.
const std::vector< std::string > & transactionIds() const noexcept
bool empty() const noexcept
Checks whether the statement is empty.
std::size_t indexOfTransaction(const std::string &value) const
Returns the index of a transaction id.
void setId(std::string value)
void setUpdatedAt(std::string value)
bool hasTransactionAt(std::size_t index) const noexcept
Checks whether a transaction exists at a given index.
void rename(EntityName value)
Renames the statement with normalized entity text.
Statement(Statement &&)=delete
Statement & operator=(const Statement &)=delete