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
Entityentity
StringexprAttribute expression
EntAttrKindkindAttribute kind.
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.
BooleanIsGhostGets a value indicating whether this is a “ghost attribute” - an attribute which was not found in the model.
BooleanIsNullable
EntAttrKindKindGets or sets the attribute kind.
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.
Int64SizeGets 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 prms)
voidCheckModel()Checks the Model property and raises an exception if it’s null.
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
voidSaveToJsonDict(JsonDict dict)Saves attribute properties to Dictionary object (used for serialization to JSON).
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.
TypeNameDescription
EntAttrKindStrToEntAttrKind(String s)Converts string representation of attribute kind to EntAttrKind value.