首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

Mongo的ORM框架的学习Morphia(1)

2012-09-10 
Mongo的ORM框架的学习Morphia(一)以下内容摘自:http://code.google.com/p/morphia/官方针对Morphia的讲解

Mongo的ORM框架的学习Morphia(一)

以下内容摘自:http://code.google.com/p/morphia/

官方针对Morphia的讲解如下:

?

Morphia is a lightweight type-safe library for mapping Java objects to/from MongoDB:

Easy to use, and very lightweight; reflection is used once per type and cached for good performance. Datastore and DAO<T,V> access abstractions, or roll your own... Type-safe, and Fluent Query support with (runtime) validation Annotations based mapping behavior; there are no XML files. Extensions: Validation (jsr303), and SLF4J Logging

?

? Lifecycle Method/Event Support Works great with Guice, Spring, and other DI frameworks. Many extension points (new annotations, converters, mapping behavior, logging, etc.) Does not store Null/Empty values (by default). GWT support (entities are just POJOs) -- (GWT ignores annotations) Advanced mapper which allows raw conversion, void toObject(DBObject) or DBObject fromObject(Object)

?

翻译如下:

Morphia 是一个针对Mongo和Java 对象转换的映射的轻量级ORM类型安全类库。

????? 1.简单易用,轻量级,一旦每一种类型通过反射获取将被缓存,性能比较好。

?????? 2.Datastore和DAO<T,V>的抽象封装。

????? 3.快速的查询的支持,在类运行时进行校验。

????? 4.Mapping是基于注解而不是基于xml。

????? 5.针对Validation和Log的扩展。

????? 6.生命周期的控制。

????? 7.可以和Spring,Guice等DI框架整合。

????? 8.支持各种功能的扩展。

??????

?

?

热点排行