ITeye博客

hibernate AccessType

wangbing9577 · 2014-12-26 17:58 · 开源软件 · Markdown

hibernate的AccessType表示hibernate怎样访问域对象中的属性值。

取值有:field ¦property ¦ClassName"
field:即绕过get/set方法,直接使用反射访问字段属性;getter和setter的话,就可以不用写了。 这时,可以设置属性为不可变,可以不用执行脏检查。 默认使用property:即使用get/set 方法访问属性;这种方式可以在getter和setter中做额外的处理。 ClassName:是指使用实现了org.hibernate.property.PropertyAccessor接口的类的具体策略来访问字段属性

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。