public HQLParameterItem(String fieldName, Object fieldValue, criteriaType searchType, string logicalOperator, string subObjectType) { this._fieldNameField = fieldName; this._fieldValueField = fieldValue; this._searchTypeField = searchType; this._logicalOperator = logicalOperator; this._subObjectTypeField = subObjectType; //if Like search, set value based on type of search switch (searchType) { case criteriaType.Like: case criteriaType.LikeNoCase: this._fieldValueField = "%" + fieldValue + "%"; break; case criteriaType.LikeEndsWith: this._fieldValueField = "%" + fieldValue; break; case criteriaType.LikeStartsWith: this._fieldValueField = fieldValue + "%"; break; } }
/// <summary> /// Use this constructor to give fieldname, field value and matchmode. /// To be used for LIKE queries /// </summary> /// <param name="fieldName">data table field name</param> /// <param name="fieldValue">data table field value</param> /// <param name="matchmode">Matching mode</param> public CriteriaItem(String fieldName, Object fieldValue, criteriaType critType, ASA.Common.MatchMode matchmode) { this._fieldNameField = fieldName; this._fieldValueField = fieldValue; this._critTypeField = critType; //The idea is to hide NHibernate expression matchmode from the data access objects switch (matchmode) { case ASA.Common.MatchMode.Anywhere: this._matchmodeField = NHibernate.Criterion.MatchMode.Anywhere; break; case ASA.Common.MatchMode.End: this._matchmodeField = NHibernate.Criterion.MatchMode.End; break; case ASA.Common.MatchMode.Exact: this._matchmodeField = NHibernate.Criterion.MatchMode.Exact; break; case ASA.Common.MatchMode.Start: this._matchmodeField = NHibernate.Criterion.MatchMode.Start; break; default: break; } }
public CriteriaItem(String fieldName, Object fieldValue, criteriaType critType, bool notQuery) { this._fieldNameField = fieldName; this._fieldValueField = fieldValue; this._critTypeField = critType; this._notQueryField = notQuery; }
public SearchCriteriaItem(String fieldName, Object fieldValue, criteriaType critType, bool isParentObjectField, string subObjectType) { this._fieldNameField = fieldName; this._fieldValueField = fieldValue; this._critTypeField = critType; this._isParentObjectField = isParentObjectField; this._subObjectTypeField = subObjectType; }
/// <summary> /// Use this constructor to give fieldname and the criteria type /// Used when checking Null/NotNull, Empty/Empty /// </summary> /// <param name="fieldName">data table field name</param> /// <param name="fieldValue">field value</param> /// <param name="critType">criteria type</param> public CriteriaItem(String fieldName, criteriaType critType) { this._fieldNameField = fieldName; this._critTypeField = critType; }