gSAFE
1.3.8
|
#include <datalib.h>
Public Slots | |
void | disableControlSlot (void) |
void | enableControlSlot (void) |
Signals | |
void | dataChanged (void) |
void | disableControl (void) |
void | enableControl (void) |
void | updateStaticDisplayElementsSignal (void) |
Signals inherited from HSqlHandler | |
void | errorSignal (QString err) |
Public Member Functions | |
HDataField (QString _sqlColumn, QString _explain, QString tit, QString _tailstr="", bool _editable=true) | |
HDataField (HDataField *t) | |
~HDataField (void) | |
virtual bool | acceptFunction (void) |
virtual bool | acceptSubselect (void) |
void | addMark (QString mark) |
void | addMark (QStringList pmarkers) |
void | addNotValidValue (QString v) |
void | addRole (HDataFieldRole role) |
QStringList | allMarker (void) |
HDataField * | asColored (int r, int g, int b) |
HDataField * | asConstant (void) |
HDataField * | asHide (void) |
void | clearMarkers (void) |
void | clearNotValidValues (void) |
void | clearRoles (void) |
void | clearSqlSynced (void) |
virtual QVariant | dbValueToDispValue (QVariant v) |
void | deepcopy_from_hdatafield (HDataField *x) |
QVariant | defvalParser (QString s) |
void | delRole (QString name) |
void | doSet (void) |
int | editBoxMaxWidth (void) |
virtual HDataField * | get_clone (void) |
int | getBColor (void) |
QString | getDefaultValue (void) |
virtual QVariant | getDispValue () |
QString | getExplainText (void) |
QString | getFunction (void) |
int | getGColor (void) |
bool | getLastValidateStatus () |
bool | getPermanentValidateStatus () |
int | getPrintCellWidth (void) |
int | getRColor (void) |
QString | getSpecDisplaySortMode (void) |
virtual QString | getSQLValue (void) |
virtual QString | getSQLValueAsString (void) |
QString | getSubselect (void) |
QString | getTailText (void) |
QString | getTitleText (void) |
virtual QVariant | getValue (void) |
bool | hasMark (QString mark) |
bool | isEditable (void) |
bool | isGuienabled (void) |
bool | isLogged (void) |
bool | isMeldedWithNext (void) |
bool | isNoMiddleStretch (void) |
bool | isPrintCellWrap (void) |
bool | isReallyChanged (void) |
bool | isSet (void) |
bool | isShow (void) |
bool | isSQLField (void) |
virtual QString | lowerValidate (void) |
void | meldWithNext (void) |
void | noMiddleStretch (void) |
void | notSet (void) |
void | resetFunction (void) |
void | resetLogging (void) |
void | resetMeldWithNext (void) |
void | resetNoMiddleStretch (void) |
void | resetSubselect (void) |
void | resetValidateStatus () |
int | returnToDefault (void) |
void | setColor (int r, int g, int b) |
void | setData (QString _sqlColumn, QString _explain, QString tit, QString _tailstr="", bool _editable=true) |
virtual int | setDefval (QVariant v) |
void | setEditable (void) |
void | setEditBoxMaxWidth (int max) |
void | setExplainText (QString expl) |
void | setFunction (QString func) |
void | setGuidisabled (void) |
void | setGuienabled (void) |
void | setHide (void) |
void | setLogging (void) |
void | setMaulallyValidateError (QString message) |
void | setNotValidValues (QStringList nvl) |
void | setPrintCellNoWrap (void) |
void | setPrintCellWidth (int w) |
void | setPrintCellWrap (void) |
void | setReadonly (void) |
void | setShow (void) |
void | setSpecDisplaySortMode (QString m) |
void | setSubselect (QString subs) |
void | setTailText (QString tail) |
void | setTitleText (QString titl) |
void | setValidator (QString v="") |
virtual int | setValue (QVariant v, bool sdisabled=false) |
virtual QString | sqlCreateStringPart (QString switches="") |
virtual QString | sqlInsertHead (void) |
virtual QString | sqlInsertValue (void) |
virtual QString | sqlSelectHead (void) |
void | sqlSynced (HDataChangeLogger *dclog=NULL, bool forcechange=false, bool forcelog=false) |
virtual QString | sqlUpdate (void) |
void | useRole (QString name) |
QString | validate (void) |
virtual void | value_changed () |
Public Member Functions inherited from HSqlHandler | |
HSqlHandler (void) | |
~HSqlHandler (void) | |
QSqlQuery * | allocateQSqlQuery (void) |
void | cloneSqlSettingsFrom (HSqlHandler *other) |
void | commit (void) |
bool | errorStatus (void) |
void | rollback (void) |
bool | submit0ResultQuery (QString q, QString err, bool tdisabled=false) |
QVariant | submit1ResultQuery (QString q, QString err, bool tdisabled=false) |
HPlainDataMatrix * | submitNResultQuery (int N, QString q, QString err, bool tdisabled=false) |
void | transaction (void) |
QSqlDatabase | workDB (void) |
Public Member Functions inherited from HSqlInterface | |
HSqlInterface () | |
~HSqlInterface () | |
void | cloneSqlInterfaceSettingsFrom (HSqlInterface *other) |
HSqlSingleInterface * | myInterface (void) |
QString | sqlConcatenateToLocal (QString string) |
QString | sqlConcatenateToLocal (QStringList fields) |
Public Member Functions inherited from HBase | |
HBase (void) | |
~HBase (void) | |
QString | getWhoami (void) |
Public Attributes | |
QString | conn_sqlTable |
bool | connected |
Protected Attributes | |
int | color_b |
int | color_g |
int | color_r |
QString | defval |
QString | derived |
bool | editable |
int | editboxmaxwidth |
QString | explain |
QString | function |
bool | guienabled |
bool | lastvalidate_result |
bool | logged |
QString | manual_validate_error |
QStringList | markers |
bool | meldwithnext |
bool | nomiddlestretch |
QStringList | notvalid |
bool | permanentvalidate_result |
QList< HDataFieldRole > | roles |
int | set |
bool | show |
QString | spec_disp_sort |
bool | sql |
QString | sqlColumn |
bool | sync_valueInSql |
QString | tailstr |
QString | title |
QString | valid |
QString | valueInSql |
bool | wcell_print |
int | wcellw_print |
Protected Attributes inherited from HSqlHandler | |
bool | query_error_occured |
Protected Attributes inherited from HBase | |
QString | whoami |
Additional Inherited Members | |
Static Public Member Functions inherited from HSqlHandler | |
static void | setCustomSqlDatabase (QString databaseName, QString sqlinterfacename="") |
static void | setDefaultSqlDatabase (void) |
Static Public Member Functions inherited from HSqlInterface | |
static HSqlSingleInterface * | currentDefaultSqlInterface (void) |
static HSqlSingleInterface * | getSqlInterface (QString interfacename) |
static void | setSqlMode (QString modename) |
static void | setSqlModeBackToFirst (void) |
Static Public Attributes inherited from HSqlHandler | |
static int | trans = 0 |
HDataField is the base SQL field class. Every data field inherited from this class. It means that the HTableBase (so the HTable and HList too) contains HTableField descendants as data fields. As the base data field class, you can specify many properties which are in all field. This common attributes:
You can use a role system to set some attributes together to customize the tables to different environments. (See: HDataFieldRole)
Every new data type and field have to inherit from here, because the HTable,HList,HTableBase,etc classes use functions of this class to build the sql queries set the values, etc. If a data field require a different kind of sql handling, it has to redefine the functions of HDataField.
HDataField::HDataField | ( | QString | _sqlColumn, |
QString | _explain, | ||
QString | tit, | ||
QString | _tailstr = "" , |
||
bool | _editable = true |
||
) |
Constructor. Creates an HDataField instance. About the meaning of parameters see the class description.
_sqlColumn | sets the sqlColumn attribute |
_explain | sets the explain text of the field |
tit | sets the title text of the field |
_tailstr | sets the tail text of the field |
_editable | sets the editable attribute of the field |
Definition at line 5073 of file datalib.cpp.
HDataField::~HDataField | ( | void | ) |
Destructor
Definition at line 5180 of file datalib.cpp.
HDataField::HDataField | ( | HDataField * | t | ) |
Deepcopy constructor. It clones the parameter HDataField to itself. It copies the full data structure and state and attributes and values of the parameter field.
t | the source field |
Definition at line 5118 of file datalib.cpp.
|
inlinevirtual |
If this functions returns true then the field accepts sql functions. Otherwise the setFunction() function is do nothing This function can be redefined in descendats!
Reimplemented in HDate, HFloating, HNumber, HLargeText, and HSmallText.
|
inlinevirtual |
If this functions returns true then the field accepts sql subselects instead of read a simple value. Otherwise setSubselect() function is do nothing This function can be redefined in descendats!
Reimplemented in HDate, HFloating, HNumber, HLargeText, and HSmallText.
void HDataField::addMark | ( | QString | mark | ) |
Adds a new marker to the field. You can use this markes in higher levels (HTableBase,HTable,HList) You can create groups of fields with these markers, and later you can set some attribute or do something in batch on this group. Every field can have more markers, and later you can hide,show,coloring,set readonly, or do other things on fields which are marked with a specified marker. The markers are strings.
mark | marker to add. |
Definition at line 5460 of file datalib.cpp.
void HDataField::addMark | ( | QStringList | pmarkers | ) |
Adds more then one marker to the field
Definition at line 5466 of file datalib.cpp.
void HDataField::addNotValidValue | ( | QString | v | ) |
Adds a disabled value (Can be added more than one disabled value) If the user modified a value which match with one of this disabled values the validation reject the modification.
Definition at line 5196 of file datalib.cpp.
void HDataField::addRole | ( | HDataFieldRole | role | ) |
Add a new role to this field. Every field can have more different named roles.
Definition at line 5489 of file datalib.cpp.
QStringList HDataField::allMarker | ( | void | ) |
|
inline |
Sets the color of the field and return it
r | red component value 0-255 |
g | green component value 0-255 |
b | blue component value 0-255 |
|
inline |
|
inline |
void HDataField::clearMarkers | ( | void | ) |
void HDataField::clearNotValidValues | ( | void | ) |
void HDataField::clearRoles | ( | void | ) |
Clears every roles from this data field.
Definition at line 5509 of file datalib.cpp.
void HDataField::clearSqlSynced | ( | void | ) |
Clears the valueInSql and sync_valueInSql attributes to the default. It meand that this field lose the information about the value in sql. Use this function if you detach the fild from the sql field. For example if you readed a HTable record and you want to save as another independent record.
Definition at line 5583 of file datalib.cpp.
|
signal |
Signs if the data changed. This passed to the HTableBase.
|
virtual |
Converting function, you can give a HDataFiled(or descendant) value to this function, and you get the corresponding sql value of the given value.
This function usally redefined in descendats!
In simple typed fields this function do a trivial conversion for example a text field do "text"->"'text'" conversion. Other cases where the field is more complex (HSqlChoose for example) this conversion can be more complex.
In HSqlChoose can be:
"Joe Black" -> "id_0123"
"Little Richard" -> "id_03453"
"John Wayne" -> "id_0197"
etc...
In a HCharHash the result can be:
"Animal" -> "a"
"Plant" -> "p"
"Objects" -> "o"
etc...
Reimplemented in HSqlChoose, HTimestamp, HFloating, HCheck, HNumber, HNumHash, HCharHash, and HSmallText.
Definition at line 5309 of file datalib.cpp.
void HDataField::deepcopy_from_hdatafield | ( | HDataField * | x | ) |
Deepcopy function. It clones the parameter HDataField to itself. It copies the full data structure and state and attributes and values of the parameter field.
t | the source field |
Definition at line 5123 of file datalib.cpp.
QVariant HDataField::defvalParser | ( | QString | s | ) |
Reads the given default value text and returns as a HDataField value.
If you pass "DEFVAL_SQL(query_text)" string as default text, the "query_text" will be executed in sql database by this function, and the really defval will be the result. Usally you don't need to call this function. It's called by other functions automatically.
Definition at line 5326 of file datalib.cpp.
void HDataField::delRole | ( | QString | name | ) |
Delete the parameter named role from this field.
Definition at line 5494 of file datalib.cpp.
|
inlineslot |
|
inline |
|
inline |
Returns the maximum width of the QLineEdit boxes when the field is edited in a HDispTable.
|
inlineslot |
Emits the enableControl signal. Enables the previously disabled field
|
virtual |
Gives a clone of this HTableField (or descendants).
Reimplemented in HSqlChoose, HTimestamp, HDate, HFloating, HCheck, HStatic, HNumber, HNumHash, HCharHash, HLargeText, HSmallText, HConnect, and HKey.
Definition at line 5175 of file datalib.cpp.
|
inline |
|
inline |
|
inlinevirtual |
Returns the current value in sql format. Actually calls dbValueToDispValue() to the current value This function can be redefined in descendats!
|
inline |
|
inline |
Returns the currently actualized function of the field
|
inline |
|
inline |
Returns true if the last validation failed on this field. If the function returned true the field pass the validation.
|
inline |
Returns true if the last validation failed on this field. If the function returned true the field pass the validation. YOU CAN'T RESET THE RESULT OF THIS FUNCTION with resetValidateStatus() ! If a validation error make this function to return true, it will only return false again if the field gets a new value which pass the validation!
|
inline |
|
inline |
|
inline |
Gets the special sorting mode of the field
|
virtual |
Returns the value of the field in that format which accepted by the sql database.
Reimplemented in HSqlChoose, HTimestamp, HDate, HFloating, HCheck, HStatic, HNumber, HNumHash, HCharHash, HLargeText, HSmallText, HConnect, and HKey.
Definition at line 5408 of file datalib.cpp.
|
virtual |
Returns string format of the field's value. Very similar to getSQLValue() but the result is always acceptable in an sql varchar field. (Mostly used by the logger system, when every kind of values are stored in varchar. The gsafe try to keep the value as close to the original sql database value as possible)
Reimplemented in HSqlChoose, HTimestamp, HDate, HFloating, HCheck, HStatic, HNumber, HNumHash, HCharHash, HLargeText, HSmallText, HConnect, and HKey.
Definition at line 5413 of file datalib.cpp.
|
inline |
Returns the currently actualized subselect of the field
|
inline |
|
inline |
|
virtual |
Returns the value of the field.
Reimplemented in HSqlChoose, HTimestamp, HDate, HFloating, HCheck, HStatic, HNumber, HNumHash, HCharHash, HLargeText, HSmallText, HConnect, and HKey.
Definition at line 5418 of file datalib.cpp.
bool HDataField::hasMark | ( | QString | mark | ) |
Returns true if the field have that marker given as parameter, otherwise false.
Definition at line 5472 of file datalib.cpp.
|
inline |
Returns true if the field is editable, false if readonly.
|
inline |
Returns true if the guiedabled attribute is true
|
inline |
Returns true if the field to log the changes on sql database
|
inline |
Returns true if the meldwithnext attribute is set.
|
inline |
Returns true if the nomiddlestretch attribute is set.
|
inline |
bool HDataField::isReallyChanged | ( | void | ) |
Returns true if the value is changed according to the sql database value. The normal isSet() function have already returns true that case the user changed the value to something else and set back to the original. But this function compares the readed sql value with the current, this means that this function always returns the effective changing status.
Definition at line 5589 of file datalib.cpp.
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Subtype (descendant) specific validation. (In HDataField this function does nothing) Descendants can be redefine this function to handle their validations.
|
inline |
Sets the meldwithnext attribute to true. It is actualized in gui in HDispTable: If this attrubute is true this datafield will be melded to the next, so they will appear in one line. Useful if you would like to place more value editor in one line, which can be the three color components integer for example. Otherwise all field will be appear separated line.
|
inline |
Sets the nomiddlestretch attribute to true. It is actualized in gui in HDispTable: The gui don't put stretch between the explain text and the value editor. Can be useful that cases when we have melded fields.
|
inline |
|
inline |
Resets the function attrubute of the field
|
inline |
Clears the field to log the changes on sql database
|
inline |
Sets the meldwithnext attribute to false.
|
inline |
Sets the nomiddlestretch attribute to false.
|
inline |
Resets the subselect attribute of the field
|
inline |
Clears the result of the last validation returned by getLastValidateStatus() . (Gui classes calls this function after queries the status)
int HDataField::returnToDefault | ( | void | ) |
Sets the value of the data field to the default.
Definition at line 5314 of file datalib.cpp.
void HDataField::setColor | ( | int | r, |
int | g, | ||
int | b | ||
) |
Sets the color of the field (appear in gui)
r | red component value 0-255 |
g | green component value 0-255 |
b | blue component value 0-255 |
Definition at line 5383 of file datalib.cpp.
void HDataField::setData | ( | QString | _sqlColumn, |
QString | _explain, | ||
QString | tit, | ||
QString | _tailstr = "" , |
||
bool | _editable = true |
||
) |
Sets some base data
_sqlColumn | sets the sqlColumn attribute |
_explain | sets the explain text of the field |
tit | sets the title text of the field |
_tailstr | sets the tail text of the field |
_editable | sets the editable attribute of the field |
Definition at line 5373 of file datalib.cpp.
|
virtual |
Sets the default value of the field.
Reimplemented in HSqlChoose, HTimestamp, HDate, HFloating, HCheck, HStatic, HNumber, HNumHash, HCharHash, HLargeText, HSmallText, HConnect, and HKey.
Definition at line 5401 of file datalib.cpp.
void HDataField::setEditable | ( | void | ) |
Sets the field to editable (Removes readonly attribute)
Definition at line 5443 of file datalib.cpp.
|
inline |
Sets the maximum width of the QLineEdit boxes when the field is edited in a HDispTable. If the value is 0 then the maximum is not specified. (This attribute only works on that kind of fields which are edited with QLineEdit)
void HDataField::setExplainText | ( | QString | expl | ) |
Sets the explain text of the field. It does not change/refresh the already builded gui components! (See HFloatTable class description)
Definition at line 5228 of file datalib.cpp.
void HDataField::setFunction | ( | QString | func | ) |
Sets an sql function to this data field. When an sql query executed, the value of this field is queried with this function. Fox example you set "date" as function and this field is a "timestamp" named timestamp field then the sql select queries the value this way: date(timestamp)
THIS ONLY WORKS IF THE FIELD IS READ ONLY. (Because it can be conflict if you would like to re-store this converted value)
Currently the following typed fiels accept this function: HSmallText,HLargeText,HNumber,HFloating,HDate
The accesibility of this function is signed by the acceptFunction() function.
Definition at line 5214 of file datalib.cpp.
|
inline |
Sets the guienabled attribute to false (Gui editor is disabled)
|
inline |
Sets the guienabled attribute to true (Gui editor is enabled)
|
inline |
|
inline |
Sets the field to log the data changes on sql database
void HDataField::setMaulallyValidateError | ( | QString | message | ) |
You can set an external validate error manually with this function. Useful to handle checks according to the buisniss logics, or do other non sql or sintax check. If you set an error with this function, the gui subsystem will sing the error to the user.
message | the validate error mesage |
Definition at line 5206 of file datalib.cpp.
void HDataField::setNotValidValues | ( | QStringList | nvl | ) |
Sets more disabled value If the user modified a value which match with one of this disabled values the validation reject the modification.
Definition at line 5190 of file datalib.cpp.
|
inline |
|
inline |
|
inline |
void HDataField::setReadonly | ( | void | ) |
|
inline |
|
inline |
Sets a special sorting mode from this field. This sorting mode is only apply in gui lists Now only can receive one modifier: "dropchar" which means the characters are dropped from the value and the result converted to integer, then the result is sorted.
(For example if the sorted values are: id_1,id_10,id_14,id_2,id_21 will be 1,2,10,14,21
void HDataField::setSubselect | ( | QString | subs | ) |
Set a subselect to this field, instead read a simple sql value. When an sql query executed, the value is queried with the subselect which set here.
For example "select date(now())" -> SELECT field1,field2,(select date(now())),field4,... FROM ...
THIS ONLY WORKS IF THE FIELD IS READ ONLY. (Because it can be conflict if you would like to re-store this queried value)
Currently the following typed fiels accept this function: HSmallText,HLargeText,HNumber,HFloating,HDate
The accesibility of this function is signed by the acceptSubselect() function.
Definition at line 5246 of file datalib.cpp.
void HDataField::setTailText | ( | QString | tail | ) |
Sets the tail text of the field. It does not change/refresh the already builded gui components! (See HFloatTable class description)
Definition at line 5240 of file datalib.cpp.
void HDataField::setTitleText | ( | QString | titl | ) |
Sets the title text of the field. It does not change/refresh the already builded gui components! (See HFloatTable class description)
Definition at line 5234 of file datalib.cpp.
void HDataField::setValidator | ( | QString | v = "" | ) |
Sets a regex to validate the field. If the modified value does not match with this regex, the gSAFE will drop an error signal and recejt the modifications. You can add more specific validations in the descendants too with the lowerValidate() function.
The HDispTable will be sing the problematic element to the user. This works automatically.
Definition at line 5185 of file datalib.cpp.
|
virtual |
Sets the value of the field.
sdisabled | if this parameter is true the dataChanged() signal is disabled |
Reimplemented in HSqlChoose, HTimestamp, HDate, HFloating, HCheck, HStatic, HNumber, HNumHash, HCharHash, HLargeText, HSmallText, HConnect, and HKey.
Definition at line 5390 of file datalib.cpp.
|
virtual |
Returns the part of the CREATE TABLE sql command which creates this field
Reimplemented in HSqlChoose, HTimestamp, HDate, HFloating, HCheck, HStatic, HNumber, HNumHash, HCharHash, HLargeText, HSmallText, HConnect, and HKey.
Definition at line 5453 of file datalib.cpp.
|
virtual |
Returns the sql name of the field (in insert) This function can be redefined in descendats!
Reimplemented in HSqlChoose, HTimestamp, HDate, HFloating, HCheck, HStatic, HNumber, HNumHash, HCharHash, HLargeText, HSmallText, HConnect, and HKey.
Definition at line 5423 of file datalib.cpp.
|
virtual |
Returns the sql value of the field (in insert) This function can be redefined in descendats!
Reimplemented in HSqlChoose, HTimestamp, HDate, HFloating, HCheck, HStatic, HNumber, HNumHash, HCharHash, HLargeText, HSmallText, HConnect, and HKey.
Definition at line 5428 of file datalib.cpp.
|
virtual |
Returns the sql name of the field (in select) This function can be redefined in descendats!
Reimplemented in HSqlChoose, HTimestamp, HDate, HFloating, HCheck, HStatic, HNumber, HNumHash, HCharHash, HLargeText, HSmallText, HConnect, and HKey.
Definition at line 5438 of file datalib.cpp.
void HDataField::sqlSynced | ( | HDataChangeLogger * | dclog = NULL , |
bool | forcechange = false , |
||
bool | forcelog = false |
||
) |
Do not call this function unless you exactly know, what you want!
It sets the values of valueInSql and sync_valueInSql attributes. This function is automatically called whenewer it needs. It is signs, that the value is just syncrinized with the sql database. (Actually the HTable calls this function every time when the data is refreshed from the sql) It handles the logging too.
dclog | the Logger object. The function can palce the log messages into this object. |
forcechange | the event is accepted as changing whenever the sync_valueInSql is false. |
forcelog | the changing is logged whenever the logging attribute is false. |
Definition at line 5565 of file datalib.cpp.
|
virtual |
Returns the sql update part of the field ( name='VALUE' ) This function can be redefined in descendats!
Reimplemented in HSqlChoose, HTimestamp, HDate, HFloating, HCheck, HStatic, HNumber, HNumHash, HCharHash, HLargeText, HSmallText, HConnect, and HKey.
Definition at line 5433 of file datalib.cpp.
|
signal |
Emitted when the object's static data changed. This can be the explain text, title text, tail text. The gui will refresh the changed static data.
void HDataField::useRole | ( | QString | name | ) |
Apply the parameter named role on this data field. If you pass rolename which does not appear here, it does nothing. A single role can set:
Definition at line 5514 of file datalib.cpp.
QString HDataField::validate | ( | void | ) |
|
virtual |
You can sing that the value is changed with this function. Calls resetValidateStatus() This function can be redefined in descendats!
Definition at line 5368 of file datalib.cpp.
|
protected |
QString HDataField::conn_sqlTable |
bool HDataField::connected |
|
protected |
|
protected |
|
protected |
|
protected |
in HDispTable: specify the maximum width of the edit area
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Markers of the field (See HTableBase to understand markers)
|
protected |
in HDispTable: If true the next datafield will be melded to one line with this.
|
protected |
in HDispTable: Don't put stretch expander between the QLabel (expain text) and the value editor widget
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Contains the value which stored in sql database. This value is not valid everytime. If the HDataField is just created the HDataField does not have any information about the sql value, so this field is not valid. This fact is represented with the sync_valueInSql attribute. IF this attribute (valueInSql) is valid it contains a getSQLValueAsString()