DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Classes | Public Member Functions | Properties | List of all members
Deveel.Data.Linq.DeveelDbMapping Class Reference
Inheritance diagram for Deveel.Data.Linq.DeveelDbMapping:

Classes

class  DbMappingEntity
 

Public Member Functions

 DeveelDbMapping (MappingModel model)
 
override string GetColumnName (MappingEntity entity, MemberInfo member)
 
override MappingEntity GetEntity (Type elementType, string tableId)
 
override bool IsPrimaryKey (MappingEntity entity, MemberInfo member)
 
override string GetTableName (MappingEntity entity)
 
override string GetTableId (Type type)
 
override bool IsGenerated (MappingEntity entity, MemberInfo member)
 
override bool IsColumn (MappingEntity entity, MemberInfo member)
 
override bool IsAssociationRelationship (MappingEntity entity, MemberInfo member)
 
override IEnumerable< MemberInfo > GetAssociationKeyMembers (MappingEntity entity, MemberInfo member)
 
override IEnumerable< MemberInfo > GetAssociationRelatedKeyMembers (MappingEntity entity, MemberInfo member)
 
override bool IsRelationshipSource (MappingEntity entity, MemberInfo member)
 
override bool IsRelationshipTarget (MappingEntity entity, MemberInfo member)
 
override string GetColumnDbType (MappingEntity entity, MemberInfo member)
 

Properties

MappingModel Model [get, private set]
 

Detailed Description

Definition at line 13 of file DeveelDbMapping.cs.

Constructor & Destructor Documentation

Deveel.Data.Linq.DeveelDbMapping.DeveelDbMapping ( MappingModel  model)
inline

Definition at line 14 of file DeveelDbMapping.cs.

14  {
15  Model = model;
16  }

Member Function Documentation

override IEnumerable<MemberInfo> Deveel.Data.Linq.DeveelDbMapping.GetAssociationKeyMembers ( MappingEntity  entity,
MemberInfo  member 
)
inline

Definition at line 67 of file DeveelDbMapping.cs.

67  {
68  return base.GetAssociationKeyMembers(entity, member);
69  }
override IEnumerable<MemberInfo> Deveel.Data.Linq.DeveelDbMapping.GetAssociationRelatedKeyMembers ( MappingEntity  entity,
MemberInfo  member 
)
inline

Definition at line 71 of file DeveelDbMapping.cs.

71  {
72  return base.GetAssociationRelatedKeyMembers(entity, member);
73  }
override string Deveel.Data.Linq.DeveelDbMapping.GetColumnDbType ( MappingEntity  entity,
MemberInfo  member 
)
inline

Definition at line 85 of file DeveelDbMapping.cs.

85  {
86  var dbMapping = (DbMappingEntity)entity;
87  var mapppedMember = dbMapping.TypeMapping.GetMember(member.Name);
88  if (mapppedMember == null)
89  return null;
90 
91  // TODO: Check if here we should provide the full version of the type of just the name
92  return mapppedMember.ColumnType.TypeCode.ToString();
93  }
override string Deveel.Data.Linq.DeveelDbMapping.GetColumnName ( MappingEntity  entity,
MemberInfo  member 
)
inline

Definition at line 20 of file DeveelDbMapping.cs.

20  {
21  var dbMapping = (DbMappingEntity) entity;
22  var memberMapping = dbMapping.TypeMapping.GetMember(member.Name);
23  if (memberMapping == null)
24  return null;
25 
26  return memberMapping.ColumnName;
27  }
override MappingEntity Deveel.Data.Linq.DeveelDbMapping.GetEntity ( Type  elementType,
string  tableId 
)
inline

Definition at line 29 of file DeveelDbMapping.cs.

29  {
30  var typeMapping = Model.GetMapping(elementType);
31  if (typeMapping == null)
32  throw new QueryException(String.Format("The type '{0}' is not mapped by the model", elementType));
33 
34  return new DbMappingEntity(tableId, typeMapping);
35  }
A long string in the system.
TypeMapping GetMapping(Type type)
Definition: MappingModel.cs:57
override string Deveel.Data.Linq.DeveelDbMapping.GetTableId ( Type  type)
inline

Definition at line 48 of file DeveelDbMapping.cs.

48  {
49  return type.FullName;
50  }
override string Deveel.Data.Linq.DeveelDbMapping.GetTableName ( MappingEntity  entity)
inline

Definition at line 43 of file DeveelDbMapping.cs.

43  {
44  var dbMapping = (DbMappingEntity)entity;
45  return dbMapping.TypeMapping.TableName;
46  }
override bool Deveel.Data.Linq.DeveelDbMapping.IsAssociationRelationship ( MappingEntity  entity,
MemberInfo  member 
)
inline

Definition at line 63 of file DeveelDbMapping.cs.

63  {
64  return base.IsAssociationRelationship(entity, member);
65  }
override bool Deveel.Data.Linq.DeveelDbMapping.IsColumn ( MappingEntity  entity,
MemberInfo  member 
)
inline

Definition at line 57 of file DeveelDbMapping.cs.

57  {
58  var dbMapping = (DbMappingEntity)entity;
59  return dbMapping.TypeMapping.IsMemberMapped(member.Name) &&
60  dbMapping.TypeMapping.IsColumn(member.Name);
61  }
override bool Deveel.Data.Linq.DeveelDbMapping.IsGenerated ( MappingEntity  entity,
MemberInfo  member 
)
inline

Definition at line 52 of file DeveelDbMapping.cs.

52  {
53  var dbMapping = (DbMappingEntity)entity;
54  return dbMapping.TypeMapping.IsUniqueKey(member.Name);
55  }
override bool Deveel.Data.Linq.DeveelDbMapping.IsPrimaryKey ( MappingEntity  entity,
MemberInfo  member 
)
inline

Definition at line 37 of file DeveelDbMapping.cs.

37  {
38  var dbMapping = (DbMappingEntity) entity;
39  return dbMapping.TypeMapping.IsPrimaryKey(member.Name) ||
40  dbMapping.TypeMapping.IsUniqueKey(member.Name);
41  }
override bool Deveel.Data.Linq.DeveelDbMapping.IsRelationshipSource ( MappingEntity  entity,
MemberInfo  member 
)
inline

Definition at line 75 of file DeveelDbMapping.cs.

75  {
76  // TODO:
77  return false;
78  }
override bool Deveel.Data.Linq.DeveelDbMapping.IsRelationshipTarget ( MappingEntity  entity,
MemberInfo  member 
)
inline

Definition at line 80 of file DeveelDbMapping.cs.

80  {
81  // TODO:
82  return false;
83  }

Property Documentation

MappingModel Deveel.Data.Linq.DeveelDbMapping.Model
getprivate set

Definition at line 18 of file DeveelDbMapping.cs.


The documentation for this class was generated from the following file: