@Target(value={TYPE,METHOD,FIELD}) @Retention(value=RUNTIME) public @interface BatchSize
@Entity
@BatchSize(size=100)
class Product {
...
}
will initialize up to 100 lazy Product entity proxies at a time.
@OneToMany
@BatchSize(size = 5) /
Set getProducts() { ... };
will initialize up to 5 lazy collections of products at a time| Modifier and Type | Required Element and Description |
|---|---|
int |
size
Strictly positive integer.
|
Copyright © 2017 JBoss by Red Hat. All rights reserved.