@Target(value={TYPE,METHOD,FIELD}) @Retention(value=RUNTIME) public @interface BatchSize
Defines size for batch loading of collections or lazy entities. For example… <blockquote><pre> @Entity @BatchSize(size=100) class Product { … } </pre></blockquote> will initialize up to 100 lazy Product entity proxies at a time.
<blockquote><pre> @OneToMany @BatchSize(size = 5) / Set<Product> getProducts() { … }; </pre></blockquote> 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 © 2001-2018 Red Hat, Inc. All Rights Reserved.