注释类型 BatchSize


  • @Target({TYPE,METHOD,FIELD})
    @Retention(RUNTIME)
    public @interface BatchSize
    Defines size for batch loading of collections or lazy entities. For example...
         @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
    作者:
    Emmanuel Bernard, Steve Ebersole
    • 必需元素概要

      所需元素 
      修饰符和类型 必需的元素 说明
      int size
      Strictly positive integer.
    • 元素详细资料

      • size

        int size
        Strictly positive integer.