refacturing

This commit is contained in:
Martin Brodbeck 2018-07-12 14:38:22 +02:00
parent 9c624065bb
commit 051ed3e730
3 changed files with 3 additions and 3 deletions

View file

@ -174,7 +174,7 @@ unsigned int Database::storeSellers(std::vector<Seller>& sellers)
sqlite3_bind_text(stmt, sqlite3_bind_parameter_index(stmt, ":last_name"),
seller.getLastName().c_str(), -1, nullptr);
sqlite3_bind_int(stmt, sqlite3_bind_parameter_index(stmt, ":num_offered_articles"),
seller.getNumberOfOfferedArticles());
seller.numArticlesOffered());
retCode = sqlite3_step(stmt);

View file

@ -13,7 +13,7 @@ void Entity::createUuid()
uuid_ = generator();
}
void Entity::createUuidFromString(const std::string& uuidString)
void Entity::setUuidFromString(const std::string& uuidString)
{
boost::uuids::string_generator generator{};
uuid_ = generator(uuidString);

View file

@ -14,7 +14,7 @@ class Entity
virtual ~Entity() = 0;
const boost::uuids::uuid& getUuid() const { return uuid_; };
void createUuid();
void createUuidFromString(const std::string& uuidString);
void setUuidFromString(const std::string& uuidString);
virtual State getState() const;
void setState(State state) { state_ = state; }