Java之路

做一名优秀的软件架构师是我不变的追求!

用户操作
[留言]  [发消息]  [加为好友] 
订阅我的博客
XML聚合    FeedSky
订阅到鲜果
订阅到Google
订阅到抓虾
fasttalk的公告
<p>本blog已经转移到<a href="http://asktalk.blogjava.net">asktalk.blogjava.net </a>,本处内容停止更新<br> <br> <br> <p> <br> <span class="style2"><a href=http://blog.csdn.net/fasttalk/archive/2004/12/06/206131.aspx class="style2">留言本&lt;请你留言&gt;</a></span><br> <br/> <!-----计数器和访问统计-----------------> <script src="http://www.xcinfo.ha.cn/jsq/default.asp?User=fasttalk&Length=6&x=15&y=20&Mode=002"></script> <script language="JavaScript" type="text/javascript" src="http://w.50bang.com/click.js?user_id=120840"></script>
文章分类
Game Dev
GameRes游戏开发资源网
Java手机网
J2EE
Java community
BEA dev2dev社区
Csdn社区
IBM Java开发者社区
SUN Java开发者社区
Java web
javaresearch.org
matrix.org.cn
Links
BlogJava.net
IT公司速查手册
Sky's the limit
wespoke
分享Java快乐
Official sites
Subversion
Opensource
java-source.net
sf.net
公开原始码报
梦想风暴
世界伟人blog
李开复学生网
存档

翻译  Hibernate Tag 参考手册(中文翻译版1.0) 收藏

@hibernate Tag参考

用来声明Hibernate描述文件的Tags

Class层次Tags

@hibernate.class

@hibernate.subclass

@hibernate.discriminator

@hibernate.joined-subclass

@hibernate.joined-subclass-key

@hibernate.cache

@hibernate.jcs-cache

@hibernate.query

方法层次Tags

@hibernate.id

@hibernate.generator-param

@hibernate.property

@hibernate.component

@hibernate.version

@hibernate.timestamp

@hibernate.many-to-one

@hibernate.one-to-one

@hibernate.column

@hibernate.set

@hibernate.bag

@hibernate.list

@hibernate.map

@hibernate.array

@hibernate.primitive-array

@hibernate.collection-key

@hibernate.collection-index

@hibernate.index-many-to-many

@hibernate.collection-element

@hibernate.collection-composite-element

@hibernate.collection-many-to-many

@hibernate.collection-one-to-many

@hibernate.collection-cache

@hibernate.collection-jcs-cache

字段层次Tags

Tag用法, Class层次(@hibernate)

@hibernate.class (0..1)

声明一个持久类

参数

类型

适用性

描述

是否必须

table

text

数据表名

false

discriminator-value

text

一个用于区分特殊子类的值

false

mutable

bool

指定该类的实例是否mutabletrue/false

false

dynamic-update

bool

指定只有改变了的字段出现在SQL UPDATE

false

dynamic-insert

bool

指定null字段不应出现在SQL INSERT

false

polymorphism

text

使"explicit"多态性有效

可选项:

explicit

implicit

false

schema

text

覆盖schemahibernate-mapping根元素中指定的名称

false

proxy

text

为使用CGLIB proxies指定一个接口

false

@hibernate.subclass (0..1)

声明当前类为子类

参数

类型

适用性

描述

是否必须

discriminator-value

text

一个用于区分特殊子类的值

false

proxy

text

为使用CGLIB proxies指定一个接口

false

dynamic-update

bool

指定只有改变了的字段出现在SQL UPDATE

false

dynamic-insert

bool

指定null字段不应出现在SQL INSERT

false

@hibernate.discriminator (0..1)

Defines a discriminator

参数

类型

适用性

描述

是否必须

column

text

映射的目标数据表字段

true

type

text

Hibernate 类型

false

length

text

映射字段的长度

false

@hibernate.joined-subclass (0..1)

Declare the current class as joined subclass

参数

类型

适用性

描述

是否必须

proxy

text

为使用CGLIB proxies指定一个接口

false

dynamic-update

bool

指定只有改变了的字段出现在SQL UPDATE

false

dynamic-insert

bool

指定null字段不应出现在SQL INSERT

false

schema

text

覆盖schemahibernate-mapping根元素中指定的名称

false

@hibernate.joined-subclass-key (0..1)

Declares a joined-subclass key

参数

类型

适用性

描述

是否必须

column

text

映射的目标数据表字段

true

@hibernate.cache (0..1)

Enables caching

参数

类型

适用性

描述

是否必须

usage

text

定义缓冲语义

可选项:

read-write

nonstrict-read-write

read-only

true

@hibernate.jcs-cache (0..1)

Enables caching (deprecated)

参数

类型

适用性

描述

是否必须

usage

text

定义缓冲语义.

nonstrict-read-write只应用于版本2.0或者更新的版本.

可选项:

read-write

nonstrict-read-write

read-only

true

@hibernate.query (0..*)

为类声明一个有名称的查询

参数

类型

适用性

描述

是否必须

name

text

查询的名称

true

query

text

查询的内容

true

Tag Usage, Method Level (@hibernate)

@hibernate.id (0..1)

定义一个id属性

参数

类型

适用性

描述

是否必须

column

text

映射的目标数据表字段

false

type

text

Hibernate 类型

false

length

text

所应设数据库表字段的长度

false

unsaved-value

text

一个用来从新的transient instances中区分transient instances和已存在的persistent状态的值

false

generator-class

text

key generator

可选项:

uu id.hex

uuid.string

increment

assigned

native

identity

sequence

hilo

seqhilo

foreign

true

@hibernate.generator-param (0..*)

指定id generator 参数和值

参数

类型

适用性

描述

是否必须

name

text

参数名称

true

value

text

参数值

true

@hibernate.property (0..1)

定义一个property

参数

类型

适用性

描述

是否必须

column

text

映射的目标数据表字段

false

type

text

Hibernate 类型

false

length

text

所应设数据库表字段的长度

false

not-null

bool

字段是否可以为null

false

unique

bool

字段是否unique

false

insert

bool

字段是否应该出现在SQL INSERT

false

update

bool

字段是否应该出现在SQL UPDATE

false

@hibernate.component (0..1)

声明一个component

参数

类型

适用性

描述

是否必须

class

text

特定类的全名

false

@hibernate.version (0..1)

Declares a version property

参数

类型

适用性

描述

是否必须

column

text

存放版本号的字段名称

false

Type

text

Hibernate 类型

可选项:

integer

short

long

timestamp

calendar

false

@hibernate.timestamp (0..1)

Declares a timestamp property

参数

类型

适用性

描述

是否必须

column

text

存放timestamp的字段名称

false

@hibernate.many-to-one (0..1)

声明一个many-to-one 关系

参数

类型

适用性

描述

是否必须

column

text

映射的目标数据表字段

false

class

text

关系类名称

false

cascade

text

指定从父对象到关联对象有哪些级联操作

可选项:

all

none

save-update

delete

false

not-null

bool

字段是否可以为null

false

unique

bool

字段是否unique

false

outer-join

text

使outer-join fetching有效

可选项:

true

false

auto

false

insert

bool

字段是否应该出现在SQL INSERT

false

update

bool

字段是否应该出现在SQL UPDATE

false

@hibernate.one-to-one (0..1)

Declares a one-to-one association

参数

类型

适用性

描述

是否必须

class

text

关联类

false

constrained

bool

是否有外键约束

false

cascade

text

指定从父对象到关联对象有哪些级联操作

可选项:

all

none

save-update

delete

false

outer-join

bool

如果设置了hibernate.use_outer_join,则使这个关联的outer-join fetching有效

可选项:

true

false

auto

false

@hibernate.column (0..*)

个性化字段映射

参数

类型

适用性

描述

是否必须

name

text

字段名

true

length

text

字段长度

false

unique

bool

字段是否unique

false

not-null

bool

字段是否nullable

false

index

text

Index名称

false

unique-key

text

Unique约束的名称

false

sql-type

text

SQL字段类型

false

@hibernate.set (0..1)

Defines a set

参数

类型

适用性

描述

是否必须

inverse

bool

是否转置的collection

false

table

text

角色名称的默认值: Collection表的名称 (不是用于one-to-many关联)

false

schema

text

用于覆盖已声明schema的表schema名称

false

lazy

bool

使lazy 初始化有效

false

cascade

text

指定从父对象到关联对象有哪些级联操作

可选项:

all

none

save-update

delete

false

sort

text

指定一个排序的collection,该collection应该具有自然的排序顺序或者一个给定的comparator class

false

order-by

text

指定定义枚举顺序的表字段

false

where

text

一个SQL WHERE 条件

false

@hibernate.bag (0..1)

Defines a bag

参数

类型

适用性

描述

是否必须

inverse

bool

是否转置的collection

false

table

text

Collection表的名称 (不是用于one-to-many关联)

false

schema

text

用于覆盖已声明schema的表schema名称

false

lazy

bool

使lazy 初始化有效

false

cascade

text

指定从父对象到关联对象有哪些级联操作

可选项:

all

none

save-update

delete

false

order-by

text

指定定义枚举顺序的表字段

false

where

text

一个SQL WHERE 条件

false

@hibernate.list (0..1)

Defines a List

参数

类型

适用性

描述

是否必须

table

text

Collection表的名称 (不是用于one-to-many关联)

false

schema

text

用于覆盖已声明schema的表schema名称

false

lazy

bool

使lazy 初始化有效

false

cascade

text

指定从父对象到关联对象有哪些级联操作

可选项:

all

none

save-update

delete

false

where

text

一个SQL WHERE 条件

false

@hibernate.map (0..1)

Defines a map

参数

类型

适用性

描述

是否必须

table

text

Collection表的名称 (不是用于one-to-many关联)

false

schema

text

用于覆盖已声明schema的表schema名称

false

lazy

bool

使lazy 初始化有效

false

cascade

text

指定从父对象到关联对象有哪些级联操作

可选项:

all

save-update

delete

none

false

sort

text

指定一个排序的collection,该collection应该具有自然的排序顺序或者一个给定的comparator class

false

order-by

text

声明定义枚举顺序的表的字段

false

where

text

一个SQL WHERE条件

false

@hibernate.array (0..1)

Defines an array

参数

类型

适用性

描述

是否必须

table

text

Collection表的名称 (不是用于one-to-many关联)

false

schema

text

为了覆盖已声明schema的表schema的名称

false

cascade

text

指定从父对象到关联对象有哪些级联操作

可选项:

all

none

save-update

delete

false

where

text

一个SQL WHERE条件

false

@hibernate.primitive-array (0..1)

声明一个primitive-array

参数

类型

适用性

描述

是否必须

table

text

Collection表的名称 (不是用于one-to-many关联)

false

schema

text

The name of a table schema to override the schema declared

false

cascade

text

指定从父对象到关联对象有哪些级联操作

可选项:

all

none

save-update

delete

false

where

text

一个SQL WHERE 条件

false

@hibernate.collection-key (0..1)

声明一个collection key

参数

类型

适用性

描述

是否必须

column

text

映射的目标数据表字段

true

@hibernate.collection-index (0..1)

声明一个collection index. 用于索引数组, 为映射中的lists或者keys排序

参数

类型

适用性

描述

是否必须

column

text

映射的目标数据表字段

true

类型

text

The Hibernate 类型

false

length

text

所应设数据库表字段的长度

false

@hibernate.index-many-to-many (0..1)

声明一个many-to-many collection index.将在三重关联中用作映射key. 应该作为entity?

参数

类型

适用性

描述

是否必须

column

text

映射的目标数据表字段

true

class

text

在三重关联映射中被用作key的实体

true

@hibernate.collection-element (0..1)

声明一个collection 元素

参数

类型

适用性

描述

是否必须

column

text

映射的目标数据表字段

true

type

text

The Hibernate 类型

true

length

text

所应设数据库表字段的长度

false

not-null

bool

字段是否nullable

false

unique

bool

字段是否unique

false

@hibernate.collection-composite-element (0..1)

声明一个组合collection元素

参数

类型

适用性

描述

是否必须

class

text

元素类名称

true

@hibernate.collection-many-to-many (0..1)

声明一个many-to-many关系

参数

类型

适用性

描述

是否必须

column

text

映射的目标数据表字段

true

class

text

类全名

false

outer-join

text

使outer-join fetching有效

可选项:

true

false

auto

false

@hibernate.collection-one-to-many (0..1)

Declares a one-to-many relationship

参数

类型

适用性

描述

是否必须

class

text

关联类的全名

false

@hibernate.collection-cache (0..1)

Enables caching

参数

类型

适用性

描述

是否必须

usage

text

定义缓冲语义

可选项:

read-write

nonstrict-read-write

read-only

true

@hibernate.collection-jcs-cache (0..1)

是缓冲有效 (不建议使用)

参数

类型

适用性

描述

是否必须

usage

text

定义缓冲语义

可选项:

read-write

nonstrict-read-write

read-only

 

 

 

 

发表于 @ 2005年09月19日 12:36:00 | 评论( loading... ) | 编辑| 举报| 收藏

旧一篇:权限系统概要 | 新一篇:经常用到的javaScript技术代码(经典)

  • 发表评论
  • 评论内容:
  •  
Copyright © fasttalk
Powered by CSDN Blog