Revision 8b4b44e9
Added by Niels Hoffmann over 13 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/package-info.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
@javax.xml.bind.annotation.XmlSchema(namespace = "http://etaxonomy.eu/cdm/model/common/1.0", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) |
4 | 4 |
@com.sun.xml.bind.XmlAccessorFactory(eu.etaxonomy.cdm.jaxb.CdmAccessorFactoryImpl.class) |
5 |
@org.hibernate.annotations.GenericGenerators({ |
|
6 |
@GenericGenerator( name="system-increment", |
|
7 |
strategy = "increment" |
|
8 |
), |
|
9 |
@GenericGenerator( |
|
10 |
name="system-identity", |
|
11 |
strategy = "identity" |
|
12 |
|
|
13 |
), |
|
14 |
@GenericGenerator( |
|
15 |
name="system-hilo", |
|
16 |
strategy = "hilo" |
|
17 |
), |
|
18 |
@GenericGenerator( |
|
19 |
name="enhanced-table", |
|
20 |
strategy = "org.hibernate.id.enhanced.TableGenerator" |
|
21 |
), |
|
22 |
@GenericGenerator( |
|
23 |
name="enhanced-sequence", |
|
24 |
strategy = "org.hibernate.id.enhanced.SequenceStyleGenerator" |
|
25 |
), |
|
26 |
@GenericGenerator( |
|
27 |
name="system-sequence", |
|
28 |
strategy = "sequence" |
|
29 |
), |
|
30 |
@GenericGenerator( |
|
31 |
name="system-native", |
|
32 |
strategy = "native" |
|
5 |
@org.hibernate.annotations.GenericGenerators( |
|
6 |
{ |
|
7 |
/* generates identifiers of type long, short or int that are unique only when no other process |
|
8 |
* is inserting data into the same table. Do not use in a cluster or multiple client environment */ |
|
9 |
@GenericGenerator( |
|
10 |
name="system-increment", |
|
11 |
strategy = "increment" |
|
12 |
), |
|
13 |
/* supports identity columns in DB2, MySQL, MS SQL Server, Sybase and HypersonicSQL. |
|
14 |
* The returned identifier is of type long, short or int. */ |
|
15 |
@GenericGenerator( |
|
16 |
name="system-identity", |
|
17 |
strategy = "identity" |
|
18 |
|
|
19 |
), |
|
20 |
/* uses a hi/lo algorithm to efficiently generate identifiers of type long, short or int, |
|
21 |
* given a table and column (by default hibernate_unique_key and next_hi respectively) as |
|
22 |
* a source of hi values. The hi/lo algorithm generates identifiers that are unique only |
|
23 |
* for a particular database. */ |
|
24 |
@GenericGenerator( |
|
25 |
name="system-hilo", |
|
26 |
strategy = "hilo" |
|
27 |
), |
|
28 |
/* uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator in Interbase. |
|
29 |
* The returned identifier is of type long, short or int */ |
|
30 |
@GenericGenerator( |
|
31 |
name="system-sequence", |
|
32 |
strategy = "sequence" |
|
33 |
), |
|
34 |
/* selects identity, sequence or hilo depending upon the capabilities of the underlying database. */ |
|
35 |
@GenericGenerator( |
|
36 |
name="system-native", |
|
37 |
strategy = "native" |
|
38 |
), |
|
39 |
/* Steve Ebersole of Hibernate highly recommends the use of the two new generators |
|
40 |
* http://relation.to/2082.lace |
|
41 |
* Also see: http://docs.jboss.org/hibernate/core/3.3/reference/en/html/mapping.html#mapping-declaration-id-enhanced |
|
42 |
*/ |
|
43 |
/* new table generator */ |
|
44 |
@GenericGenerator( |
|
45 |
name="enhanced-table", |
|
46 |
strategy = "org.hibernate.id.enhanced.TableGenerator", |
|
47 |
parameters = { |
|
48 |
@Parameter(name="optimizer", value = "pooled"), |
|
49 |
@Parameter(name="increment_size", value = "10") |
|
50 |
} |
|
51 |
), |
|
52 |
/* new sequence generator */ |
|
53 |
@GenericGenerator( |
|
54 |
name="enhanced-sequence", |
|
55 |
strategy = "org.hibernate.id.enhanced.SequenceStyleGenerator", |
|
56 |
parameters = { |
|
57 |
@Parameter(name="optimizer", value = "pooled"), |
|
58 |
@Parameter(name="increment_size", value = "10") |
|
59 |
} |
|
60 |
) |
|
61 |
} |
|
33 | 62 |
) |
34 |
}) |
|
35 | 63 |
|
36 | 64 |
|
37 | 65 |
|
... | ... | |
96 | 124 |
|
97 | 125 |
import org.hibernate.annotations.GenericGenerator; |
98 | 126 |
import org.hibernate.annotations.MetaValue; |
127 |
import org.hibernate.annotations.Parameter; |
|
99 | 128 |
|
100 | 129 |
import eu.etaxonomy.cdm.model.agent.Institution; |
101 | 130 |
import eu.etaxonomy.cdm.model.agent.Person; |
... | ... | |
126 | 155 |
import eu.etaxonomy.cdm.model.occurrence.LivingBeing; |
127 | 156 |
import eu.etaxonomy.cdm.model.occurrence.Observation; |
128 | 157 |
import eu.etaxonomy.cdm.model.occurrence.Specimen; |
129 |
/*import eu.etaxonomy.cdm.model.reference.Book; |
|
130 |
import eu.etaxonomy.cdm.model.reference.BookSection; |
|
131 |
import eu.etaxonomy.cdm.model.reference.Database; |
|
132 |
import eu.etaxonomy.cdm.model.reference.Generic; |
|
133 |
import eu.etaxonomy.cdm.model.reference.Journal; |
|
134 |
import eu.etaxonomy.cdm.model.reference.Article; |
|
135 |
import eu.etaxonomy.cdm.model.reference.PrintSeries; |
|
136 |
import eu.etaxonomy.cdm.model.reference.Proceedings;*/ |
|
137 | 158 |
import eu.etaxonomy.cdm.model.reference.ReferenceBase; |
138 |
/*import eu.etaxonomy.cdm.model.reference.Thesis; |
|
139 |
import eu.etaxonomy.cdm.model.reference.WebPage;*/ |
|
140 | 159 |
import eu.etaxonomy.cdm.model.taxon.Synonym; |
141 | 160 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
142 | 161 |
import eu.etaxonomy.cdm.model.taxon.TaxonomicTree; |
Also available in: Unified diff
adding documentation to identity generators in package-info