注释类型 NamedQuery

    • 必需元素概要

      所需元素 
      修饰符和类型 必需的元素 说明
      String name
      The name of this NamedQuery.
      String query
      The query string for this NamedQuery.
    • 可选元素概要

      可选元素 
      修饰符和类型 可选元素 说明
      boolean cacheable
      Whether the query (results) is cacheable or not.
      CacheModeType cacheMode
      The cache mode used for this query.
      String cacheRegion
      If the query results are cacheable, name the query cache region to use.
      String comment
      A comment added to the generated SQL query.
      int fetchSize
      The number of rows fetched by the JDBC Driver per trip.
      FlushModeType flushMode
      The flush mode for this query.
      boolean readOnly
      Whether the results should be read-only.
      int timeout
      The query timeout (in seconds).
    • 元素详细资料

      • name

        String name
        The name of this NamedQuery.
      • query

        String query
        The query string for this NamedQuery.
      • flushMode

        FlushModeType flushMode
        The flush mode for this query.
        默认值:
        org.hibernate.annotations.FlushModeType.PERSISTENCE_CONTEXT
      • cacheable

        boolean cacheable
        Whether the query (results) is cacheable or not. Default is false, that is not cacheable.
        默认值:
        false
      • cacheRegion

        String cacheRegion
        If the query results are cacheable, name the query cache region to use.
        默认值:
        ""
      • fetchSize

        int fetchSize
        The number of rows fetched by the JDBC Driver per trip.
        默认值:
        -1
      • timeout

        int timeout
        The query timeout (in seconds). Default is no timeout.
        默认值:
        -1
      • comment

        String comment
        A comment added to the generated SQL query. Useful when engaging with DBA.
        默认值:
        ""
      • cacheMode

        CacheModeType cacheMode
        The cache mode used for this query. This refers to entities/collections returned from the query.
        默认值:
        org.hibernate.annotations.CacheModeType.NORMAL
      • readOnly

        boolean readOnly
        Whether the results should be read-only. Default is false.
        默认值:
        false