nhibernate source code analyzed (abstract classes in nhibernate-2.0)
2019-08-02 09:19
183 查看
原文链接:https://www.geek-share.com/detail/2367048920.html
看了DLL命名空间兄弟翻译的Nhibernate教程,仍是一头雾水,因为没有一个完整的实例作为参照,比较抽象。有人说用单元测试的方式来学习,不失为一种好方法,我的想法是如果要更好更系统的学习这个框架,分析其源代码是最本质的解决方法,简单看了一下nhibernate-2.0的源码,要读懂别人的Code,真不是一件容易的事情,就像一堆乱麻,根本不知道如何下手。先生成个类关系图:
关系图太大了,以致显示的很小。
分析下主要的抽象类:
1.JoinFragment - 声明SQL连接的抽象类
2.Constraint - 描述数据库中关系约束的基类,实现IRelationalModel接口.
3.接口IQuery-NHibernate查询面向对象描述接口,从ISession.CreateQuery()可以获得接口实例
4.AbstractQueryImpl-IQuery的抽象实现
5.AbstractType - 实现IType接口的抽象基类
6.SqlBaseBuilder-全部SqlBuilders类的抽象基类
7.ScheduledEntityAction - 在fulsh的时候执行一个实体计划动作的抽象基类
8.EnumStringType-映射枚举类型成为DbType.String类型的抽象基类
9.ValueTypeType-ValueType的超级类
10.NullableType-映射属性到一个列,这个列可以允许存储nulls
11.CollectionType- 映射集合类的抽象基类
12.ImmutableType-能够存储null的固有类性的超级类
以后会根据这些基类,逐渐学习一下其实现类。从而达到学习nhibernate.
关系图太大了,以致显示的很小。
分析下主要的抽象类:
1.JoinFragment - 声明SQL连接的抽象类
2.Constraint - 描述数据库中关系约束的基类,实现IRelationalModel接口.
3.接口IQuery-NHibernate查询面向对象描述接口,从ISession.CreateQuery()可以获得接口实例
4.AbstractQueryImpl-IQuery的抽象实现
5.AbstractType - 实现IType接口的抽象基类
6.SqlBaseBuilder-全部SqlBuilders类的抽象基类
7.ScheduledEntityAction - 在fulsh的时候执行一个实体计划动作的抽象基类
8.EnumStringType-映射枚举类型成为DbType.String类型的抽象基类
9.ValueTypeType-ValueType的超级类
10.NullableType-映射属性到一个列,这个列可以允许存储nulls
11.CollectionType- 映射集合类的抽象基类
12.ImmutableType-能够存储null的固有类性的超级类
以后会根据这些基类,逐渐学习一下其实现类。从而达到学习nhibernate.
转载于:https://www.cnblogs.com/jillzhang/archive/2006/08/20/481733.html
相关文章推荐
- nhibernate source code analyzed (abstract classes in nhibernate-2.0)
- Source Code for the Built-in ASP.NET 2.0 Providers Now Available for Download !
- Source Code for the Built-in ASP.NET 2.0 Providers Now Available for Download !
- start my life in open source code
- TCP Socket Establish;UDP Send Package Process In Kernel Sourcecode Learning
- What is the best comment in source code you have ever encountered? [closed]
- eclipse plug-in attach source code
- WARN util.NativeCodeLoader: Unable to load native-hadoop l... using builtin-java classes where applicable(附编译脚本)
- Abstract Classes and Factory Design Pattern in Python
- View android source code in eclipse
- 下载了一个Writer+Source Code Plug In 写Blog
- Part 32 Abstract classes in c#
- use apple Reachability source code in your project.
- What is the best(funniest) comment in source code you have ever encountered?
- View the android source code in Eclipse
- [Pascal Error] Unit1.pas(1): Unable to invoke Code Completion due to errors in source code
- Why do many Collection classes in Java extend the abstract class and implement the interface as well
- Design Pattern in Android Sdk Source Code
- 3 Ways of JDK Source Code Attachment in Eclipse---reference
- 利用webservice和.net技术上传和下载文件--Sending files in chunks with MTOM Web Services and .NET 2.0 from:http://www.codeproject.com/soap/MTO