设计模式
成富
全栈工程师,写手,码农
14年全栈软件开发经验。
出版书籍《Quarkus云原生微服务开发实战》《深入理解Java 7:核心技术与最佳实践》,《Build Mobile Apps with Ionic 4 and Firebase》和《Exploring Java 9》 ,并在IBM developerWorks中国和InfoQ中文站发表技术文章百余篇。
展开
-
Row Data Gateway
Row Data Gateway - An object that acts as a Gateway to a single record in a data source. There is one instance per row.Row Data Gateway是作为数据库中记录的代表的形式出现的,数据库中表的每行对应于该对象中相应的域。在设计时,通常对数据库中的每个表对应一个查找类,返回...2008-01-14 20:26:11 · 180 阅读 · 0 评论 -
Active Record
Active Record - An object that wraps a row in a database table or view, encapsultes the database access, and adds domain logic on that data.Active Record包含了数据和行为。Active Record在本质上是Domain Model,只不过这个领域...2008-01-14 20:27:36 · 85 阅读 · 0 评论 -
Identity Field
Identity Field - Saves a database ID field in an object to maintain identity between an in-memory object and a database row.Identity Field是很简单的。你所要做的只是把你的关系数据库表的主键存放在对象的域中即可。使用Identity Field时需要考虑的几个问题...2008-01-14 20:28:40 · 145 阅读 · 0 评论 -
Dependent Mapping
Dependent Mapping - Has one class perform the database mapping for a child class.Dependent Mapping的原理是一个类(称为依赖者)依靠另外的类(称为所有者)来完成自己的数据库持久化的操作。每个依赖者有且仅有一个所有者。依赖者没有 Identity Field,所以没有针对依赖者的查找方法,所有的查找操作都...2008-01-14 20:29:36 · 137 阅读 · 0 评论 -
Concrete Table Inheritance
Concrete Table Inheritance - Represents an inheritance hierarchy of classes with one table per concrete class in the hierarchy.Concrete Table Inheritance对继承体系结构中的每一个具体类都有一个表与其对应。需要保证同一个类体系结构中表的主键不重复。D...2008-01-14 20:30:43 · 161 阅读 · 0 评论