//================================= CLASS CONSTRUCTOR ========================================
function QueryCondition(iposition)
{
//MEMBER VARIABLES
//The position of this condition in the conditions vector of the field ...
 this.position = null;
//The identifier of this condition ...
 this.id = null;
//The text for this condition
 this.label = null;
//How many values are necessary for this condition (one or two currently supported!!!)
 this.nValues = null;
//The tag for this field(will be used to keep the server id of this field!!!)
 this.tag = null;

 this.initialize(iposition);
}

//====================================== STATIC ==============================================
QueryCondition.ID_NONE      = 0;
QueryCondition.ID_EQUAL     = 1;
QueryCondition.ID_DIFFERENT = 2;
QueryCondition.ID_LESS      = 3;
QueryCondition.ID_LESSE     = 4;
QueryCondition.ID_GREATER   = 5;
QueryCondition.ID_GREATERE  = 6;
QueryCondition.ID_LIKE      = 7;
QueryCondition.ID_BETWEEN   = 8;
QueryCondition.ID_IN        = 9;

//====================================== MEMBERS =============================================
QueryCondition.prototype.initialize = function(iposition)
{
 this.position = iposition;
 this.id = -1;
 this.label = "";
 this.nValues = 0;
}

QueryCondition.prototype.getPosition = function()
{
 return this.position;
}

QueryCondition.prototype.setPosition = function(iposition)
{
 this.position = iposition;
}

QueryCondition.prototype.getId = function()
{
 return this.id;
}

QueryCondition.prototype.setId = function(iid)
{
 this.id = iid;
}

QueryCondition.prototype.getLabel = function()
{
 return this.label;
}

QueryCondition.prototype.setLabel = function(ilabel)
{
 this.label = ilabel;
}

QueryCondition.prototype.getnValues = function()
{
 return this.nValues;
}

QueryCondition.prototype.setnValues = function(inValues)
{
 this.nValues = inValues;
}

QueryCondition.prototype.getTag = function()
{
 return this.tag;
}

QueryCondition.prototype.setTag = function(itag)
{
 this.tag = itag;
}

QueryCondition.prototype.copyFrom = function(iqcondition)
{
 this.position = iqcondition.getPosition();
 this.id = iqcondition.getId();
 this.label = iqcondition.getLabel();
 this.nValues = iqcondition.getnValues();
 this.tag = iqcondition.getTag();
}

QueryCondition.prototype.finalize = function()
{
 this.position = null;
 this.id = null;
 this.label = null;
 this.nValues = null;
 this.tag = null;
}
