|
FOSSredder 0.5.0
|
#include <Transaction.h>
Public Types | |
| enum class | Status : int { Neutral = 0 , Unverified = 1 , Verified = 2 , Completed = 3 } |
Public Member Functions | |
| Transaction () noexcept | |
| Transaction (std::string nameValue, std::string bookingDateValue, std::string valutaValue, double amountValue, bool allocatableValue=false) | |
| Creates a transaction from raw inputs. | |
| Transaction (const Transaction &)=delete | |
| Transaction (Transaction &&)=delete | |
| Transaction & | operator= (const Transaction &)=delete |
| Transaction & | operator= (Transaction &&)=delete |
| void | setName (EntityName value) |
| Sets the transaction name from a value object. | |
| void | setName (std::string value) |
| Sets the transaction name from raw text. | |
| void | setBookingDate (BookingDate value) |
| Sets the booking date from a value object. | |
| void | setBookingDate (std::string value) |
| Sets the booking date from raw text. | |
| void | setValuta (std::string value) |
| Sets the valuta text. | |
| void | setAmount (MoneyAmount value) |
| Sets the amount from a value object. | |
| void | setAmount (double value) |
| Sets the amount from raw numeric input. | |
| void | setStatus (Status value) |
| Sets the transaction status. | |
| void | setContractId (std::string value) |
| Sets the contract id. | |
| void | setActorId (std::string value) |
| Sets the actor id. | |
| void | setStatementId (std::string value) |
| Sets the statement id. | |
| void | setAllocatable (bool value) |
| Sets the allocatable flag. | |
| void | clearContract () |
| Clears the linked contract id. | |
| void | clearActor () |
| Clears the linked actor id. | |
| void | clearStatement () |
| Clears the linked statement id. | |
| void | clearProperties () |
| Clears linked property ids. | |
| bool | hasStatus (Status value) const noexcept |
| Checks whether the transaction has a given status. | |
| bool | hasStatement () const noexcept |
| Checks whether the transaction is linked to a statement. | |
| bool | hasContract () const noexcept |
| Checks whether the transaction is linked to a contract. | |
| bool | hasActor () const noexcept |
| Checks whether the transaction is linked to an actor. | |
| bool | hasProperties () const noexcept |
| Checks whether the transaction is linked to properties. | |
| std::size_t | propertyCount () const noexcept |
| Returns the number of linked properties. | |
| bool | belongsToStatement (const std::string &value) const |
| Checks whether the transaction belongs to a statement. | |
| bool | isAllocatable () const noexcept |
| Checks whether the transaction can be allocated. | |
| void | markUnverified () |
| Advances the transaction to unverified status when allowed. | |
| void | markVerified () |
| Advances the transaction to verified status when allowed. | |
| void | markCompleted () |
| Advances the transaction to completed status when allowed. | |
| bool | hasRelations () const noexcept |
| Checks whether the transaction has any relations. | |
| bool | isStandalone () const noexcept |
| Checks whether the transaction is standalone. | |
| void | setPropertyIds (std::vector< std::string > value) |
| Replaces the property id list with normalized values. | |
| void | addPropertyId (std::string value) |
| Adds a property id when it is not already present. | |
| void | removePropertyId (const std::string &value) |
| Removes a property id from the transaction. | |
| bool | containsPropertyId (const std::string &value) const |
| Checks whether a property id exists. | |
| const std::string & | id () const noexcept |
| const std::string & | name () const noexcept |
| const std::string & | bookingDate () const noexcept |
| const std::string & | valuta () const noexcept |
| const double & | amount () const noexcept |
| const Status & | status () const noexcept |
| const std::string & | contractId () const noexcept |
| const std::string & | actorId () const noexcept |
| const std::string & | statementId () const noexcept |
| const std::vector< std::string > & | propertyIds () const noexcept |
| const std::string & | createdAt () const noexcept |
| const std::string & | updatedAt () const noexcept |
| void | setId (std::string value) |
| void | setCreatedAt (std::string value) |
| void | setUpdatedAt (std::string value) |
Definition at line 20 of file Transaction.h.
|
strong |
| Enumerator | |
|---|---|
| Neutral | |
| Unverified | |
| Verified | |
| Completed | |
Definition at line 22 of file Transaction.h.
|
defaultnoexcept |
| core::domain::Transaction::Transaction | ( | std::string | nameValue, |
| std::string | bookingDateValue, | ||
| std::string | valutaValue, | ||
| double | amountValue, | ||
| bool | allocatableValue = false ) |
Creates a transaction from raw inputs.
| nameValue | Raw transaction name. |
| bookingDateValue | Raw booking date. |
| valutaValue | Raw valuta text. |
| amountValue | Raw amount. |
| allocatableValue | Whether the transaction can be allocated. |
Definition at line 15 of file Transaction.cpp.
|
delete |
|
delete |
|
nodiscardnoexcept |
Definition at line 179 of file Transaction.cpp.
| void core::domain::Transaction::addPropertyId | ( | std::string | value | ) |
Adds a property id when it is not already present.
| value | Property id to add. |
Definition at line 154 of file Transaction.cpp.
|
nodiscardnoexcept |
Definition at line 176 of file Transaction.cpp.
|
nodiscard |
Checks whether the transaction belongs to a statement.
| value | Statement id to compare. |
Definition at line 115 of file Transaction.cpp.
|
nodiscardnoexcept |
Definition at line 174 of file Transaction.cpp.
| void core::domain::Transaction::clearActor | ( | ) |
Clears the linked actor id.
Definition at line 79 of file Transaction.cpp.
| void core::domain::Transaction::clearContract | ( | ) |
Clears the linked contract id.
Definition at line 75 of file Transaction.cpp.
| void core::domain::Transaction::clearProperties | ( | ) |
Clears linked property ids.
Definition at line 87 of file Transaction.cpp.
| void core::domain::Transaction::clearStatement | ( | ) |
Clears the linked statement id.
Definition at line 83 of file Transaction.cpp.
|
nodiscard |
Checks whether a property id exists.
| value | Property id to search for. |
Definition at line 167 of file Transaction.cpp.
|
nodiscardnoexcept |
Definition at line 178 of file Transaction.cpp.
|
nodiscardnoexcept |
Definition at line 182 of file Transaction.cpp.
|
nodiscardnoexcept |
Checks whether the transaction is linked to an actor.
Definition at line 103 of file Transaction.cpp.
|
nodiscardnoexcept |
Checks whether the transaction is linked to a contract.
Definition at line 99 of file Transaction.cpp.
|
nodiscardnoexcept |
Checks whether the transaction is linked to properties.
Definition at line 107 of file Transaction.cpp.
|
nodiscardnoexcept |
Checks whether the transaction has any relations.
Definition at line 141 of file Transaction.cpp.
|
nodiscardnoexcept |
Checks whether the transaction is linked to a statement.
Definition at line 95 of file Transaction.cpp.
|
nodiscardnoexcept |
Checks whether the transaction has a given status.
| value | Status value to compare. |
Definition at line 91 of file Transaction.cpp.
|
nodiscardnoexcept |
Definition at line 172 of file Transaction.cpp.
|
nodiscardnoexcept |
Checks whether the transaction can be allocated.
Definition at line 119 of file Transaction.cpp.
|
nodiscardnoexcept |
Checks whether the transaction is standalone.
Definition at line 145 of file Transaction.cpp.
| void core::domain::Transaction::markCompleted | ( | ) |
Advances the transaction to completed status when allowed.
Definition at line 135 of file Transaction.cpp.
| void core::domain::Transaction::markUnverified | ( | ) |
Advances the transaction to unverified status when allowed.
Definition at line 123 of file Transaction.cpp.
| void core::domain::Transaction::markVerified | ( | ) |
Advances the transaction to verified status when allowed.
Definition at line 129 of file Transaction.cpp.
|
nodiscardnoexcept |
Definition at line 173 of file Transaction.cpp.
|
delete |
|
delete |
|
nodiscardnoexcept |
Returns the number of linked properties.
Definition at line 111 of file Transaction.cpp.
|
nodiscardnoexcept |
Definition at line 181 of file Transaction.cpp.
| void core::domain::Transaction::removePropertyId | ( | const std::string & | value | ) |
Removes a property id from the transaction.
| value | Property id to remove. |
Definition at line 162 of file Transaction.cpp.
| void core::domain::Transaction::setActorId | ( | std::string | value | ) |
Sets the actor id.
| value | Raw actor id text. |
Definition at line 63 of file Transaction.cpp.
| void core::domain::Transaction::setAllocatable | ( | bool | value | ) |
Sets the allocatable flag.
| value | Allocatable flag. |
Definition at line 71 of file Transaction.cpp.
| void core::domain::Transaction::setAmount | ( | double | value | ) |
Sets the amount from raw numeric input.
| value | Raw amount. |
Definition at line 51 of file Transaction.cpp.
| void core::domain::Transaction::setAmount | ( | MoneyAmount | value | ) |
Sets the amount from a value object.
| value | Normalized money amount wrapper. |
Definition at line 47 of file Transaction.cpp.
| void core::domain::Transaction::setBookingDate | ( | BookingDate | value | ) |
Sets the booking date from a value object.
| value | Normalized booking date wrapper. |
Definition at line 35 of file Transaction.cpp.
| void core::domain::Transaction::setBookingDate | ( | std::string | value | ) |
Sets the booking date from raw text.
| value | Raw booking date text. |
Definition at line 39 of file Transaction.cpp.
| void core::domain::Transaction::setContractId | ( | std::string | value | ) |
Sets the contract id.
| value | Raw contract id text. |
Definition at line 59 of file Transaction.cpp.
| void core::domain::Transaction::setCreatedAt | ( | std::string | value | ) |
Definition at line 185 of file Transaction.cpp.
| void core::domain::Transaction::setId | ( | std::string | value | ) |
Definition at line 184 of file Transaction.cpp.
| void core::domain::Transaction::setName | ( | EntityName | value | ) |
Sets the transaction name from a value object.
| value | Normalized entity name wrapper. |
Definition at line 27 of file Transaction.cpp.
| void core::domain::Transaction::setName | ( | std::string | value | ) |
Sets the transaction name from raw text.
| value | Raw transaction name text. |
Definition at line 31 of file Transaction.cpp.
| void core::domain::Transaction::setPropertyIds | ( | std::vector< std::string > | value | ) |
Replaces the property id list with normalized values.
| value | Property id list to store. |
Definition at line 149 of file Transaction.cpp.
| void core::domain::Transaction::setStatementId | ( | std::string | value | ) |
Sets the statement id.
| value | Raw statement id text. |
Definition at line 67 of file Transaction.cpp.
| void core::domain::Transaction::setStatus | ( | Status | value | ) |
Sets the transaction status.
| value | Transaction status value. |
Definition at line 55 of file Transaction.cpp.
| void core::domain::Transaction::setUpdatedAt | ( | std::string | value | ) |
Definition at line 186 of file Transaction.cpp.
| void core::domain::Transaction::setValuta | ( | std::string | value | ) |
Sets the valuta text.
| value | Raw valuta text. |
Definition at line 43 of file Transaction.cpp.
|
nodiscardnoexcept |
Definition at line 180 of file Transaction.cpp.
|
nodiscardnoexcept |
Definition at line 177 of file Transaction.cpp.
|
nodiscardnoexcept |
Definition at line 183 of file Transaction.cpp.
|
nodiscardnoexcept |
Definition at line 175 of file Transaction.cpp.