Field class
namespace: Serenity.Data assembly: Serenity.Net.Services
Base Field class.
public abstract class Field : IFieldWithJoinInfo
Public Members
| name | description |
|---|---|
| AutoTextKey { get; } | Gets the automatic text key. |
| Caption { get; set; } | Gets or sets the caption. |
| ColumnAlias { get; } | Gets the column alias. Can be equal to the property name or the name. |
| Criteria { get; } | Gets the criteria. |
| CustomAttributes { get; set; } | Gets or sets the custom attributes. |
| DefaultValue { get; set; } | Gets or sets the default value. |
| Expression { get; set; } | Gets or sets the expression (can be equal to the name if there is no expression). |
| Fields { get; } | Gets the fields. |
| Flags { get; set; } | Gets or sets the flags. |
| ForeignField { get; set; } | Gets or sets the foreign field. |
| ForeignJoinAlias { get; set; } | Gets or sets the foreign join alias. |
| ForeignTable { get; set; } | Gets or sets the foreign table. |
| Index { get; } | Gets the index. |
| InsertPermission { get; set; } | Gets or sets the insert permission. |
| IsLookup { get; } | Gets if this field is one with a LookupInclude attribute or an ID or Name field. |
| Join { get; } | Gets the join. |
| JoinAlias { get; } | Gets the join alias. |
| MinSelectLevel { get; set; } | Gets or sets the minimum select level. |
| Name { get; } | Gets the column name. |
| NaturalOrder { get; set; } | Gets or sets the natural order. |
| Origin { get; } | Gets the origin. |
| PropertyName { get; set; } | Gets or sets the name of the property. |
| ReadPermission { get; set; } | Gets or sets the read permission. |
| ReferencedAliases { get; set; } | Gets or sets the referenced aliases. |
| Scale { get; set; } | Gets or sets the scale. |
| Size { get; set; } | Gets the size. |
| TextualField { get; set; } | Gets or sets the textual field. |
| Type { get; } | Gets the type. |
| UpdatePermission { get; set; } | Gets or sets the update permission. |
| abstract ValueType { get; } | Gets the type of the value. |
| AsInvariant(…) | Sets the value of this field in specified row as object using ConvertValue with InvariantCulture. |
| AsObject(…) | Gets the value of this row as an object. |
| abstract AsObject(…) | Sets the value of this field in specified row as object. |
| abstract AsObjectNoCheck(…) | Gets the value of this field in specified row as object, skipping check for assignment even if TrackWithChecks is true. Use at your own risk! |
| virtual AsSqlValue(…) | Gets the value of this row as an SQL value. |
| Contains(…) | Creates a new "the Field CONTAINS mask" criteria. |
| abstract ConvertValue(…) | Converts the value. |
| abstract Copy(…) | Copies the specified source. |
| CopyNoAssignment(…) | Copies the field value without marking the target as assigned. |
| EndsWith(…) | Creates a new "the Field ENDS WITH mask" criteria. |
| override Equals(…) | Determines whether the specified Object, is equal to this instance. |
| abstract GetFromReader(…) | Gets field value from a data reader. |
| override GetHashCode() | Returns a hash code for this instance. |
| GetTitle(…) | Gets the title. |
| In<T>(…) | Creates a new "the Field IN (values...)" criteria. |
| abstract IndexCompare(…) | Compares the field values for two rows for an ascending index sort. |
| IsNotNull() | Creates a new "the Field IS NOT NULL" criteria. |
| IsNull() | Creates a new "the Field IS NULL" criteria. |
| IsNull(…) | Determines whether the specified row is null. This method checks for assignment if TrackWithChecks is true and may throw an exception if the field is unassigned. Use IsNullNoCheck to skip that check. |
| abstract IsNullNoCheck(…) | Gets if the field value is null without checking for assignment. |
| Like(…) | Creates a new "the Field LIKE mask" criteria. |
| NotContains(…) | Creates a new "the Field NOT CONTAINS mask" criteria. |
| NotIn<T>(…) | Creates a new "the Field NOT IN (values...)" criteria. |
| NotLike(…) | Creates a new "the Field NOT LIKE mask" criteria. |
| StartsWith(…) | Creates a new "the Field STARTS WITH mask" criteria. |
| override ToString() | Converts to string. |
| abstract ValueFromJson(…) | Deserializes this field's value from JSON. (2 methods) |
| abstract ValueToJson(…) | Serializes this field's value to JSON. (2 methods) |
| operator == | Implements the operator ==. (10 operators) |
| operator > | Implements the operator >. (10 operators) |
| operator >= | Implements the operator >=. (10 operators) |
| operator != | Implements the operator !=. (10 operators) |
| operator < | Implements the operator <. (10 operators) |
| operator <= | Implements the operator <=. (10 operators) |
Protected Members
| name | description |
|---|---|
| Field(…) | Initializes a new instance of the Field class. |
| virtual OnRowInitialization() | Called when the row is initialized. |
| static JsonUnexpectedToken(…) | Throws an exception for an unexpected JSON token when deserializing a row. |
| static UnexpectedJsonToken(…) | Throws an exception for an unexpected JSON token when deserializing a row. |
See Also
- interface IFieldWithJoinInfo
- Source: Field.CriteriaOperators.cs