Class NewsItem

Index Home MAE > MAE Architecture > MAE Data Types > Class Index > Class NewsItem

Summary
Public Methods
NewsItem(id)
NewsItem(data)
NewsItem()
inline bool valid() const
void clear()
string toString() const
inline DbRecNum getId() const
inline time_t getPostTime() const
inline DbRecNum getPostedBy() const
inline DbRecNum getPostedFor() const
inline bool getPriority() const
inline const string& getDomain() const
inline const string& getMessage() const
inline void setPostTime(newPostTime)
inline void setPostedBy(newPostedBy)
inline void setPostedFor(newPostedFor)
inline void setPriority(newPriority)
inline void setDomain(newDomain)
inline void setMessage(newMessage)
void set(data)
HashArray toHashArray(forDB) const
inline XMLData toXML() const
static DbRecList getNewsItems(sincetime, domain, postedby, postedfor, count)
DbRecNum save()
Protected Methods
bool load(id)
Private Properties
Private Methods
static bool initdb()
DbRecNum append()
See Also

#include <NewsItem.h >

Summary

Class to manage articles in MAE's news system. This system is handy for managing news to distribute to users in the system.

Public Methods

NewsItem(id)

DbRecNum id


constructors

NewsItem(data)

const HashArray& data


NewsItem()

inline bool valid() const

Determine if this is valid data or not

void clear()

string toString() const

inline DbRecNum getId() const

Basic GET functions

inline time_t getPostTime() const

inline DbRecNum getPostedBy() const

inline DbRecNum getPostedFor() const

inline bool getPriority() const

inline const string& getDomain() const

inline const string& getMessage() const

inline void setPostTime(newPostTime)

time_t newPostTime


Basic SET functions

inline void setPostedBy(newPostedBy)

DbRecNum newPostedBy


inline void setPostedFor(newPostedFor)

DbRecNum newPostedFor


inline void setPriority(newPriority)

bool newPriority


inline void setDomain(newDomain)

const string& newDomain


inline void setMessage(newMessage)

const string& newMessage


void set(data)

const HashArray& data


HashArray toHashArray(forDB) const

bool forDB

Default value: false


convert structure data to HashArray

inline XMLData toXML() const

convert structure data to XML

static DbRecList getNewsItems(sincetime, domain, postedby, postedfor, count)

time_t sincetime

Default value: 0

const string& domain

Default value: ""

DbRecNum postedby

Default value: 0

DbRecNum postedfor

Default value: 0

int count

Default value: 0


DbRecNum save()

save the record

Protected Methods

bool load(id)

DbRecNum id


load data from db

Private Properties

DbRecNum id

CORE DATA BEGIN

time_t PostTime

DbRecNum PostedBy

DbRecNum PostedFor

bool Priority

string Domain

string Message

bool changed

static Datastore db


Private Methods

static bool initdb()

make sure we're connected to our table

DbRecNum append()

save if changed

See Also

NewsSystem database table