FOSSredder 0.5.0
Loading...
Searching...
No Matches
core::domain::Property Class Reference

#include <Property.h>

Public Member Functions

 Property ()
 Property (const Property &)=delete
Property & operator= (const Property &)=delete
 Property (Property &&)=delete
Property & operator= (Property &&)=delete
void rename (EntityName value)
 Renames the property with normalized entity text.
void rename (std::string value)
 Renames the property with raw text.
void addAlias (Alias value)
 Adds a normalized alias when it is not already present.
void removeAlias (std::string value)
 Removes an alias.
void clearAliases ()
 Clears all aliases from the property.
void recordAliasHit (std::string value, std::string timestamp={})
 Records a usage hit for an alias.
bool hasAlias (const std::string &value) const
 Checks whether an alias exists on the property.
std::size_t aliasCount () const noexcept
 Returns the number of aliases.
void setContractIds (std::vector< std::string > value)
 Replaces all linked contract identifiers.
void addContractId (std::string value)
 Adds a linked contract identifier when it is not already present.
void removeContractId (std::string value)
 Removes a linked contract identifier.
void clearContractIds ()
 Clears all linked contract identifiers.
bool hasContractRelations () const noexcept
 Checks whether the property has at least one linked contract.
std::size_t contractCount () const noexcept
 Returns the number of linked contract identifiers.
const std::string & id () const noexcept
const std::string & name () const noexcept
const std::vector< Alias > & aliases () const noexcept
const std::vector< std::string > & contractIds () const noexcept
const std::string & createdAt () const noexcept
const std::string & updatedAt () const noexcept
void setId (std::string value)
void setAliases (std::vector< Alias > value)
void setCreatedAt (std::string value)
void setUpdatedAt (std::string value)

Detailed Description

Definition at line 19 of file Property.h.

Constructor & Destructor Documentation

◆ Property() [1/3]

core::domain::Property::Property ( )
default
Here is the caller graph for this function:

◆ Property() [2/3]

core::domain::Property::Property ( const Property & )
delete
Here is the call graph for this function:

◆ Property() [3/3]

core::domain::Property::Property ( Property && )
delete
Here is the call graph for this function:

Member Function Documentation

◆ addAlias()

void core::domain::Property::addAlias ( Alias value)

Adds a normalized alias when it is not already present.

Parameters
valueAlias to add.

Definition at line 34 of file Property.cpp.

Here is the call graph for this function:

◆ addContractId()

void core::domain::Property::addContractId ( std::string value)

Adds a linked contract identifier when it is not already present.

Parameters
valueContract identifier to add.

Definition at line 63 of file Property.cpp.

Here is the call graph for this function:

◆ aliasCount()

std::size_t core::domain::Property::aliasCount ( ) const
nodiscardnoexcept

Returns the number of aliases.

Returns
Alias count.

Definition at line 59 of file Property.cpp.

◆ aliases()

const std::vector< Alias > & core::domain::Property::aliases ( ) const
nodiscardnoexcept

Definition at line 90 of file Property.cpp.

◆ clearAliases()

void core::domain::Property::clearAliases ( )

Clears all aliases from the property.

Definition at line 47 of file Property.cpp.

◆ clearContractIds()

void core::domain::Property::clearContractIds ( )

Clears all linked contract identifiers.

Definition at line 76 of file Property.cpp.

◆ contractCount()

std::size_t core::domain::Property::contractCount ( ) const
nodiscardnoexcept

Returns the number of linked contract identifiers.

Returns
Contract relation count.

Definition at line 84 of file Property.cpp.

◆ contractIds()

const std::vector< std::string > & core::domain::Property::contractIds ( ) const
nodiscardnoexcept

Definition at line 91 of file Property.cpp.

◆ createdAt()

const std::string & core::domain::Property::createdAt ( ) const
nodiscardnoexcept

Definition at line 92 of file Property.cpp.

◆ hasAlias()

bool core::domain::Property::hasAlias ( const std::string & value) const
nodiscard

Checks whether an alias exists on the property.

Parameters
valueAlias text to search for.
Returns
true when the alias exists.

Definition at line 55 of file Property.cpp.

Here is the call graph for this function:

◆ hasContractRelations()

bool core::domain::Property::hasContractRelations ( ) const
nodiscardnoexcept

Checks whether the property has at least one linked contract.

Returns
true when any contract relation exists.

Definition at line 80 of file Property.cpp.

◆ id()

const std::string & core::domain::Property::id ( ) const
nodiscardnoexcept

Definition at line 88 of file Property.cpp.

◆ name()

const std::string & core::domain::Property::name ( ) const
nodiscardnoexcept

Definition at line 89 of file Property.cpp.

◆ operator=() [1/2]

Property & core::domain::Property::operator= ( const Property & )
delete
Here is the call graph for this function:

◆ operator=() [2/2]

Property & core::domain::Property::operator= ( Property && )
delete
Here is the call graph for this function:

◆ recordAliasHit()

void core::domain::Property::recordAliasHit ( std::string value,
std::string timestamp = {} )

Records a usage hit for an alias.

Parameters
valueAlias value.
timestampOptional usage timestamp.

Definition at line 51 of file Property.cpp.

Here is the call graph for this function:

◆ removeAlias()

void core::domain::Property::removeAlias ( std::string value)

Removes an alias.

Parameters
valueAlias to remove.

Definition at line 42 of file Property.cpp.

Here is the call graph for this function:

◆ removeContractId()

void core::domain::Property::removeContractId ( std::string value)

Removes a linked contract identifier.

Parameters
valueContract identifier to remove.

Definition at line 71 of file Property.cpp.

Here is the call graph for this function:

◆ rename() [1/2]

void core::domain::Property::rename ( EntityName value)

Renames the property with normalized entity text.

Parameters
valueNormalized entity name wrapper.

Definition at line 15 of file Property.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rename() [2/2]

void core::domain::Property::rename ( std::string value)

Renames the property with raw text.

Parameters
valueRaw entity name text.

Definition at line 19 of file Property.cpp.

Here is the call graph for this function:

◆ setAliases()

void core::domain::Property::setAliases ( std::vector< Alias > value)

Definition at line 23 of file Property.cpp.

Here is the call graph for this function:

◆ setContractIds()

void core::domain::Property::setContractIds ( std::vector< std::string > value)

Replaces all linked contract identifiers.

Parameters
valueContract identifiers.

Definition at line 28 of file Property.cpp.

◆ setCreatedAt()

void core::domain::Property::setCreatedAt ( std::string value)

Definition at line 95 of file Property.cpp.

◆ setId()

void core::domain::Property::setId ( std::string value)

Definition at line 94 of file Property.cpp.

◆ setUpdatedAt()

void core::domain::Property::setUpdatedAt ( std::string value)

Definition at line 96 of file Property.cpp.

◆ updatedAt()

const std::string & core::domain::Property::updatedAt ( ) const
nodiscardnoexcept

Definition at line 93 of file Property.cpp.


The documentation for this class was generated from the following files: