mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-26 05:14:57 +00:00
HHH-12388 - User Guide and Javadoc typo fixes
Fix a/an grammar in code and documentation, and other typos
This commit is contained in:
parent
6b12e794e9
commit
09495d4881
@ -215,7 +215,7 @@ over the `SessionFactory` building process.
|
|||||||
----
|
----
|
||||||
SessionFactoryBuilder sessionFactoryBuilder = metadata.getSessionFactoryBuilder();
|
SessionFactoryBuilder sessionFactoryBuilder = metadata.getSessionFactoryBuilder();
|
||||||
|
|
||||||
// Supply an SessionFactory-level Interceptor
|
// Supply a SessionFactory-level Interceptor
|
||||||
sessionFactoryBuilder.applyInterceptor( new MySessionFactoryInterceptor() );
|
sessionFactoryBuilder.applyInterceptor( new MySessionFactoryInterceptor() );
|
||||||
|
|
||||||
// Add a custom observer
|
// Add a custom observer
|
||||||
|
@ -164,8 +164,8 @@ JPA offers `SINGLE_TABLE`, `JOINED`, and `TABLE_PER_CLASS` to deal with inherita
|
|||||||
|
|
||||||
- `SINGLE_TABLE` performs the best in terms of executed SQL statements. However, you cannot use `NOT NULL` constraints on the column-level. You can still use triggers and rules to enforce such constraints, but it's not as straightforward.
|
- `SINGLE_TABLE` performs the best in terms of executed SQL statements. However, you cannot use `NOT NULL` constraints on the column-level. You can still use triggers and rules to enforce such constraints, but it's not as straightforward.
|
||||||
- `JOINED` addresses the data integrity concerns because every subclass is associated with a different table.
|
- `JOINED` addresses the data integrity concerns because every subclass is associated with a different table.
|
||||||
Polymorphic queries or ``@OneToMany` base class associations don't perform very well with this strategy.
|
Polymorphic queries or `@OneToMany` base class associations don't perform very well with this strategy.
|
||||||
However, polymorphic @ManyToOne` associations are fine, and they can provide a lot of value.
|
However, polymorphic `@ManyToOne` associations are fine, and they can provide a lot of value.
|
||||||
- `TABLE_PER_CLASS` should be avoided since it does not render efficient SQL statements.
|
- `TABLE_PER_CLASS` should be avoided since it does not render efficient SQL statements.
|
||||||
|
|
||||||
[[best-practices-fetching]]
|
[[best-practices-fetching]]
|
||||||
|
@ -245,7 +245,7 @@ include::{sourcedir}/BatchTest.java[tags=batch-bulk-hql-delete-example]
|
|||||||
|
|
||||||
Method `Query.executeUpdate()` returns an `int` value, which indicates the number of entities effected by the operation.
|
Method `Query.executeUpdate()` returns an `int` value, which indicates the number of entities effected by the operation.
|
||||||
This may or may not correlate to the number of rows effected in the database.
|
This may or may not correlate to the number of rows effected in the database.
|
||||||
An JPQL/HQL bulk operation might result in multiple SQL statements being executed, such as for joined-subclass.
|
A JPQL/HQL bulk operation might result in multiple SQL statements being executed, such as for joined-subclass.
|
||||||
In the example of joined-subclass, a `DELETE` against one of the subclasses may actually result in deletes in the tables underlying the join, or further down the inheritance hierarchy.
|
In the example of joined-subclass, a `DELETE` against one of the subclasses may actually result in deletes in the tables underlying the join, or further down the inheritance hierarchy.
|
||||||
|
|
||||||
==== HQL syntax for INSERT
|
==== HQL syntax for INSERT
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
As a JPA provider, Hibernate can introspect both the entity attributes (instance fields) or the accessors (instance properties).
|
As a JPA provider, Hibernate can introspect both the entity attributes (instance fields) or the accessors (instance properties).
|
||||||
By default, the placement of the `@Id` annotation gives the default access strategy.
|
By default, the placement of the `@Id` annotation gives the default access strategy.
|
||||||
When placed on a field, Hibernate will assume field-based access.
|
When placed on a field, Hibernate will assume field-based access.
|
||||||
Place on the identifier getter, Hibernate will use property-based access.
|
When placed on the identifier getter, Hibernate will use property-based access.
|
||||||
|
|
||||||
[IMPORTANT]
|
[IMPORTANT]
|
||||||
====
|
====
|
||||||
|
@ -439,7 +439,7 @@ include::{modeldir}/PhoneType.java[tags=hql-examples-domain-model-example]
|
|||||||
----
|
----
|
||||||
====
|
====
|
||||||
|
|
||||||
In the ORDINAL example, the `phone_type` column is defined as an (nullable) INTEGER type and would hold:
|
In the ORDINAL example, the `phone_type` column is defined as a (nullable) INTEGER type and would hold:
|
||||||
|
|
||||||
`NULL`:: For null values
|
`NULL`:: For null values
|
||||||
`0`:: For the `LAND_LINE` enum
|
`0`:: For the `LAND_LINE` enum
|
||||||
@ -1610,7 +1610,7 @@ include::{sourcedir}/basic/WhereTest.java[tags=mapping-where-example]
|
|||||||
If the database contains the following entities:
|
If the database contains the following entities:
|
||||||
|
|
||||||
[[mapping-where-persistence-example]]
|
[[mapping-where-persistence-example]]
|
||||||
.Persisting an fetching entities with a `@Where` mapping
|
.Persisting and fetching entities with a `@Where` mapping
|
||||||
====
|
====
|
||||||
[source, JAVA, indent=0]
|
[source, JAVA, indent=0]
|
||||||
----
|
----
|
||||||
@ -1717,7 +1717,7 @@ include::{sourcedir}/basic/FilterTest.java[tags=mapping-filter-example]
|
|||||||
If the database contains the following entities:
|
If the database contains the following entities:
|
||||||
|
|
||||||
[[mapping-filter-persistence-example]]
|
[[mapping-filter-persistence-example]]
|
||||||
.Persisting an fetching entities with a `@Filter` mapping
|
.Persisting and fetching entities with a `@Filter` mapping
|
||||||
====
|
====
|
||||||
[source, JAVA, indent=0]
|
[source, JAVA, indent=0]
|
||||||
----
|
----
|
||||||
@ -1821,7 +1821,7 @@ include::{sourcedir}/basic/FilterJoinTableTest.java[tags=mapping-filter-join-tab
|
|||||||
If the database contains the following entities:
|
If the database contains the following entities:
|
||||||
|
|
||||||
[[mapping-filter-join-table-persistence-example]]
|
[[mapping-filter-join-table-persistence-example]]
|
||||||
.Persisting an fetching entities with a `@FilterJoinTable` mapping
|
.Persisting and fetching entities with a `@FilterJoinTable` mapping
|
||||||
====
|
====
|
||||||
[source, JAVA, indent=0]
|
[source, JAVA, indent=0]
|
||||||
----
|
----
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
:extrasdir: extras/collections
|
:extrasdir: extras/collections
|
||||||
|
|
||||||
Naturally Hibernate also allows to persist collections.
|
Naturally Hibernate also allows to persist collections.
|
||||||
These persistent collections can contain almost any other Hibernate type, including: basic types, custom types, components and references to other entities.
|
These persistent collections can contain almost any other Hibernate type, including: basic types, custom types, embeddables and references to other entities.
|
||||||
In this context, the distinction between value and reference semantics is very important.
|
In this context, the distinction between value and reference semantics is very important.
|
||||||
An object in a collection might be handled with _value_ semantics (its life cycle being fully depends on the collection owner),
|
An object in a collection might be handled with _value_ semantics (its life cycle being fully depends on the collection owner),
|
||||||
or it might be a reference to another entity with its own life cycle.
|
or it might be a reference to another entity with its own life cycle.
|
||||||
@ -465,7 +465,7 @@ include::{sourcedir}/UnidirectionalSetTest.java[tags=collections-unidirectional-
|
|||||||
====
|
====
|
||||||
|
|
||||||
The unidirectional set lifecycle is similar to that of the <<collections-unidirectional-bag>>, so it can be omitted.
|
The unidirectional set lifecycle is similar to that of the <<collections-unidirectional-bag>>, so it can be omitted.
|
||||||
The only difference is that `Set` doesn't allow duplicates, but this constraint is enforced by the Java object contract rather then the database mapping.
|
The only difference is that `Set` doesn't allow duplicates, but this constraint is enforced by the Java object contract rather than the database mapping.
|
||||||
|
|
||||||
[NOTE]
|
[NOTE]
|
||||||
====
|
====
|
||||||
@ -540,7 +540,7 @@ include::{sourcedir}/UnidirectionalComparatorSortedSetTest.java[lines=75..77,ind
|
|||||||
[[collections-map]]
|
[[collections-map]]
|
||||||
==== Maps
|
==== Maps
|
||||||
|
|
||||||
A `java.util.Map` is ternary association because it required a parent entity a map key and a value.
|
A `java.util.Map` is a ternary association because it requires a parent entity, a map key and a value.
|
||||||
An entity can either be a map key or a map value, depending on the mapping.
|
An entity can either be a map key or a map value, depending on the mapping.
|
||||||
Hibernate allows using the following map keys:
|
Hibernate allows using the following map keys:
|
||||||
|
|
||||||
|
@ -376,7 +376,7 @@ include::{sourcedir-proxy}/ProxyInterfaceTest.java[tag=entity-proxy-interface-ma
|
|||||||
The https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/annotations/Proxy.html[`@Proxy`]
|
The https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/annotations/Proxy.html[`@Proxy`]
|
||||||
annotation is used to specify a custom Proxy implementation for the current annotated entity.
|
annotation is used to specify a custom Proxy implementation for the current annotated entity.
|
||||||
|
|
||||||
When loading the `Book` entity proxy, Hibernate is going to proxy the `Identifiable` interface instead as illustarted by the following example:
|
When loading the `Book` entity proxy, Hibernate is going to proxy the `Identifiable` interface instead as illustrated by the following example:
|
||||||
|
|
||||||
[[entity-proxy-persist-mapping]]
|
[[entity-proxy-persist-mapping]]
|
||||||
.Proxying the final entity class implementing the `Identifiable` interface
|
.Proxying the final entity class implementing the `Identifiable` interface
|
||||||
@ -420,7 +420,7 @@ include::{sourcedir-proxy}/tuplizer/Country.java[tag=entity-tuplizer-entity-mapp
|
|||||||
The `@Tuplizer` instructs Hibernate to use the `DynamicEntityTuplizer` and `DynamicEmbeddableTuplizer` to handle
|
The `@Tuplizer` instructs Hibernate to use the `DynamicEntityTuplizer` and `DynamicEmbeddableTuplizer` to handle
|
||||||
the associated entity and embeddable object types.
|
the associated entity and embeddable object types.
|
||||||
|
|
||||||
Both the `Cuising` entity and the `Country` embeddable types are going to be instantiated as Java dynamic proxies,
|
Both the `Cuisine` entity and the `Country` embeddable types are going to be instantiated as Java dynamic proxies,
|
||||||
as you can see in the following `DynamicInstantiator` example:
|
as you can see in the following `DynamicInstantiator` example:
|
||||||
|
|
||||||
[[entity-tuplizer-instantiator]]
|
[[entity-tuplizer-instantiator]]
|
||||||
@ -486,5 +486,5 @@ include::{sourcedir-persister}/Book.java[tag=entity-persister-mapping,indent=0]
|
|||||||
----
|
----
|
||||||
====
|
====
|
||||||
|
|
||||||
By providing you own `EntityPersister` and `CollectionPersister` implementations,
|
By providing your own `EntityPersister` and `CollectionPersister` implementations,
|
||||||
you can control how entities and collections are persisted in to the database.
|
you can control how entities and collections are persisted in to the database.
|
@ -4,11 +4,11 @@ VALUES ( 1 )
|
|||||||
|
|
||||||
INSERT INTO Phone
|
INSERT INTO Phone
|
||||||
( number, id )
|
( number, id )
|
||||||
VALUES ( '123 - 456 - 7890', 2 )
|
VALUES ( '123-456-7890', 2 )
|
||||||
|
|
||||||
INSERT INTO Phone
|
INSERT INTO Phone
|
||||||
( number, id )
|
( number, id )
|
||||||
VALUES ( '321 - 654 - 0987', 3 )
|
VALUES ( '321-654-0987', 3 )
|
||||||
|
|
||||||
INSERT INTO Person_Phone
|
INSERT INTO Person_Phone
|
||||||
( Person_id, phones_id )
|
( Person_id, phones_id )
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
INSERT INTO Phone ( number, id )
|
INSERT INTO Phone ( number, id )
|
||||||
VALUES ( '123 - 456 - 7890', 1 )
|
VALUES ( '123-456-7890', 1 )
|
||||||
|
|
||||||
INSERT INTO PhoneDetails ( phone_id, provider, technology, id )
|
INSERT INTO PhoneDetails ( phone_id, provider, technology, id )
|
||||||
VALUES ( 1, 'T - Mobile, GSM', 2 )
|
VALUES ( 1, 'T-Mobile', 'GSM', 2 )
|
@ -1,3 +1,4 @@
|
|||||||
|
insert
|
||||||
into
|
into
|
||||||
Book
|
Book
|
||||||
(author, title, id)
|
(author, title, id)
|
||||||
|
@ -117,7 +117,7 @@ include::{sourcedir}/EmbeddedIdTest.java[tag=identifiers-basic-embeddedid-mappin
|
|||||||
----
|
----
|
||||||
====
|
====
|
||||||
|
|
||||||
As mentioned before, EmbeddedIds can even contain `@ManyToOne` attributes.
|
As mentioned before, EmbeddedIds can even contain `@ManyToOne` attributes:
|
||||||
|
|
||||||
[[identifiers-basic-embeddedid-manytoone-mapping-example]]
|
[[identifiers-basic-embeddedid-manytoone-mapping-example]]
|
||||||
.`@EmbeddedId` with `@ManyToOne`
|
.`@EmbeddedId` with `@ManyToOne`
|
||||||
@ -200,7 +200,7 @@ Although the mapping is much simpler than using an `@EmbeddedId` or an `@IdClass
|
|||||||
To query this entity, an instance of the entity itself must be supplied to the persistence context.
|
To query this entity, an instance of the entity itself must be supplied to the persistence context.
|
||||||
|
|
||||||
[[identifiers-composite-id-fetching-example]]
|
[[identifiers-composite-id-fetching-example]]
|
||||||
.Fetchcing with composite identifiers
|
.Fetching with composite identifiers
|
||||||
====
|
====
|
||||||
[source,java]
|
[source,java]
|
||||||
----
|
----
|
||||||
@ -243,7 +243,7 @@ How a persistence provider interprets the AUTO generation type is left up to the
|
|||||||
|
|
||||||
The default behavior is to look at the java type of the identifier attribute.
|
The default behavior is to look at the java type of the identifier attribute.
|
||||||
|
|
||||||
If the identifier type is UUID, Hibernate is going to use an <<identifiers-generators-uuid, UUID identifier>>.
|
If the identifier type is UUID, Hibernate is going to use a <<identifiers-generators-uuid, UUID identifier>>.
|
||||||
|
|
||||||
If the identifier type is numerical (e.g. `Long`, `Integer`), then Hibernate is going to use the `IdGeneratorStrategyInterpreter` to resolve the identifier generator strategy.
|
If the identifier type is numerical (e.g. `Long`, `Integer`), then Hibernate is going to use the `IdGeneratorStrategyInterpreter` to resolve the identifier generator strategy.
|
||||||
The `IdGeneratorStrategyInterpreter` has two implementations:
|
The `IdGeneratorStrategyInterpreter` has two implementations:
|
||||||
|
@ -109,7 +109,7 @@ For this reason, you should prefer LAZY associations.
|
|||||||
[[fetching-strategies]]
|
[[fetching-strategies]]
|
||||||
=== Applying fetch strategies
|
=== Applying fetch strategies
|
||||||
|
|
||||||
Let's consider these topics as it relates to an simple domain model and a few use cases.
|
Let's consider these topics as it relates to a simple domain model and a few use cases.
|
||||||
|
|
||||||
[[fetching-strategies-domain-model-example]]
|
[[fetching-strategies-domain-model-example]]
|
||||||
.Sample domain model
|
.Sample domain model
|
||||||
|
@ -162,7 +162,7 @@ Your bundle's manifest will need to import, at a minimum,
|
|||||||
* `org.osgi.framework`, necessary to discover the `SessionFactory` (described below)
|
* `org.osgi.framework`, necessary to discover the `SessionFactory` (described below)
|
||||||
* `org.hibernate.*` packages, as necessary (ex: cfg, criterion, service, etc.)
|
* `org.hibernate.*` packages, as necessary (ex: cfg, criterion, service, etc.)
|
||||||
|
|
||||||
=== Obtaining an SessionFactory
|
=== Obtaining a SessionFactory
|
||||||
|
|
||||||
`hibernate-osgi` registers an OSGi service, using the `SessionFactory` interface name, that bootstraps and creates a `SessionFactory` specific for OSGi environments.
|
`hibernate-osgi` registers an OSGi service, using the `SessionFactory` interface name, that bootstraps and creates a `SessionFactory` specific for OSGi environments.
|
||||||
|
|
||||||
|
@ -310,9 +310,9 @@ Please note that the alias names in the result are simply examples, each alias w
|
|||||||
|
|
||||||
|A collection key |`{[aliasname].key}` |`ORGID as {coll.key}`
|
|A collection key |`{[aliasname].key}` |`ORGID as {coll.key}`
|
||||||
|
|
||||||
|The id of an collection |`{[aliasname].id}` |`EMPID as {coll.id}`
|
|The id of a collection |`{[aliasname].id}` |`EMPID as {coll.id}`
|
||||||
|
|
||||||
|The element of an collection |`{[aliasname].element}`
|
|The element of a collection |`{[aliasname].element}`
|
||||||
|`XID as {coll.element}`
|
|`XID as {coll.element}`
|
||||||
|
|
||||||
|property of the element in the collection
|
|property of the element in the collection
|
||||||
|
@ -206,7 +206,7 @@ jts_geometry::
|
|||||||
geolatte_geometry::
|
geolatte_geometry::
|
||||||
Handled by `org.hibernate.spatial.GeolatteGeometryType`, it maps a database geometry column type to an `org.geolatte.geom.Geometry` entity property type.
|
Handled by `org.hibernate.spatial.GeolatteGeometryType`, it maps a database geometry column type to an `org.geolatte.geom.Geometry` entity property type.
|
||||||
|
|
||||||
It suffices to declare a property as either a JTS or an Geolatte-geom `Geometry` and Hibernate Spatial will map it using the
|
It suffices to declare a property as either a JTS or a Geolatte-geom `Geometry` and Hibernate Spatial will map it using the
|
||||||
relevant type.
|
relevant type.
|
||||||
|
|
||||||
Here is an example using JTS:
|
Here is an example using JTS:
|
||||||
|
@ -263,7 +263,7 @@ public void test_bootstrap_bootstrap_native_SessionFactory_example() {
|
|||||||
|
|
||||||
SessionFactoryBuilder sessionFactoryBuilder = metadata.getSessionFactoryBuilder();
|
SessionFactoryBuilder sessionFactoryBuilder = metadata.getSessionFactoryBuilder();
|
||||||
|
|
||||||
// Supply an SessionFactory-level Interceptor
|
// Supply a SessionFactory-level Interceptor
|
||||||
sessionFactoryBuilder.applyInterceptor( new CustomSessionFactoryInterceptor() );
|
sessionFactoryBuilder.applyInterceptor( new CustomSessionFactoryInterceptor() );
|
||||||
|
|
||||||
// Add a custom observer
|
// Add a custom observer
|
||||||
|
@ -505,7 +505,7 @@ joinElement! {
|
|||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
// Returns an node type integer that represents the join type
|
// Returns a node type integer that represents the join type
|
||||||
// tokens.
|
// tokens.
|
||||||
joinType returns [int j] {
|
joinType returns [int j] {
|
||||||
j = INNER;
|
j = INNER;
|
||||||
|
@ -837,7 +837,7 @@ public interface Session extends SharedSessionContract, EntityManager, Hibernate
|
|||||||
<T> IdentifierLoadAccess<T> byId(Class<T> entityClass);
|
<T> IdentifierLoadAccess<T> byId(Class<T> entityClass);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an {@link NaturalIdLoadAccess} instance to retrieve the specified entity by
|
* Create a {@link NaturalIdLoadAccess} instance to retrieve the specified entity by
|
||||||
* its natural id.
|
* its natural id.
|
||||||
*
|
*
|
||||||
* @param entityName The entity name of the entity type to be retrieved
|
* @param entityName The entity name of the entity type to be retrieved
|
||||||
@ -849,7 +849,7 @@ public interface Session extends SharedSessionContract, EntityManager, Hibernate
|
|||||||
NaturalIdLoadAccess byNaturalId(String entityName);
|
NaturalIdLoadAccess byNaturalId(String entityName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an {@link NaturalIdLoadAccess} instance to retrieve the specified entity by
|
* Create a {@link NaturalIdLoadAccess} instance to retrieve the specified entity by
|
||||||
* its natural id.
|
* its natural id.
|
||||||
*
|
*
|
||||||
* @param entityClass The entity type to be retrieved
|
* @param entityClass The entity type to be retrieved
|
||||||
@ -861,7 +861,7 @@ public interface Session extends SharedSessionContract, EntityManager, Hibernate
|
|||||||
<T> NaturalIdLoadAccess<T> byNaturalId(Class<T> entityClass);
|
<T> NaturalIdLoadAccess<T> byNaturalId(Class<T> entityClass);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an {@link SimpleNaturalIdLoadAccess} instance to retrieve the specified entity by
|
* Create a {@link SimpleNaturalIdLoadAccess} instance to retrieve the specified entity by
|
||||||
* its natural id.
|
* its natural id.
|
||||||
*
|
*
|
||||||
* @param entityName The entity name of the entity type to be retrieved
|
* @param entityName The entity name of the entity type to be retrieved
|
||||||
@ -874,7 +874,7 @@ public interface Session extends SharedSessionContract, EntityManager, Hibernate
|
|||||||
SimpleNaturalIdLoadAccess bySimpleNaturalId(String entityName);
|
SimpleNaturalIdLoadAccess bySimpleNaturalId(String entityName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an {@link SimpleNaturalIdLoadAccess} instance to retrieve the specified entity by
|
* Create a {@link SimpleNaturalIdLoadAccess} instance to retrieve the specified entity by
|
||||||
* its simple (single attribute) natural id.
|
* its simple (single attribute) natural id.
|
||||||
*
|
*
|
||||||
* @param entityClass The entity type to be retrieved
|
* @param entityClass The entity type to be retrieved
|
||||||
|
@ -20,7 +20,7 @@ public class TransientPropertyValueException extends TransientObjectException {
|
|||||||
private final String propertyName;
|
private final String propertyName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs an {@link TransientPropertyValueException} instance.
|
* Constructs a {@link TransientPropertyValueException} instance.
|
||||||
*
|
*
|
||||||
* @param message - the exception message;
|
* @param message - the exception message;
|
||||||
* @param transientEntityName - the entity name for the transient entity
|
* @param transientEntityName - the entity name for the transient entity
|
||||||
|
@ -66,7 +66,7 @@ public interface ImplicitNamingStrategy {
|
|||||||
public Identifier determineJoinTableName(ImplicitJoinTableNameSource source);
|
public Identifier determineJoinTableName(ImplicitJoinTableNameSource source);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine the name of an collection join table given the source naming
|
* Determine the name of a collection join table given the source naming
|
||||||
* information, when a name is not explicitly given.
|
* information, when a name is not explicitly given.
|
||||||
*
|
*
|
||||||
* @param source The source information
|
* @param source The source information
|
||||||
|
@ -156,7 +156,7 @@ public BootstrapServiceRegistryBuilder withStrategySelectors(StrategyRegistratio
|
|||||||
/**
|
/**
|
||||||
* Applies one or more strategy selectors announced as available by the passed announcer.
|
* Applies one or more strategy selectors announced as available by the passed announcer.
|
||||||
*
|
*
|
||||||
* @param strategyRegistrationProvider An provider for one or more available selectors
|
* @param strategyRegistrationProvider A provider for one or more available selectors
|
||||||
*
|
*
|
||||||
* @return {@code this}, for method chaining
|
* @return {@code this}, for method chaining
|
||||||
*
|
*
|
||||||
|
@ -49,11 +49,11 @@ public interface EnhancementContext {
|
|||||||
public boolean isCompositeClass(UnloadedClass classDescriptor);
|
public boolean isCompositeClass(UnloadedClass classDescriptor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does the given class name represent an MappedSuperclass class?
|
* Does the given class name represent a MappedSuperclass class?
|
||||||
*
|
*
|
||||||
* @param classDescriptor The descriptor of the class to check.
|
* @param classDescriptor The descriptor of the class to check.
|
||||||
*
|
*
|
||||||
* @return {@code true} if the class is an mapped super class; {@code false} otherwise.
|
* @return {@code true} if the class is a mapped super class; {@code false} otherwise.
|
||||||
*/
|
*/
|
||||||
public boolean isMappedSuperclassClass(UnloadedClass classDescriptor);
|
public boolean isMappedSuperclassClass(UnloadedClass classDescriptor);
|
||||||
|
|
||||||
|
@ -479,7 +479,7 @@ else if ( generatorAnn instanceof GenericGenerator ) {
|
|||||||
* @param clazzToProcess entity to bind as {@code XClass} instance
|
* @param clazzToProcess entity to bind as {@code XClass} instance
|
||||||
* @param inheritanceStatePerClass Meta data about the inheritance relationships for all mapped classes
|
* @param inheritanceStatePerClass Meta data about the inheritance relationships for all mapped classes
|
||||||
*
|
*
|
||||||
* @throws MappingException in case there is an configuration error
|
* @throws MappingException in case there is a configuration error
|
||||||
*/
|
*/
|
||||||
public static void bindClass(
|
public static void bindClass(
|
||||||
XClass clazzToProcess,
|
XClass clazzToProcess,
|
||||||
|
@ -274,7 +274,7 @@ public DetachedCriteria createAlias(String associationPath, String alias, int jo
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an nested DetachedCriteria representing the association path.
|
* Creates a nested DetachedCriteria representing the association path.
|
||||||
*
|
*
|
||||||
* @param associationPath The association path
|
* @param associationPath The association path
|
||||||
* @param alias The alias to apply to that association path
|
* @param alias The alias to apply to that association path
|
||||||
@ -286,7 +286,7 @@ public DetachedCriteria createCriteria(String associationPath, String alias) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an nested DetachedCriteria representing the association path.
|
* Creates a nested DetachedCriteria representing the association path.
|
||||||
*
|
*
|
||||||
* @param associationPath The association path
|
* @param associationPath The association path
|
||||||
*
|
*
|
||||||
@ -297,7 +297,7 @@ public DetachedCriteria createCriteria(String associationPath) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an nested DetachedCriteria representing the association path, specifying the type of join to use.
|
* Creates a nested DetachedCriteria representing the association path, specifying the type of join to use.
|
||||||
*
|
*
|
||||||
* @param associationPath The association path
|
* @param associationPath The association path
|
||||||
* @param joinType The type of join to use
|
* @param joinType The type of join to use
|
||||||
@ -309,7 +309,7 @@ public DetachedCriteria createCriteria(String associationPath, JoinType joinType
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an nested DetachedCriteria representing the association path, specifying the type of join to use.
|
* Creates a nested DetachedCriteria representing the association path, specifying the type of join to use.
|
||||||
*
|
*
|
||||||
* @param associationPath The association path
|
* @param associationPath The association path
|
||||||
* @param alias The alias to associate with this "join".
|
* @param alias The alias to associate with this "join".
|
||||||
@ -322,7 +322,7 @@ public DetachedCriteria createCriteria(String associationPath, String alias, Joi
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an nested DetachedCriteria representing the association path, specifying the type of join to use and
|
* Creates a nested DetachedCriteria representing the association path, specifying the type of join to use and
|
||||||
* an additional join restriction.
|
* an additional join restriction.
|
||||||
*
|
*
|
||||||
* @param associationPath The association path
|
* @param associationPath The association path
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
package org.hibernate.criterion;
|
package org.hibernate.criterion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents an strategy for matching strings using "like".
|
* Represents a strategy for matching strings using "like".
|
||||||
*
|
*
|
||||||
* @author Gavin King
|
* @author Gavin King
|
||||||
* @see Example#enableLike(MatchMode)
|
* @see Example#enableLike(MatchMode)
|
||||||
|
@ -132,7 +132,7 @@ public Criterion eqOrIsNull(Object value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an non-equality restriction.
|
* Creates a non-equality restriction.
|
||||||
*
|
*
|
||||||
* @param value The value to check against
|
* @param value The value to check against
|
||||||
*
|
*
|
||||||
@ -145,7 +145,7 @@ public SimpleExpression ne(Object value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an non-equality restriction capable of also rendering as IS NOT NULL if the given value is {@code null}
|
* Creates a non-equality restriction capable of also rendering as IS NOT NULL if the given value is {@code null}
|
||||||
*
|
*
|
||||||
* @param value The value to check against
|
* @param value The value to check against
|
||||||
*
|
*
|
||||||
@ -241,7 +241,7 @@ public PropertyExpression eqProperty(String other) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an non-equality restriction between 2 properties
|
* Creates a non-equality restriction between 2 properties
|
||||||
*
|
*
|
||||||
* @param other The other property to compare against
|
* @param other The other property to compare against
|
||||||
*
|
*
|
||||||
@ -255,7 +255,7 @@ public PropertyExpression neProperty(Property other) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an non-equality restriction between 2 properties
|
* Creates a non-equality restriction between 2 properties
|
||||||
*
|
*
|
||||||
* @param other The other property to compare against
|
* @param other The other property to compare against
|
||||||
*
|
*
|
||||||
@ -269,7 +269,7 @@ public PropertyExpression neProperty(String other) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an less-than-or-equal-to restriction between 2 properties
|
* Creates a less-than-or-equal-to restriction between 2 properties
|
||||||
*
|
*
|
||||||
* @param other The other property to compare against
|
* @param other The other property to compare against
|
||||||
*
|
*
|
||||||
@ -283,7 +283,7 @@ public PropertyExpression leProperty(Property other) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an less-than-or-equal-to restriction between 2 properties
|
* Creates a less-than-or-equal-to restriction between 2 properties
|
||||||
*
|
*
|
||||||
* @param other The other property to compare against
|
* @param other The other property to compare against
|
||||||
*
|
*
|
||||||
@ -297,7 +297,7 @@ public PropertyExpression leProperty(String other) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an greater-than-or-equal-to restriction between 2 properties
|
* Creates a greater-than-or-equal-to restriction between 2 properties
|
||||||
*
|
*
|
||||||
* @param other The other property to compare against
|
* @param other The other property to compare against
|
||||||
*
|
*
|
||||||
@ -311,7 +311,7 @@ public PropertyExpression geProperty(Property other) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an greater-than-or-equal-to restriction between 2 properties
|
* Creates a greater-than-or-equal-to restriction between 2 properties
|
||||||
*
|
*
|
||||||
* @param other The other property to compare against
|
* @param other The other property to compare against
|
||||||
*
|
*
|
||||||
@ -325,7 +325,7 @@ public PropertyExpression geProperty(String other) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an less-than restriction between 2 properties
|
* Creates a less-than restriction between 2 properties
|
||||||
*
|
*
|
||||||
* @param other The other property to compare against
|
* @param other The other property to compare against
|
||||||
*
|
*
|
||||||
@ -339,7 +339,7 @@ public PropertyExpression ltProperty(Property other) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an less-than restriction between 2 properties
|
* Creates a less-than restriction between 2 properties
|
||||||
*
|
*
|
||||||
* @param other The other property to compare against
|
* @param other The other property to compare against
|
||||||
*
|
*
|
||||||
@ -353,7 +353,7 @@ public PropertyExpression ltProperty(String other) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an greater-than restriction between 2 properties
|
* Creates a greater-than restriction between 2 properties
|
||||||
*
|
*
|
||||||
* @param other The other property to compare against
|
* @param other The other property to compare against
|
||||||
*
|
*
|
||||||
@ -367,7 +367,7 @@ public PropertyExpression gtProperty(Property other) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an greater-than restriction between 2 properties
|
* Creates a greater-than restriction between 2 properties
|
||||||
*
|
*
|
||||||
* @param other The other property to compare against
|
* @param other The other property to compare against
|
||||||
*
|
*
|
||||||
|
@ -2671,7 +2671,7 @@ public boolean requiresParensForTupleDistinctCounts() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the limit that the underlying database places on the number elements in an {@code IN} predicate.
|
* Return the limit that the underlying database places on the number of elements in an {@code IN} predicate.
|
||||||
* If the database defines no such limits, simply return zero or less-than-zero.
|
* If the database defines no such limits, simply return zero or less-than-zero.
|
||||||
*
|
*
|
||||||
* @return int The limit, or zero-or-less to indicate no limit.
|
* @return int The limit, or zero-or-less to indicate no limit.
|
||||||
@ -2684,7 +2684,7 @@ public int getInExpressionCountLimit() {
|
|||||||
* HHH-4635
|
* HHH-4635
|
||||||
* Oracle expects all Lob values to be last in inserts and updates.
|
* Oracle expects all Lob values to be last in inserts and updates.
|
||||||
*
|
*
|
||||||
* @return boolean True of Lob values should be last, false if it
|
* @return boolean True if Lob values should be last, false if it
|
||||||
* does not matter.
|
* does not matter.
|
||||||
*/
|
*/
|
||||||
public boolean forceLobAsLastValue() {
|
public boolean forceLobAsLastValue() {
|
||||||
|
@ -844,7 +844,7 @@ public void addNewCollection(CollectionPersister persister, PersistentCollection
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add an collection to the cache, with a given collection entry.
|
* Add a collection to the cache, with a given collection entry.
|
||||||
*
|
*
|
||||||
* @param coll The collection for which we are adding an entry.
|
* @param coll The collection for which we are adding an entry.
|
||||||
* @param entry The entry representing the collection.
|
* @param entry The entry representing the collection.
|
||||||
|
@ -180,7 +180,7 @@ else if ( c == ':' ) {
|
|||||||
else if ( c == '?' ) {
|
else if ( c == '?' ) {
|
||||||
// could be either an ordinal or JPA-positional parameter
|
// could be either an ordinal or JPA-positional parameter
|
||||||
if ( indx < stringLength - 1 && Character.isDigit( sqlString.charAt( indx + 1 ) ) ) {
|
if ( indx < stringLength - 1 && Character.isDigit( sqlString.charAt( indx + 1 ) ) ) {
|
||||||
// a peek ahead showed this as an JPA-positional parameter
|
// a peek ahead showed this as a JPA-positional parameter
|
||||||
final int right = StringHelper.firstIndexOfChar( sqlString, ParserHelper.HQL_SEPARATORS, indx + 1 );
|
final int right = StringHelper.firstIndexOfChar( sqlString, ParserHelper.HQL_SEPARATORS, indx + 1 );
|
||||||
final int chopLocation = right < 0 ? sqlString.length() : right;
|
final int chopLocation = right < 0 ? sqlString.length() : right;
|
||||||
final String param = sqlString.substring( indx + 1, chopLocation );
|
final String param = sqlString.substring( indx + 1, chopLocation );
|
||||||
|
@ -101,7 +101,7 @@ public class ActionQueue {
|
|||||||
private BeforeTransactionCompletionProcessQueue beforeTransactionProcesses;
|
private BeforeTransactionCompletionProcessQueue beforeTransactionProcesses;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An LinkedHashMap containing providers for all the ExecutableLists, inserted in execution order
|
* A LinkedHashMap containing providers for all the ExecutableLists, inserted in execution order
|
||||||
*/
|
*/
|
||||||
private static final LinkedHashMap<Class<? extends Executable>,ListProvider> EXECUTABLE_LISTS_MAP;
|
private static final LinkedHashMap<Class<? extends Executable>,ListProvider> EXECUTABLE_LISTS_MAP;
|
||||||
static {
|
static {
|
||||||
|
@ -232,7 +232,7 @@ private boolean isCached(EntityKey entityKey, EntityPersister persister) {
|
|||||||
// collection batch support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// collection batch support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If an CollectionEntry represents a batch loadable collection, add
|
* If a CollectionEntry represents a batch loadable collection, add
|
||||||
* it to the queue.
|
* it to the queue.
|
||||||
*/
|
*/
|
||||||
public void addBatchLoadableCollection(PersistentCollection collection, CollectionEntry ce) {
|
public void addBatchLoadableCollection(PersistentCollection collection, CollectionEntry ce) {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
import org.jboss.logging.Logger;
|
import org.jboss.logging.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A strategy for determining if a version value is an version of
|
* A strategy for determining if a version value is a version of
|
||||||
* a new transient instance or a previously persistent transient instance.
|
* a new transient instance or a previously persistent transient instance.
|
||||||
* The strategy is determined by the <tt>unsaved-value</tt> attribute in
|
* The strategy is determined by the <tt>unsaved-value</tt> attribute in
|
||||||
* the mapping file.
|
* the mapping file.
|
||||||
|
@ -262,7 +262,7 @@ public Object put(Object mergeEntity, Object managedEntity) {
|
|||||||
}
|
}
|
||||||
if ( oldOperatedOn != null ) {
|
if ( oldOperatedOn != null ) {
|
||||||
throw new IllegalStateException(
|
throw new IllegalStateException(
|
||||||
"MergeContext#mergeEntityToOperatedOnFlagMap contains an merge entity " + printEntity( mergeEntity )
|
"MergeContext#mergeEntityToOperatedOnFlagMap contains a merge entity " + printEntity( mergeEntity )
|
||||||
+ ", but MergeContext#mergeToManagedEntityXref does not."
|
+ ", but MergeContext#mergeToManagedEntityXref does not."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -278,7 +278,7 @@ public Object put(Object mergeEntity, Object managedEntity) {
|
|||||||
}
|
}
|
||||||
if ( oldOperatedOn == null ) {
|
if ( oldOperatedOn == null ) {
|
||||||
throw new IllegalStateException(
|
throw new IllegalStateException(
|
||||||
"MergeContext#mergeToManagedEntityXref contained an mergeEntity " + printEntity( mergeEntity )
|
"MergeContext#mergeToManagedEntityXref contained a merge entity " + printEntity( mergeEntity )
|
||||||
+ ", but MergeContext#mergeEntityToOperatedOnFlagMap did not."
|
+ ", but MergeContext#mergeEntityToOperatedOnFlagMap did not."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ private FromElement createFromElementInSubselect(
|
|||||||
String classAlias) throws SemanticException {
|
String classAlias) throws SemanticException {
|
||||||
LOG.debugf( "createFromElementInSubselect() : path = %s", path );
|
LOG.debugf( "createFromElementInSubselect() : path = %s", path );
|
||||||
|
|
||||||
// Create an DotNode AST for the path and resolve it.
|
// Create a DotNode AST for the path and resolve it.
|
||||||
FromElement fromElement = evaluateFromElementPath( path, classAlias );
|
FromElement fromElement = evaluateFromElementPath( path, classAlias );
|
||||||
EntityPersister entityPersister = fromElement.getEntityPersister();
|
EntityPersister entityPersister = fromElement.getEntityPersister();
|
||||||
|
|
||||||
|
@ -261,7 +261,7 @@ private void finishInitialization(ArrayList queryReturnTypeList) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initializeColumnNames() {
|
private void initializeColumnNames() {
|
||||||
// Generate an 2d array of column names, the first dimension is parallel with the
|
// Generate a 2d array of column names, the first dimension is parallel with the
|
||||||
// return types array. The second dimension is the list of column names for each
|
// return types array. The second dimension is the list of column names for each
|
||||||
// type.
|
// type.
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
import org.jboss.logging.Logger;
|
import org.jboss.logging.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates identifier values based on an sequence-style database structure.
|
* Generates identifier values based on a sequence-style database structure.
|
||||||
* Variations range from actually using a sequence to using a table to mimic
|
* Variations range from actually using a sequence to using a table to mimic
|
||||||
* a sequence. These variations are encapsulated by the {@link DatabaseStructure}
|
* a sequence. These variations are encapsulated by the {@link DatabaseStructure}
|
||||||
* interface internally.
|
* interface internally.
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract InsertGeneratedIdentifierDelegate implementation where the
|
* Abstract InsertGeneratedIdentifierDelegate implementation where the
|
||||||
* underlying strategy requires an subsequent select after the insert
|
* underlying strategy requires a subsequent select after the insert
|
||||||
* to determine the generated identifier.
|
* to determine the generated identifier.
|
||||||
*
|
*
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
|
@ -448,7 +448,7 @@ void invalidJndiName(
|
|||||||
void invalidOnDeleteAnnotation(String entityName);
|
void invalidOnDeleteAnnotation(String entityName);
|
||||||
|
|
||||||
@LogMessage(level = WARN)
|
@LogMessage(level = WARN)
|
||||||
@Message(value = "Root entity should not hold an PrimaryKeyJoinColum(s), will be ignored: %s", id = 137)
|
@Message(value = "Root entity should not hold a PrimaryKeyJoinColum(s), will be ignored: %s", id = 137)
|
||||||
void invalidPrimaryKeyJoinColumnAnnotation(String className);
|
void invalidPrimaryKeyJoinColumnAnnotation(String className);
|
||||||
|
|
||||||
@LogMessage(level = WARN)
|
@LogMessage(level = WARN)
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An JoinedIterable is an Iterable that wraps a number of Iterables.
|
* A JoinedIterable is an Iterable that wraps a number of Iterables.
|
||||||
*
|
*
|
||||||
* This class makes multiple iterables look like one to the caller.
|
* This class makes multiple iterables look like one to the caller.
|
||||||
* When any method from the Iterator interface is called on the
|
* When any method from the Iterator interface is called on the
|
||||||
|
@ -173,7 +173,7 @@ private MBeanServer findServer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for ( MBeanServer mbeanServer : mbeanServers ) {
|
for ( MBeanServer mbeanServer : mbeanServers ) {
|
||||||
// they did specify a domain, so attempt to locate an MBEanServer with a matching default domain, returning it
|
// they did specify a domain, so attempt to locate an MBeanServer with a matching default domain, returning it
|
||||||
// if we find it.
|
// if we find it.
|
||||||
if ( defaultDomain.equals( mbeanServer.getDefaultDomain() ) ) {
|
if ( defaultDomain.equals( mbeanServer.getDefaultDomain() ) ) {
|
||||||
return mbeanServer;
|
return mbeanServer;
|
||||||
|
@ -469,7 +469,7 @@ private MergedSettings mergeSettings(
|
|||||||
// 1) additional JACC permissions
|
// 1) additional JACC permissions
|
||||||
// 2) additional cache region declarations
|
// 2) additional cache region declarations
|
||||||
//
|
//
|
||||||
// we will also clean up an references with null entries
|
// we will also clean up any references with null entries
|
||||||
Iterator itr = mergedSettings.configurationValues.entrySet().iterator();
|
Iterator itr = mergedSettings.configurationValues.entrySet().iterator();
|
||||||
while ( itr.hasNext() ) {
|
while ( itr.hasNext() ) {
|
||||||
final Map.Entry entry = (Map.Entry) itr.next();
|
final Map.Entry entry = (Map.Entry) itr.next();
|
||||||
|
@ -132,15 +132,16 @@ public void finishingEntity(final EntityDefinition entityDefinition) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* I'm using NULL-OBJECT pattern here, for attributes that not existing in the EntityGraph,
|
* I'm using the NULL-OBJECT pattern here.
|
||||||
|
* For attributes that don't exist in the EntityGraph,
|
||||||
* a predefined NULL-ATTRIBUTE-NODE is pushed to the stack.
|
* a predefined NULL-ATTRIBUTE-NODE is pushed to the stack.
|
||||||
*
|
*
|
||||||
* and for an not existing sub graph, a predefined NULL-SUBGRAPH is pushed to the stack.
|
* And for a nonexistent subgraph, a predefined NULL-SUBGRAPH is pushed to the stack.
|
||||||
*
|
*
|
||||||
* So, whenever we're start visiting an attribute, there will be a attribute node pushed to the attribute stack,
|
* So, whenever we start visiting an attribute, there will be an attribute node pushed to the attribute stack,
|
||||||
* and a subgraph node pushed to the graph stack.
|
* and a subgraph node pushed to the graph stack.
|
||||||
*
|
*
|
||||||
* when we're finish visiting an attribute, these two will be poped from each stack.
|
* when we finish visiting an attribute, these two will be popped from each stack.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean startingAttribute(AttributeDefinition attributeDefinition) {
|
public boolean startingAttribute(AttributeDefinition attributeDefinition) {
|
||||||
|
@ -318,7 +318,7 @@ private <X> void applyIdMetadata(MappedSuperclass mappingType, MappedSuperclassT
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//an MappedSuperclass can have no identifier if the id is set below in the hierarchy
|
//a MappedSuperclass can have no identifier if the id is set below in the hierarchy
|
||||||
else if ( mappingType.getIdentifierMapper() != null ) {
|
else if ( mappingType.getIdentifierMapper() != null ) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
Iterator<Property> propertyIterator = mappingType.getIdentifierMapper().getPropertyIterator();
|
Iterator<Property> propertyIterator = mappingType.getIdentifierMapper().getPropertyIterator();
|
||||||
|
@ -58,7 +58,7 @@ interface Interceptor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An static interceptor that guards against method calls before the interceptor is set.
|
* A static interceptor that guards against method calls before the interceptor is set.
|
||||||
*/
|
*/
|
||||||
class InterceptorDispatcher {
|
class InterceptorDispatcher {
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
import org.hibernate.type.Type;
|
import org.hibernate.type.Type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Models an <tt>[NOT] IN</tt> restriction
|
* Models a <tt>[NOT] IN</tt> restriction
|
||||||
*
|
*
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
import org.hibernate.query.criteria.internal.path.PluralAttributePath;
|
import org.hibernate.query.criteria.internal.path.PluralAttributePath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Models an <tt>[NOT] MEMBER OF</tt> restriction
|
* Models a <tt>[NOT] MEMBER OF</tt> restriction
|
||||||
*
|
*
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
|
@ -51,7 +51,7 @@ public interface Type extends Serializable {
|
|||||||
* A {@link CollectionType} is additionally an {@link AssociationType}; so if this method returns true,
|
* A {@link CollectionType} is additionally an {@link AssociationType}; so if this method returns true,
|
||||||
* {@link #isAssociationType()} should also return true.
|
* {@link #isAssociationType()} should also return true.
|
||||||
*
|
*
|
||||||
* @return True if this type is also an {@link CollectionType} implementor; false otherwise.
|
* @return True if this type is also a {@link CollectionType} implementor; false otherwise.
|
||||||
*/
|
*/
|
||||||
boolean isCollectionType();
|
boolean isCollectionType();
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ public interface Type extends Serializable {
|
|||||||
* version of {@code (type instanceof CompositeType.class)}. A component type may own collections or
|
* version of {@code (type instanceof CompositeType.class)}. A component type may own collections or
|
||||||
* associations and hence must provide certain extra functionality.
|
* associations and hence must provide certain extra functionality.
|
||||||
*
|
*
|
||||||
* @return True if this type is also an {@link CompositeType} implementor; false otherwise.
|
* @return True if this type is also a {@link CompositeType} implementor; false otherwise.
|
||||||
*/
|
*/
|
||||||
boolean isComponentType();
|
boolean isComponentType();
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
<xsd:documentation>
|
<xsd:documentation>
|
||||||
|
|
||||||
The entity-mappings element is the root element of an mapping
|
The entity-mappings element is the root element of a mapping
|
||||||
file. It contains the following four types of elements:
|
file. It contains the following four types of elements:
|
||||||
|
|
||||||
1. The persistence-unit-metadata element contains metadata
|
1. The persistence-unit-metadata element contains metadata
|
||||||
|
@ -100,7 +100,7 @@ public void testPaginationWithCTEQueryNoOffsetNewLine() {
|
|||||||
@Test
|
@Test
|
||||||
@TestForIssue(jiraKey = "HHH-8916")
|
@TestForIssue(jiraKey = "HHH-8916")
|
||||||
public void testPaginationWithCTEQueryWithOffsetAndOrderBy() {
|
public void testPaginationWithCTEQueryWithOffsetAndOrderBy() {
|
||||||
// This used to throw an StringIndexOutOfBoundsException
|
// This used to throw a StringIndexOutOfBoundsException
|
||||||
doInHibernate( this::sessionFactory, session -> {
|
doInHibernate( this::sessionFactory, session -> {
|
||||||
for ( int i = 0; i < 20; ++i ) {
|
for ( int i = 0; i < 20; ++i ) {
|
||||||
session.persist( new Product2( i, "Product" + i ) );
|
session.persist( new Product2( i, "Product" + i ) );
|
||||||
@ -127,7 +127,7 @@ public void testPaginationWithCTEQueryWithOffsetAndOrderBy() {
|
|||||||
@Test
|
@Test
|
||||||
@TestForIssue(jiraKey = "HHH-8916")
|
@TestForIssue(jiraKey = "HHH-8916")
|
||||||
public void testPaginationWithCTEQueryWithOffset() {
|
public void testPaginationWithCTEQueryWithOffset() {
|
||||||
// This used to throw an StringIndexOutOfBoundsException
|
// This used to throw a StringIndexOutOfBoundsException
|
||||||
doInHibernate( this::sessionFactory, session -> {
|
doInHibernate( this::sessionFactory, session -> {
|
||||||
for ( int i = 0; i < 20; ++i ) {
|
for ( int i = 0; i < 20; ++i ) {
|
||||||
session.persist( new Product2( i, "Product" + i ) );
|
session.persist( new Product2( i, "Product" + i ) );
|
||||||
|
@ -72,7 +72,7 @@ public void testDialectSQLFunctions() throws Exception {
|
|||||||
simple.setCount(2);
|
simple.setCount(2);
|
||||||
s.save( simple );
|
s.save( simple );
|
||||||
|
|
||||||
// Test to make sure allocating an specified object operates correctly.
|
// Test to make sure allocating a specified object operates correctly.
|
||||||
assertTrue(
|
assertTrue(
|
||||||
s.createQuery( "select new org.hibernate.test.legacy.S(s.count, s.address) from Simple s" ).list().size() == 1
|
s.createQuery( "select new org.hibernate.test.legacy.S(s.count, s.address) from Simple s" ).list().size() == 1
|
||||||
);
|
);
|
||||||
|
@ -1767,7 +1767,7 @@ public void testNamedParams() throws Exception {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
q.setParameterList("nameList", (Collection)null);
|
q.setParameterList("nameList", (Collection)null);
|
||||||
fail("Should throw an queryexception when passing a null!");
|
fail("Should throw a QueryException when passing a null!");
|
||||||
}
|
}
|
||||||
catch (IllegalArgumentException qe) {
|
catch (IllegalArgumentException qe) {
|
||||||
//should happen
|
//should happen
|
||||||
|
@ -69,7 +69,7 @@ public void testDialectSQLFunctions() throws Exception {
|
|||||||
simple.setCount(2);
|
simple.setCount(2);
|
||||||
s.save( simple );
|
s.save( simple );
|
||||||
|
|
||||||
// Test to make sure allocating an specified object operates correctly.
|
// Test to make sure allocating a specified object operates correctly.
|
||||||
assertTrue(
|
assertTrue(
|
||||||
s.createQuery( "select new org.hibernate.test.legacy.S(s.count, s.address) from Simple s" ).list().size() == 1
|
s.createQuery( "select new org.hibernate.test.legacy.S(s.count, s.address) from Simple s" ).list().size() == 1
|
||||||
);
|
);
|
||||||
|
@ -46,7 +46,7 @@ public class EhcacheTransactionalDataRegion extends EhcacheDataRegion implements
|
|||||||
private final CacheLockProvider lockProvider;
|
private final CacheLockProvider lockProvider;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct an transactional Hibernate cache region around the given Ehcache instance.
|
* Construct a transactional Hibernate cache region around the given Ehcache instance.
|
||||||
*/
|
*/
|
||||||
EhcacheTransactionalDataRegion(
|
EhcacheTransactionalDataRegion(
|
||||||
EhcacheAccessStrategyFactory accessStrategyFactory, Ehcache cache, SessionFactoryOptions settings,
|
EhcacheAccessStrategyFactory accessStrategyFactory, Ehcache cache, SessionFactoryOptions settings,
|
||||||
|
@ -113,7 +113,7 @@ public static long getLongBeanProperty(final Object bean, final String propertyN
|
|||||||
throw new NoSuchFieldException( propertyName );
|
throw new NoSuchFieldException( propertyName );
|
||||||
}
|
}
|
||||||
else if ( !(o instanceof Number) ) {
|
else if ( !(o instanceof Number) ) {
|
||||||
throw new IllegalArgumentException( propertyName + " not an Number" );
|
throw new IllegalArgumentException( propertyName + " not a Number" );
|
||||||
}
|
}
|
||||||
return ((Number) o).longValue();
|
return ((Number) o).longValue();
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entity with an List of Embeddable Components that have ManyToOne relationships
|
* Entity with a List of Embeddable Components that have ManyToOne relationships
|
||||||
*
|
*
|
||||||
* @author Cankut Guven
|
* @author Cankut Guven
|
||||||
*/
|
*/
|
||||||
|
@ -62,11 +62,11 @@ public interface SpatialDialect extends Serializable {
|
|||||||
public String getDWithinSQL(String columnName);
|
public String getDWithinSQL(String columnName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the SQL fragment when parsing an <code>HavingSridExpression</code>.
|
* Returns the SQL fragment when parsing a <code>HavingSridExpression</code>.
|
||||||
*
|
*
|
||||||
* @param columnName The geometry column to test against
|
* @param columnName The geometry column to test against
|
||||||
*
|
*
|
||||||
* @return The SQL fragment for an <code>HavingSridExpression</code>.
|
* @return The SQL fragment for a <code>HavingSridExpression</code>.
|
||||||
*/
|
*/
|
||||||
public String getHavingSridSQL(String columnName);
|
public String getHavingSridSQL(String columnName);
|
||||||
|
|
||||||
|
@ -277,11 +277,11 @@ public String getDWithinSQL(String columnName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the SQL fragment when parsing an <code>HavingSridExpression</code>.
|
* Returns the SQL fragment when parsing a <code>HavingSridExpression</code>.
|
||||||
*
|
*
|
||||||
* @param columnName The geometry column to test against
|
* @param columnName The geometry column to test against
|
||||||
*
|
*
|
||||||
* @return The SQL fragment for an <code>HavingSridExpression</code>.
|
* @return The SQL fragment for a <code>HavingSridExpression</code>.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getHavingSridSQL(String columnName) {
|
public String getHavingSridSQL(String columnName) {
|
||||||
|
@ -107,11 +107,11 @@ public String getDWithinSQL(String columnName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the SQL fragment when parsing an <code>HavingSridExpression</code>.
|
* Returns the SQL fragment when parsing a <code>HavingSridExpression</code>.
|
||||||
*
|
*
|
||||||
* @param columnName The geometry column to test against
|
* @param columnName The geometry column to test against
|
||||||
*
|
*
|
||||||
* @return The SQL fragment for an <code>HavingSridExpression</code>.
|
* @return The SQL fragment for a <code>HavingSridExpression</code>.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getHavingSridSQL(String columnName) {
|
public String getHavingSridSQL(String columnName) {
|
||||||
|
@ -107,11 +107,11 @@ public String getDWithinSQL(String columnName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the SQL fragment when parsing an <code>HavingSridExpression</code>.
|
* Returns the SQL fragment when parsing a <code>HavingSridExpression</code>.
|
||||||
*
|
*
|
||||||
* @param columnName The geometry column to test against
|
* @param columnName The geometry column to test against
|
||||||
*
|
*
|
||||||
* @return The SQL fragment for an <code>HavingSridExpression</code>.
|
* @return The SQL fragment for a <code>HavingSridExpression</code>.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getHavingSridSQL(String columnName) {
|
public String getHavingSridSQL(String columnName) {
|
||||||
|
@ -107,11 +107,11 @@ public String getDWithinSQL(String columnName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the SQL fragment when parsing an <code>HavingSridExpression</code>.
|
* Returns the SQL fragment when parsing a <code>HavingSridExpression</code>.
|
||||||
*
|
*
|
||||||
* @param columnName The geometry column to test against
|
* @param columnName The geometry column to test against
|
||||||
*
|
*
|
||||||
* @return The SQL fragment for an <code>HavingSridExpression</code>.
|
* @return The SQL fragment for a <code>HavingSridExpression</code>.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getHavingSridSQL(String columnName) {
|
public String getHavingSridSQL(String columnName) {
|
||||||
|
@ -107,11 +107,11 @@ public String getDWithinSQL(String columnName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the SQL fragment when parsing an <code>HavingSridExpression</code>.
|
* Returns the SQL fragment when parsing a <code>HavingSridExpression</code>.
|
||||||
*
|
*
|
||||||
* @param columnName The geometry column to test against
|
* @param columnName The geometry column to test against
|
||||||
*
|
*
|
||||||
* @return The SQL fragment for an <code>HavingSridExpression</code>.
|
* @return The SQL fragment for a <code>HavingSridExpression</code>.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getHavingSridSQL(String columnName) {
|
public String getHavingSridSQL(String columnName) {
|
||||||
|
@ -106,11 +106,11 @@ public String getDWithinSQL(String columnName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the SQL fragment when parsing an <code>HavingSridExpression</code>.
|
* Returns the SQL fragment when parsing a <code>HavingSridExpression</code>.
|
||||||
*
|
*
|
||||||
* @param columnName The geometry column to test against
|
* @param columnName The geometry column to test against
|
||||||
*
|
*
|
||||||
* @return The SQL fragment for an <code>HavingSridExpression</code>.
|
* @return The SQL fragment for a <code>HavingSridExpression</code>.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getHavingSridSQL(String columnName) {
|
public String getHavingSridSQL(String columnName) {
|
||||||
|
@ -107,11 +107,11 @@ public String getDWithinSQL(String columnName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the SQL fragment when parsing an <code>HavingSridExpression</code>.
|
* Returns the SQL fragment when parsing a <code>HavingSridExpression</code>.
|
||||||
*
|
*
|
||||||
* @param columnName The geometry column to test against
|
* @param columnName The geometry column to test against
|
||||||
*
|
*
|
||||||
* @return The SQL fragment for an <code>HavingSridExpression</code>.
|
* @return The SQL fragment for a <code>HavingSridExpression</code>.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getHavingSridSQL(String columnName) {
|
public String getHavingSridSQL(String columnName) {
|
||||||
|
@ -125,11 +125,11 @@ public String getDWithinSQL(String columnName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the SQL fragment when parsing an <code>HavingSridExpression</code>.
|
* Returns the SQL fragment when parsing a <code>HavingSridExpression</code>.
|
||||||
*
|
*
|
||||||
* @param columnName The geometry column to test against
|
* @param columnName The geometry column to test against
|
||||||
*
|
*
|
||||||
* @return The SQL fragment for an <code>HavingSridExpression</code>.
|
* @return The SQL fragment for a <code>HavingSridExpression</code>.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getHavingSridSQL(String columnName) {
|
public String getHavingSridSQL(String columnName) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user