/*
* Created On : 2006/02/10
* Revision : 1.0.0
* Purpose : Represents Payscale
* Note : Files without revision and date of creation are to be ignored
*/
#ifndef RANGE_H
#define RANGE_H
#include "List.h"
class RangeDetailItem : public ListItem {
public:
RangeDetailItem() ;
RangeDetailItem( Indicator );
~RangeDetailItem() {}
int minRange() const;
void setMinRange( int iMinRange );
int maxRange() const;
void setMaxRange( int iMaxRange );
/*
int annualIncrement() const;
void setAnnualIncrement( int iAnnualIncrement );
*/
bool load( Q_LLONG lFkeyId );
bool insert();
bool update();
bool remove();
private:
//int m_iAnnualIncrement;
int m_iMaxRange;
int m_iMinRange;
};
class RangeDetail : public List<RangeDetailItem> {
public:
RangeDetail():List<RangeDetailItem>(
"fki_range_id",
"pki_range_detail_id",
"tbl_hrms_range_detail"){}
~RangeDetail() {};
};
class Range : public DataComponent {
public:
Range();
void setCode( const QString& strCode );
void setRemark( const QString& strRemark );
RangeDetail detail() const ;
void setDetail( const RangeDetail& rangeDetail );
bool load( Q_LLONG lPkeyId );
bool insert();
bool update();
bool remove();
private:
bool validateInsert();
bool validateUpdate();
private:
RangeDetail m_rdDetail;
};
//__RangeDetailItem_________________________________________________________
inline RangeDetailItem::RangeDetailItem()
:ListItem( ListItem::Insert,
"fki_range_id",
"pki_range_detail_id",
"tbl_hrms_range_detail") {}
inline RangeDetailItem::RangeDetailItem( Indicator ind )
:ListItem( ind, "fki_range_id",
"pki_range_detail_id", "tbl_hrms_range_detail" ) {}
inline int RangeDetailItem::minRange() const {
return m_iMinRange;
}
inline void RangeDetailItem::setMinRange( int iMinRange ) {
m_iMinRange = iMinRange;
}
inline int RangeDetailItem::maxRange() const {
return m_iMaxRange;
}
inline void RangeDetailItem::setMaxRange( int iMaxRange ) {
m_iMaxRange = iMaxRange;
}
/*
inline int RangeDetailItem::annualIncrement() const {
return m_iAnnualIncrement;
}
inline void PayscaleDetailItem::setAnnualIncrement( int iAnnualIncrement ) {
m_iAnnualIncrement = iAnnualIncrement;
}
*/
//__Payscale_________________________________________________________
inline Range::Range():DataComponent(
"uvc_range_code","pki_range_id", "tbl_hrms_range") {}
inline QString Range
::code() const { return m_strCode;
}
inline void Range::setCode( const QString& strCode ) {
m_strCode = strCode.stripWhiteSpace();
}
inline QString Range
::remark() const { return m_strRemark;
}
inline void Range::setRemark( const QString& strRemark ) {
m_strRemark = strRemark.stripWhiteSpace();
}
inline RangeDetail Range::detail() const {
return m_rdDetail;
}
inline void Range::setDetail( const RangeDetail& rangeDetail ) {
m_rdDetail = rangeDetail;
}
#endif // RANGE_H
Bookmarks