Package com.exedio.cope
Annotation Type CopeCreateLimit
-
@Target(TYPE) @Retention(RUNTIME) public @interface CopeCreateLimit
Specifies the maximum number of items (instances) that can becreated
over the whole live time of the database schema since itscreation
. For types without this annotation the limit defaults toInteger.MAX_VALUE
. The limit includes- items of
subtypes
of the type and - items created by transactions that are subsequently
rolled back
.
This limit is an upper bound. There is no guarantee, that actually that many items can be created. In particular certain methods of generating primary keys may 'loose' unused ranges of numbers due to caching.
The value is actually off by one. So @CopeCreateLimit(0) allows you to create one item. And @CopeCreateLimit(Integer.MAX_VALUE) allows you to create 2^31 items, not just 2^31 - 1.
This annotation may affect your database schema, in particular the type of
- the
primary column
of the type and its subtypes, - foreign key columns of
item fields
referring the type or its subtypes, and - the
sequence
for creating primary keys of the type.
- items of
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description long
value
-