Skip to content

Condition class

Represents one condition in the query.

public class Korzh.EasyQuery.Condition
TypeNameDescription
Boolean_isSilent
Predicateparent
TypeNameDescription
EntityAttrBaseAttrGets the base entity attribute for this condition.
BooleanEnabledGets or sets a value indicating whether this Korzh.EasyQuery.Condition is enabled.
StringFullNumGets the full number of condition.
Int32IDGets or sets the ID.
Int32IndexGets the index in the parent’s list.
BooleanIsHavingGets a value indicating whether this condition must be placed into HAVING clause in result SQL.
BooleanIsInJoinGets a value indicating whether this condition must be placed into JOIN clause in result SQL.
BooleanIsParameterizedGets or sets a value indicating whether this Korzh.EasyQuery.Condition is parameterized.
BooleanIsReadOnlyGets or sets a value indicating whether this Korzh.EasyQuery.Condition is read-only.
BooleanIsSilentGets a value indicating whether this query is silent - so no event will be raised on change.
Int32LevelGets the level of this condition in query.
DataModelModelGets the model.
PredicateParentGets the parent Korzh.EasyQuery.Predicate which this conditions is included to.
QueryQueryGets the query which this condition belongs to.
StringTypeNameGets the name of the condition type (Simple, Predicate, etc).
BooleanUseDefaultValuesGets a value indicating whether condition expressions should get default values after creation
TypeNameDescription
voidBeginUpdate()Starts the update process. OnConditionsChanged event of corresponding Query object is not raised while condition is in update state
voidChanged()Raises ConditionsChange event in parent object
voidCheckDataModel()Checks DataModel property. Generates an exception if it is null.
voidCheckQuery()Checks Query property. Generates an exception if it is null.
voidEndUpdate()Ends the update process. Raises ConditionsChange event if some modification(s) was(were) made during update process.
EntityAttrGetBaseAttr()Gets the base entity attribute for this condition.
BooleanGetHaving()Gets a value indicating whether this condition must be placed into HAVING clause in result SQL. Must be overriden in the inherited classes
StringGetText(QueryTextFormats formats, String levelSpace, String prefix)Returns text representation of condition
StringGetText(QueryTextFormats formats)Returns text representation of condition
StringGetText()Returns text representation of condition
IEnumerable<Entity>GetUsedEntities()Gets the list of entities used in this condition
voidInnerSetEnabled(Boolean newValue)
voidInnerSetReadOnly(Boolean newValue)
voidLoadFromJsonDict(JsonDict dictCond)Loads condition from IDictionary. Used during loading query from JSON
voidLoadFromXmlReader(XmlReader reader)When overriden in a derived class loads Korzh.EasyQuery.Condition properties from XML reader.
voidLoadXmlAttributes(XmlReader reader)Loads conditions node attributes from XML reader.
voidMoveDown()Moves the condition to one position down (taking into account the level of other conditions).
voidMoveUp()Moves the condition to one position up (taking into account the level of other conditions).
voidRefresh()Refreshes this instance.
voidSaveToXmlWriter(XmlWriter writer)Saves condition object to XML writer.
voidSetEnabled(Boolean newValue)Sets the Enabled property.
voidSetParameterized(Boolean parameterized)Sets the IsParameterized property.
voidSetQuery(Query newQuery)Sets the query.
voidSetReadOnly(Boolean newValue)Sets the ReadOnly property.
voidShiftLevel(Boolean up)Shifts the row level (taking into account the level of other rows)
voidWriteContent(XmlWriter writer)Writes the content of condition to XmlWriter object.
TypeNameDescription
Dictionary<String, IConditionCreator>ConditionCreators
TypeNameDescription
StringSTypeNameGets the name of the condition type used for saving/loading to/from XML.
StringXmlTagNameGets the name of the XML tag used to save condition object into XML file.
TypeNameDescription
ConditionCreate(String type, DataModel model)Creates the condition instance (descendant of Condition) of specified class.
StringLinkTypeToStr(LinkType lt)Converts LinkType value to its string representation
BooleanRegisterType(String condType, IConditionCreator creator)Registers new type of condition.
LinkTypeStrToLinkType(String s)Convert string representation to LinkType value.