hibernate 注解大全
发布日期:2021-06-29 04:17:39 浏览次数:2 分类:技术文章

本文共 7347 字,大约阅读时间需要 24 分钟。

2019年5月1日21:39:55

 原文:http://docs.jboss.org/hibernate/orm/5.4/javadocs/

这个是hibernate 5.4版本

基于hibernate的一些工具api文档

http://docs.jboss.org/hibernate/

spring jpa的文档

https://spring.io/projects/spring-data-jpa#learn

Package org.hibernate.annotations

  • Class Summary
    Class Description
    Consolidation of hints available to Hibernate JPA queries.
  • Enum Summary
    Enum Description
    Cache concurrency strategy.
    Enumeration for the different interaction modes between the session and the Level 2 Cache.
    Cascade types (can override default JPA cascades).
    Fetch options on associations.
    Enumeration extending javax.persistence flush modes.
    At what time(s) will the generation occur?
    Lazy options available for a collection.
    Lazy options available for a ToOne association.
    Possible actions when an associated entity is not found in the database.
    Possible actions for on-delete.
    Possible optimistic locking strategies.
    Type of available polymorphism for a particular entity.
    Possible styles of checking return codes on SQL INSERT, UPDATE and DELETE queries.
    Deprecated
    Since  is deprecated.
    Where should Hibernate retrieve the value from? From the database, or from the current JVM?
  • Annotation Types Summary
    Annotation Type Description
    Deprecated
    Use  instead; renamed to avoid confusion with the JPA  enum.
    Defines a ToOne-style association pointing to one of several entity types depending on a local discriminator, as opposed to discriminated inheritance where the discriminator is kept as part of the entity hierarchy.
    Used to provide metadata about an   or   mapping.
    Used to group together   annotations.
    Names a persistent property access strategy ( ) to use.
    Defines size for batch loading of collections or lazy entities.
    Add caching strategy to a root entity or a collection.
    Apply a cascade strategy on an association.
    Arbitrary SQL CHECK constraints which can be defined at the class, property or collection level.
    Describe an identifier column for a bag (ie an idbag).
    Names a custom collection type for a persistent collection.
    Identifies the DEFAULT value to apply to the associated column via DDL.
    Support an array of columns.
    Custom SQL expression used to read the value from and write a value to a column.
    Plural annotation for @ColumnTransformer.
    Marks a property as the creation timestamp of the containing entity.
    Used to apply a Hibernate formula (derived value) as the inheritance discriminator "column".
    Optional annotation to express Hibernate specific discrimintor properties.
    For inserting, should this entity use dynamic sql generation where only non-null columns get referenced in the prepared sql statement?
    For updating, should this entity use dynamic sql generation where only changed columns get referenced in the prepared sql statement?

    Note, for re-attachment of detached entities this is not possible without select-before-update being enabled.

    Deprecated
    See individual attributes for intended replacements.
    Define the fetching strategy used for the given association.
    Define the fetching strategy profile.
    Descriptor for a particular association override.
    Collects together multiple fetch profiles.
    Add filters to an entity or a target entity of a collection.
    Filter definition.
    Array of filter definitions.
    Add filters to a join table collection.
    Add multiple 
    @FilterJoinTable to a collection.
    Add multiple 
    @Filters.
    Deprecated
    Prefer the JPA 2.1 introduced  instead.
    Defines a formula (derived value) which is a SQL fragment that acts as a @Column alternative in most cases.
    The annotated property is generated by the database.
    Marks a property as generated, specifying the   type to be used for generating the value.
    Generator annotation describing any kind of Hibernate generator in a generic (de-typed) manner.
    Array of generic generator definitions.
    Mark an Entity, a Collection, or an Attribute type as immutable.
    Deprecated
    Using  instead.
    Deprecated
    Prefer the standard JPA  annotation and the Hibernate specific  (for replacing ).
    Allows joins based on column or a formula.
    Collection of 
    @JoinColumnOrFormula definitions.
    To be used as a replacement for 
    @JoinColumn in most places.
    Define the lazy status of a collection.
    For use with bytecode-enhanced lazy-loading support.
    Define the laziness options available for a ToOne (ie OneToOne or ManyToOne) association.
    Defines the start index value for a list index as stored on the database.
    Used to override how Hibernate performs load operations.
    This is the collection-valued form of @Any definitions.
    Allows defining the type of the key of a persistent map.
    Maps a given discriminator value to the corresponding entity type.
    A grouping of Hibernate-specific   definitions.
    Extends   with Hibernate features.
    A grouping of Hibernate-specific   definitions.
    Extends   with Hibernate features.
    Marks a character data type (String, Character, character, Clob) as being a nationalized variant (NVARCHAR, NCHAR, NCLOB, etc).
    This specifies that a property is part of the natural id of the entity.
    Used to specify that the natural id values associated with the annotated entity should be cached in Hibernate's shared (L2) cache.
    Action to do when an element is not found on a association.
    Strategy to use on collections, arrays and on joined subclasses delete.
    Whether or not a change of the annotated property will trigger a entity version increment.
    Used to define the style of optimistic locking to be applied to an entity.
    Order a collection using SQL ordering (not HQL ordering).
    A parameter definition.
    Generic parameter (basically a key/value combination) used to parametrize other annotations.
    Reference the property as a pointer back to the owner (generally the owning entity).
    Specify a custom persister.
    Used to define the type of polymorphism Hibernate will apply to entity hierarchies.
    Lazy and proxy configuration of a particular class.
    Support for 
    ROWID mapping feature of Hibernate.
    Should the entity's current state be selected from the database when determining whether to perform an update when re-attaching detached entities?
    Deprecated
    Use  or  instead depending on need.
    Specifies in-memory Set/Map sorting using a specified   for sorting.
    Specifies in-memory Set/Map sorting using natural sorting.
    Optional annotation in conjunction with   and timestamp version properties indicating the source of the timestamp value.
    Custom SQL statement for delete of an entity/collection.
    Custom SQL statement for delete of all of a collection's elements.
    Describe aliases for filters.
    Custom SQL statement for insertion of an entity/collection.
    Custom SQL statement for update of an entity/collection.
    Map an immutable and read-only entity to a given SQL select expression.
    Ensures that auto-flush happens correctly and that queries against the derived entity do not return stale data.
    Complementary information to a table either primary or secondary.
    A grouping of tables.
    Define an explicit target, avoiding reflection and generics resolving.
    Define a tuplizer for an entity or a component.
    Grouping of tuplizers.
    Defines a Hibernate type mapping.
    A type definition.
    Plural form of  .
    Marks a property as the update timestamp of the containing entity.
    Marks an annotation type as a generator annotation type.
    Where clause to add to the element Entity or target entity of a collection.
    Where clause to add to the collection join table.

https://docs.spring.io/spring-data/jpa/docs/2.1.6.RELEASE/api/

转载地址:https://blog.csdn.net/zh7314/article/details/115652624 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:php代码规范->如何写出规范且易于理解的项目代码-ZX版
下一篇:java基础 数据类型转换

发表评论

最新留言

路过按个爪印,很不错,赞一个!
[***.219.124.196]2024年04月29日 01时37分06秒