Class UdtMap
Represents a map between a user defined type in Cassandra and a .NET Type, with data on how
to map field names in the UDT to .NET property names.
Inheritance
System.Object
UdtMap
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Dse
Assembly: Dse.dll
Syntax
public abstract class UdtMap
Constructors
UdtMap(Type, String)
Declaration
protected UdtMap(Type netType, string udtName)
Parameters
Type |
Name |
Description |
System.Type |
netType |
|
System.String |
udtName |
|
UdtMap(Type, String, String)
Declaration
protected UdtMap(Type netType, string udtName, string keyspace)
Parameters
Type |
Name |
Description |
System.Type |
netType |
|
System.String |
udtName |
|
System.String |
keyspace |
|
Fields
_fieldNameToProperty
Declaration
protected readonly Dictionary<string, PropertyInfo> _fieldNameToProperty
Field Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.Reflection.PropertyInfo> |
|
_propertyToFieldName
Declaration
protected readonly Dictionary<PropertyInfo, string> _propertyToFieldName
Field Value
Type |
Description |
System.Collections.Generic.Dictionary<System.Reflection.PropertyInfo, System.String> |
|
PropertyFlags
Declaration
public const BindingFlags PropertyFlags = BindingFlags.FlattenHierarchy | BindingFlags.IgnoreCase | BindingFlags.Instance | BindingFlags.Public
Field Value
Type |
Description |
System.Reflection.BindingFlags |
|
Properties
Definition
Declaration
protected UdtColumnInfo Definition { get; set; }
Property Value
IgnoreCase
Declaration
protected bool IgnoreCase { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Keyspace
Declaration
protected string Keyspace { get; }
Property Value
Type |
Description |
System.String |
|
NetType
Declaration
protected Type NetType { get; set; }
Property Value
Type |
Description |
System.Type |
|
UdtName
Declaration
protected string UdtName { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
AddPropertyMapping(PropertyInfo, String)
Declaration
protected void AddPropertyMapping(PropertyInfo propInfo, string udtFieldName)
Parameters
Type |
Name |
Description |
System.Reflection.PropertyInfo |
propInfo |
|
System.String |
udtFieldName |
|
Automap()
Maps properties and fields by name
Declaration
protected virtual void Automap()
Build(UdtColumnInfo)
Builds the mapping using the Udt definition.
Sets the definition, validates the fields vs the mapped fields.
In case there isn't any property mapped defined, it auto maps the properties by name
Declaration
protected virtual void Build(UdtColumnInfo definition)
Parameters
CreateInstance()
Creates a new instance of the target .NET type
Declaration
protected virtual object CreateInstance()
Returns
Type |
Description |
System.Object |
|
For<T>(String, String)
Creates a new UdtMap for the specified .NET type, optionally mapped to the specified UDT name.
Declaration
public static UdtMap<T> For<T>(string udtName = null, string keyspace = null)
where T : new()
Parameters
Type |
Name |
Description |
System.String |
udtName |
|
System.String |
keyspace |
|
Returns
Type Parameters
GetPropertyForUdtField(String)
Gets the PropertyInfo that corresponds to the specified UDT field name.
Declaration
protected PropertyInfo GetPropertyForUdtField(string udtFieldName)
Parameters
Type |
Name |
Description |
System.String |
udtFieldName |
|
Returns
Type |
Description |
System.Reflection.PropertyInfo |
|
GetUdtFieldName(PropertyInfo)
Gets the UDT field name for a given property.
Declaration
protected string GetUdtFieldName(PropertyInfo property)
Parameters
Type |
Name |
Description |
System.Reflection.PropertyInfo |
property |
|
Returns
Type |
Description |
System.String |
|