Skip to content

EntityAttr class

Represents one entity attribute of data model.

public class Korzh.EasyQuery.EntityAttr
: IComparable<EntityAttr>
TypeNameDescription
Operator_defaultOperatorThe default operator
Boolean_isGhost
StringexprAttribute expression
TypeNameDescription
StringCaptionGets or sets the entityAttr attribute caption.
StringColumnNameGets or sets the name of the column associated with property (in EntityFramework context definition).
StringCustomFuncGets or sets the custom function.
DataTypeDataTypeGets or sets the type of data represented by attribute.
ValueEditorDefaultEditorGets or sets the default value editor.
StringDescriptionGets or sets the description of entity attribute.
EditorsMapEditorsGets the editors map.
EntityEntityGets or sets the entity.
StringExprGets or sets the attribute expression.
StringFullExprGets the full expression of entity attribute.
StringIDGets or sets the ID.
BooleanIsAggregateGets or sets a value indicating whether this attribute represents some aggregate column.
BooleanIsGhostGets a value indicating whether this is a “ghost attribute” - an attribute which was not found in the model.
BooleanIsNullableGets or sets a value indicating whether this attribute is nullable.
BooleanIsVirtualIndicates if this attribute is a virtual (calculate) one.
EntityAttrLookupAttrGets the lookup attribute.
DataModelModelGets the model.
OperatorListOperationsGets the list of operators which can be applied for this attribute.
QueryParamListParamsThe parameters associated with this entity attribute
PropertyInfoPropInfoGets or sets the property information.
StringPropNameGets or sets the name of the property.
Int32SizeGets or sets the size of data represented by attribute.
BooleanUseInConditionsGets or sets a value indicating whether the attribute can be used in query conditions.
BooleanUseInResultGets or sets a value indicating whether the attribute can be used in result columns (SELECT clause).
BooleanUseInSortingGets or sets a value indicating whether the attribute can be used in sorting.
ObjectUserDataGets or sets the user data object assosiated with attribute.
TypeNameDescription
voidAddParamsTo(QueryParamList paramList)Adds all query parameters used in this attribute to the list passed via paramList.
voidCheckModel()Checks the Model property and raises an exception if it’s null.
BooleanCompareWithExpr(String expr)Compares attribute’s expression with the one passed in the parameter.
voidCopyFrom(EntityAttr attr)Copies all attribute’s properties from another entity attribute
voidExtractParams()Parse attribute’s expression and extract all parameters (like @Param1) used there.
voidFillOperatorsWithDefaults(DataModel model)Fills the operators list with default operators depending of attribute type.
StringGetDataAttrFullExpr()Gets full expression of the entity attribute.
OperatorGetDefaultOperator()Gets the default operator (usually it is first operator in Operations list).
ValueEditorGetValueEditor(Operator op, Int32 operandIndex)Gets the most suitable value editor for this attribute and operator.
BooleanHasParams()Determines whether this attribute has parameters in its expression.
voidLoadAttribute(String propname, String propvalue)Loads the attribute.
voidLoadFromXmlReader(XmlReader reader)Loads attribute from XML reader.
voidLoadNodes(XmlReader reader)Loads the sub-nodes of entity attribute’s node.
voidOnModelAssignment()Called when model is assigned.
voidProcessVirtualExpr()Scans attribute’s expression for new parameters, tables, etc
voidReadFromJson(JsonReader reader)Reads the attribute content from JSON.
TaskReadFromJsonAsync(JsonReader reader)Reads the attribute content from JSON (asynchronous way).
voidReadPropertyFromJson(JsonReader reader, String propName)Reads one attribute’s property from JSON.
TaskReadPropertyFromJsonAsync(JsonReader reader, String propName)Reads one attribute’s property from JSON (asynchronous way).
voidSaveToXmlWriter(XmlWriter writer)Saves Korzh.EasyQuery.EntityAttr to XML writer.
voidSaveXmlAttributes(XmlWriter writer)Saves the attributes to XML writer.
voidSaveXmlNodes(XmlWriter writer)Saves the nodes to XML writer.
voidSetDefaultOperator(Operator op)Sets the default operator.
voidWritePropertiesToJson(JsonWriter writer, ModelReadWriteOptions rwOptions)Writes attribute properties to JSON.
TaskWritePropertiesToJsonAsync(JsonWriter writer, ModelReadWriteOptions rwOptions)Writes attribute properties to JSON (asynchronous way).
voidWriteToJson(JsonWriter writer, ModelReadWriteOptions rwOptions)Writes attribute’s content to JSON.
TaskWriteToJsonAsync(JsonWriter writer, ModelReadWriteOptions rwOptions)Writes attribute’s content to JSON (asynchronous way).
TypeNameDescription
EntAttrKindStrToEntAttrKind(String s)Converts string representation of attribute kind to EntAttrKind value.