Class DictionaryFilterAttribute
Data object dictionary filter attribute
Inherited Members
Namespace: XData.Mapping
Assembly: XData.docfx.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public sealed class DictionaryFilterAttribute : FilterAttribute
Remarks
Filter by dictionary code (example: doc_type_id = (select doc_type_id from t_doc_type where code = 'INVOICE')
)
WARNING! Dictionary restricted by single valued primary key!
WARNING! Dictionary code mast be unique!
Examples
DictionaryFilter("T_DOC_TYPE", "doc_type_id", "code", "INVOICE", "D")
Constructors
| Improve this Doc View SourceDictionaryFilterAttribute(String, String, String, String, String, String)
Dictionary filter attribute
Declaration
public DictionaryFilterAttribute(string dictionaryTable, string dictionaryIdField, string dictionaryCodeField, string dictionaryValue, string source, string fieldName = "")
Parameters
Type | Name | Description |
---|---|---|
String | dictionaryTable | Dictionary table name |
String | dictionaryIdField | Dictionary id field |
String | dictionaryCodeField | Dictionary code field |
String | dictionaryValue | Dictionary code value |
String | source | Filter source alias |
String | fieldName | Filter field name |
Exceptions
Type | Condition |
---|---|
XDataRuntimeException | Dictionary table name cannot be null or empty string |
XDataRuntimeException | Dictionary id field cannot be null or empty string |
XDataRuntimeException | Dictionary code field cannot be null or empty string |
XDataRuntimeException | Dictionary code value cannot be null or empty string |
Properties
| Improve this Doc View SourceDictionaryCode
Dictionary code field
Declaration
public string DictionaryCode { get; }
Property Value
Type | Description |
---|---|
String |
DictionaryId
Dictionary id field
Declaration
public string DictionaryId { get; }
Property Value
Type | Description |
---|---|
String |
DictionaryTable
Dictionary table name
Declaration
public string DictionaryTable { get; }
Property Value
Type | Description |
---|---|
String |
DictionaryValue
Dictionary code value
Declaration
public string DictionaryValue { get; }
Property Value
Type | Description |
---|---|
String |
FilterType
Filter type
Declaration
public override FilterType FilterType { get; }
Property Value
Type | Description |
---|---|
FilterType | Dictionary |
Overrides
| Improve this Doc View SourceIsVariableValue
Variable name as filter value
Declaration
public bool IsVariableValue { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
If true DictionaryValue contains data object variable name which value will be compared with Dictionary code
TypeId
When implemented in a derived class, gets a unique identifier for this Attribute.
Declaration
public override object TypeId { get; }
Property Value
Type | Description |
---|---|
Object | An Object that is a unique identifier for the attribute. |