spaces to tabs!

This commit is contained in:
Gavin King 2024-09-16 10:54:40 +02:00
parent 27db2668b4
commit bbc325c26f
1040 changed files with 31203 additions and 31207 deletions

View File

@ -1349,7 +1349,7 @@ public class PostgreSQLLegacyDialect extends Dialect {
tableTypesList.add( "MATERIALIZED VIEW" ); tableTypesList.add( "MATERIALIZED VIEW" );
/* /*
PostgreSQL 10 and later adds support for Partition table. PostgreSQL 10 and later adds support for Partition table.
*/ */
if ( getVersion().isSameOrAfter( 10 ) ) { if ( getVersion().isSameOrAfter( 10 ) ) {
tableTypesList.add( "PARTITIONED TABLE" ); tableTypesList.add( "PARTITIONED TABLE" );

View File

@ -201,7 +201,7 @@ public class TeradataDialect extends Dialect {
@Override @Override
public long getFractionalSecondPrecisionInNanos() { public long getFractionalSecondPrecisionInNanos() {
// Do duration arithmetic in a seconds, but // Do duration arithmetic in a seconds, but
// with the fractional part // with the fractional part
return 1_000_000_000; //seconds!! return 1_000_000_000; //seconds!!
} }

View File

@ -46,22 +46,22 @@ public class AltibaseDialectTestCase extends BaseUnitTestCase {
@Test @Test
public void testSelectWithLimitOnly() { public void testSelectWithLimitOnly() {
assertEquals( "select c1, c2 from t1 order by c1, c2 desc limit ?", assertEquals( "select c1, c2 from t1 order by c1, c2 desc limit ?",
dialect.getLimitHandler().processSql("select c1, c2 from t1 order by c1, c2 desc", dialect.getLimitHandler().processSql("select c1, c2 from t1 order by c1, c2 desc",
toRowSelection( 0, 15 ) ).toLowerCase( Locale.ROOT)); toRowSelection( 0, 15 ) ).toLowerCase( Locale.ROOT));
} }
@Test @Test
public void testSelectWithOffsetLimit() { public void testSelectWithOffsetLimit() {
assertEquals( "select c1, c2 from t1 order by c1, c2 desc limit 1+?,?", assertEquals( "select c1, c2 from t1 order by c1, c2 desc limit 1+?,?",
dialect.getLimitHandler().processSql("select c1, c2 from t1 order by c1, c2 desc", dialect.getLimitHandler().processSql("select c1, c2 from t1 order by c1, c2 desc",
toRowSelection( 5, 15 ) ).toLowerCase(Locale.ROOT)); toRowSelection( 5, 15 ) ).toLowerCase(Locale.ROOT));
} }
@Test @Test
public void testSelectWithNoLimit() { public void testSelectWithNoLimit() {
assertEquals( "select c1, c2 from t1 order by c1, c2 desc", assertEquals( "select c1, c2 from t1 order by c1, c2 desc",
dialect.getLimitHandler().processSql("select c1, c2 from t1 order by c1, c2 desc", dialect.getLimitHandler().processSql("select c1, c2 from t1 order by c1, c2 desc",
null ).toLowerCase(Locale.ROOT)); null ).toLowerCase(Locale.ROOT));
} }
private Limit toRowSelection(int firstRow, int maxRows) { private Limit toRowSelection(int firstRow, int maxRows) {

View File

@ -135,9 +135,9 @@ public class SQLServer2008DialectTestCase extends BaseUnitTestCase {
public void testPagingWithColumnNameStartingWithFrom() { public void testPagingWithColumnNameStartingWithFrom() {
final String sql = "select column1 c1, from_column c2 from table1"; final String sql = "select column1 c1, from_column c2 from table1";
assertEquals( "with query_ as (select row_.*,row_number() over (order by current_timestamp) as rownumber_ from (" + assertEquals( "with query_ as (select row_.*,row_number() over (order by current_timestamp) as rownumber_ from (" +
"select column1 c1, from_column c2 from table1) row_) " + "select column1 c1, from_column c2 from table1) row_) " +
"select c1,c2 from query_ where rownumber_>=? and rownumber_<?", "select c1,c2 from query_ where rownumber_>=? and rownumber_<?",
dialect.getLimitHandler().processSql(sql, toRowSelection(3, 5))); dialect.getLimitHandler().processSql(sql, toRowSelection(3, 5)));
} }
@Test @Test
@ -345,9 +345,9 @@ public class SQLServer2008DialectTestCase extends BaseUnitTestCase {
final String query = "select [Created From Nonstock Item], field2 from table1"; final String query = "select [Created From Nonstock Item], field2 from table1";
assertEquals( "with query_ as (select row_.*,row_number() over (order by current_timestamp) as rownumber_ from (" + assertEquals( "with query_ as (select row_.*,row_number() over (order by current_timestamp) as rownumber_ from (" +
"select [Created From Nonstock Item] as col0_, field2 as col1_ from table1) row_) " + "select [Created From Nonstock Item] as col0_, field2 as col1_ from table1) row_) " +
"select col0_,col1_ from query_ where rownumber_>=? and rownumber_<?", "select col0_,col1_ from query_ where rownumber_>=? and rownumber_<?",
dialect.getLimitHandler().processSql( query, toRowSelection( 1, 5 ) ) dialect.getLimitHandler().processSql( query, toRowSelection( 1, 5 ) )
); );
} }
@ -357,9 +357,9 @@ public class SQLServer2008DialectTestCase extends BaseUnitTestCase {
final String query = "select [Created From Item] c1, field2 from table1"; final String query = "select [Created From Item] c1, field2 from table1";
assertEquals( "with query_ as (select row_.*,row_number() over (order by current_timestamp) as rownumber_ from (" + assertEquals( "with query_ as (select row_.*,row_number() over (order by current_timestamp) as rownumber_ from (" +
"select [Created From Item] c1, field2 as col0_ from table1) row_) " + "select [Created From Item] c1, field2 as col0_ from table1) row_) " +
"select c1,col0_ from query_ where rownumber_>=? and rownumber_<?", "select c1,col0_ from query_ where rownumber_>=? and rownumber_<?",
dialect.getLimitHandler().processSql( query, toRowSelection( 1, 5 ) ) dialect.getLimitHandler().processSql( query, toRowSelection( 1, 5 ) )
); );
} }
@ -369,9 +369,9 @@ public class SQLServer2008DialectTestCase extends BaseUnitTestCase {
final String query = "select [Created From Item] as c1, field2 from table1"; final String query = "select [Created From Item] as c1, field2 from table1";
assertEquals( "with query_ as (select row_.*,row_number() over (order by current_timestamp) as rownumber_ from (" + assertEquals( "with query_ as (select row_.*,row_number() over (order by current_timestamp) as rownumber_ from (" +
"select [Created From Item] as c1, field2 as col0_ from table1) row_) " + "select [Created From Item] as c1, field2 as col0_ from table1) row_) " +
"select c1,col0_ from query_ where rownumber_>=? and rownumber_<?", "select c1,col0_ from query_ where rownumber_>=? and rownumber_<?",
dialect.getLimitHandler().processSql( query, toRowSelection( 1, 5 ) ) dialect.getLimitHandler().processSql( query, toRowSelection( 1, 5 ) )
); );
} }

View File

@ -111,7 +111,7 @@ public class SQLFunctionsInterSystemsTest extends BaseCoreFunctionalTestCase {
.get(0); .get(0);
assertTrue( 0 == value.intValue() ); assertTrue( 0 == value.intValue() );
s.remove(simple); s.remove(simple);
t.commit(); t.commit();
s.close(); s.close();
} }
@ -480,8 +480,8 @@ public class SQLFunctionsInterSystemsTest extends BaseCoreFunctionalTestCase {
s.flush(); s.flush();
s.refresh(b); s.refresh(b);
//b.getBlob().setBytes( 2, "abc".getBytes() ); //b.getBlob().setBytes( 2, "abc".getBytes() );
log.debug("levinson: just bfore b.getClob()"); log.debug("levinson: just bfore b.getClob()");
b.getClob().getSubString(2, 3); b.getClob().getSubString(2, 3);
//b.getClob().setString(2, "abc"); //b.getClob().setString(2, "abc");
s.flush(); s.flush();
s.getTransaction().commit(); s.getTransaction().commit();
@ -522,11 +522,11 @@ public class SQLFunctionsInterSystemsTest extends BaseCoreFunctionalTestCase {
public void testSqlFunctionAsAlias() { public void testSqlFunctionAsAlias() {
String functionName = locateAppropriateDialectFunctionNameForAliasTest(); String functionName = locateAppropriateDialectFunctionNameForAliasTest();
if (functionName == null) { if (functionName == null) {
log.info("Dialect does not list any no-arg functions"); log.info("Dialect does not list any no-arg functions");
return; return;
} }
log.info("Using function named [" + functionName + "] for 'function as alias' test"); log.info("Using function named [" + functionName + "] for 'function as alias' test");
String query = "select " + functionName + " from Simple as " + functionName + " where " + functionName + ".id = 10"; String query = "select " + functionName + " from Simple as " + functionName + " where " + functionName + ".id = 10";
Session s = openSession(); Session s = openSession();
@ -614,18 +614,18 @@ public class SQLFunctionsInterSystemsTest extends BaseCoreFunctionalTestCase {
} }
public void testInterSystemsFunctions() throws Exception { public void testInterSystemsFunctions() throws Exception {
Calendar cal = new GregorianCalendar(); Calendar cal = new GregorianCalendar();
cal.set(1977,6,3,0,0,0); cal.set(1977,6,3,0,0,0);
java.sql.Timestamp testvalue = new java.sql.Timestamp(cal.getTimeInMillis()); java.sql.Timestamp testvalue = new java.sql.Timestamp(cal.getTimeInMillis());
testvalue.setNanos(0); testvalue.setNanos(0);
Calendar cal3 = new GregorianCalendar(); Calendar cal3 = new GregorianCalendar();
cal3.set(1976,2,3,0,0,0); cal3.set(1976,2,3,0,0,0);
java.sql.Timestamp testvalue3 = new java.sql.Timestamp(cal3.getTimeInMillis()); java.sql.Timestamp testvalue3 = new java.sql.Timestamp(cal3.getTimeInMillis());
testvalue3.setNanos(0); testvalue3.setNanos(0);
final Session s = openSession(); final Session s = openSession();
s.beginTransaction(); s.beginTransaction();
try { try {
s.doWork( s.doWork(
new Work() { new Work() {
@Override @Override
@ -635,14 +635,14 @@ public class SQLFunctionsInterSystemsTest extends BaseCoreFunctionalTestCase {
} }
} }
); );
} }
catch (Exception ex) { catch (Exception ex) {
System.out.println("as we expected stored procedure sp does not exist when we drop it"); System.out.println("as we expected stored procedure sp does not exist when we drop it");
} }
s.getTransaction().commit(); s.getTransaction().commit();
s.beginTransaction(); s.beginTransaction();
s.doWork( s.doWork(
new Work() { new Work() {
@Override @Override
@ -668,82 +668,82 @@ public class SQLFunctionsInterSystemsTest extends BaseCoreFunctionalTestCase {
} }
} }
); );
s.getTransaction().commit(); s.getTransaction().commit();
s.beginTransaction(); s.beginTransaction();
TestInterSystemsFunctionsClass object = new TestInterSystemsFunctionsClass( Long.valueOf( 10 ) ); TestInterSystemsFunctionsClass object = new TestInterSystemsFunctionsClass( Long.valueOf( 10 ) );
object.setDateText( "1977-07-03" ); object.setDateText( "1977-07-03" );
object.setDate1( testvalue ); object.setDate1( testvalue );
object.setDate3( testvalue3 ); object.setDate3( testvalue3 );
s.persist( object ); s.persist( object );
s.getTransaction().commit(); s.getTransaction().commit();
s.close(); s.close();
Session s2 = openSession(); Session s2 = openSession();
s2.beginTransaction(); s2.beginTransaction();
TestInterSystemsFunctionsClass test = s2.get(TestInterSystemsFunctionsClass.class, 10L ); TestInterSystemsFunctionsClass test = s2.get(TestInterSystemsFunctionsClass.class, 10L );
assertTrue( test.getDate1().equals(testvalue)); assertTrue( test.getDate1().equals(testvalue));
test = (TestInterSystemsFunctionsClass) s2.byId( TestInterSystemsFunctionsClass.class ).with( LockOptions.NONE ).load( 10L ); test = (TestInterSystemsFunctionsClass) s2.byId( TestInterSystemsFunctionsClass.class ).with( LockOptions.NONE ).load( 10L );
assertTrue( test.getDate1().equals(testvalue)); assertTrue( test.getDate1().equals(testvalue));
Date value = (Date) s2.createQuery( "select nvl(o.date,o.dateText) from TestInterSystemsFunctionsClass as o" ) Date value = (Date) s2.createQuery( "select nvl(o.date,o.dateText) from TestInterSystemsFunctionsClass as o" )
.list() .list()
.get(0); .get(0);
assertTrue( value.equals(testvalue)); assertTrue( value.equals(testvalue));
Object nv = s2.createQuery( "select nullif(o.dateText,o.dateText) from TestInterSystemsFunctionsClass as o" ) Object nv = s2.createQuery( "select nullif(o.dateText,o.dateText) from TestInterSystemsFunctionsClass as o" )
.list() .list()
.get(0); .get(0);
assertTrue( nv == null); assertTrue( nv == null);
String dateText = (String) s2.createQuery( String dateText = (String) s2.createQuery(
"select nvl(o.dateText,o.date) from TestInterSystemsFunctionsClass as o" "select nvl(o.dateText,o.date) from TestInterSystemsFunctionsClass as o"
).list() ).list()
.get(0); .get(0);
assertTrue( dateText.equals("1977-07-03")); assertTrue( dateText.equals("1977-07-03"));
value = (Date) s2.createQuery( "select ifnull(o.date,o.date1) from TestInterSystemsFunctionsClass as o" ) value = (Date) s2.createQuery( "select ifnull(o.date,o.date1) from TestInterSystemsFunctionsClass as o" )
.list() .list()
.get(0); .get(0);
assertTrue( value.equals(testvalue)); assertTrue( value.equals(testvalue));
value = (Date) s2.createQuery( "select ifnull(o.date3,o.date,o.date1) from TestInterSystemsFunctionsClass as o" ) value = (Date) s2.createQuery( "select ifnull(o.date3,o.date,o.date1) from TestInterSystemsFunctionsClass as o" )
.list() .list()
.get(0); .get(0);
assertTrue( value.equals(testvalue)); assertTrue( value.equals(testvalue));
Integer pos = (Integer) s2.createQuery( Integer pos = (Integer) s2.createQuery(
"select position('07', o.dateText) from TestInterSystemsFunctionsClass as o" "select position('07', o.dateText) from TestInterSystemsFunctionsClass as o"
).list() ).list()
.get(0); .get(0);
assertTrue(pos.intValue() == 6); assertTrue(pos.intValue() == 6);
String st = (String) s2.createQuery( "select convert(o.date1, SQL_TIME) from TestInterSystemsFunctionsClass as o" ) String st = (String) s2.createQuery( "select convert(o.date1, SQL_TIME) from TestInterSystemsFunctionsClass as o" )
.list() .list()
.get(0); .get(0);
assertTrue( st.equals("00:00:00")); assertTrue( st.equals("00:00:00"));
java.sql.Time tm = (java.sql.Time) s2.createQuery( java.sql.Time tm = (java.sql.Time) s2.createQuery(
"select cast(o.date1, time) from TestInterSystemsFunctionsClass as o" "select cast(o.date1, time) from TestInterSystemsFunctionsClass as o"
).list() ).list()
.get(0); .get(0);
assertTrue( tm.toString().equals("00:00:00")); assertTrue( tm.toString().equals("00:00:00"));
Double diff = (Double) s2.createQuery( Double diff = (Double) s2.createQuery(
"select timestampdiff(SQL_TSI_FRAC_SECOND, o.date3, o.date1) from TestInterSystemsFunctionsClass as o" "select timestampdiff(SQL_TSI_FRAC_SECOND, o.date3, o.date1) from TestInterSystemsFunctionsClass as o"
).list() ).list()
.get(0); .get(0);
assertTrue(diff.doubleValue() != 0.0); assertTrue(diff.doubleValue() != 0.0);
diff = (Double) s2.createQuery( diff = (Double) s2.createQuery(
"select timestampdiff(SQL_TSI_MONTH, o.date3, o.date1) from TestInterSystemsFunctionsClass as o" "select timestampdiff(SQL_TSI_MONTH, o.date3, o.date1) from TestInterSystemsFunctionsClass as o"
).list() ).list()
.get(0); .get(0);
assertTrue(diff.doubleValue() == 16.0); assertTrue(diff.doubleValue() == 16.0);
diff = (Double) s2.createQuery( diff = (Double) s2.createQuery(
"select timestampdiff(SQL_TSI_WEEK, o.date3, o.date1) from TestInterSystemsFunctionsClass as o" "select timestampdiff(SQL_TSI_WEEK, o.date3, o.date1) from TestInterSystemsFunctionsClass as o"
).list() ).list()
.get(0); .get(0);
assertTrue(diff.doubleValue() >= 16*4); assertTrue(diff.doubleValue() >= 16*4);
diff = (Double) s2.createQuery( diff = (Double) s2.createQuery(
"select timestampdiff(SQL_TSI_YEAR, o.date3, o.date1) from TestInterSystemsFunctionsClass as o" "select timestampdiff(SQL_TSI_YEAR, o.date3, o.date1) from TestInterSystemsFunctionsClass as o"
).list() ).list()
.get(0); .get(0);
assertTrue(diff.doubleValue() == 1.0); assertTrue(diff.doubleValue() == 1.0);
s2.getTransaction().commit(); s2.getTransaction().commit();
s2.close(); s2.close();
} }
} }

View File

@ -14,10 +14,10 @@ import java.util.Date;
*/ */
public class TestInterSystemsFunctionsClass { public class TestInterSystemsFunctionsClass {
private Long id; private Long id;
private Date date3; private Date date3;
private Date date1; private Date date1;
private Date date; private Date date;
private String dateText; private String dateText;
public TestInterSystemsFunctionsClass() { public TestInterSystemsFunctionsClass() {
} }
@ -35,38 +35,38 @@ public class TestInterSystemsFunctionsClass {
} }
public Date getDate() { public Date getDate() {
return date; return date;
} }
public void setDate(Date date) { public void setDate(Date date) {
this.date = date; this.date = date;
} }
public String getDateText() { public String getDateText() {
return dateText; return dateText;
} }
public void setDateText(String dateText) { public void setDateText(String dateText) {
this.dateText = dateText; this.dateText = dateText;
} }
public Date getDate1() { public Date getDate1() {
return date1; return date1;
} }
public void setDate1(Date date1) { public void setDate1(Date date1) {
this.date1 = date1; this.date1 = date1;
} }
public Date getDate3() { public Date getDate3() {
return date3; return date3;
} }
public void setDate3(Date date3) { public void setDate3(Date date3) {
this.date3 = date3; this.date3 = date3;
} }
} }

View File

@ -365,8 +365,8 @@ public final class Hibernate {
} }
} }
/** /**
* If the given object is not a proxy, return it. But, if it is a proxy, ensure * If the given object is not a proxy, return it. But, if it is a proxy, ensure
* that the proxy is initialized, and return a direct reference to its proxied * that the proxy is initialized, and return a direct reference to its proxied
* entity object. * entity object.
* *
@ -375,7 +375,7 @@ public final class Hibernate {
* *
* @throws LazyInitializationException if this operation is called on an * @throws LazyInitializationException if this operation is called on an
* uninitialized proxy that is not associated with an open session. * uninitialized proxy that is not associated with an open session.
*/ */
public static Object unproxy(Object proxy) { public static Object unproxy(Object proxy) {
final LazyInitializer lazyInitializer = extractLazyInitializer( proxy ); final LazyInitializer lazyInitializer = extractLazyInitializer( proxy );
return lazyInitializer != null ? lazyInitializer.getImplementation() : proxy; return lazyInitializer != null ? lazyInitializer.getImplementation() : proxy;

View File

@ -24,7 +24,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Inherited @Inherited
@Retention(RUNTIME) @Retention(RUNTIME)
public @interface MapKeyJdbcType { public @interface MapKeyJdbcType {
/** /**
* The descriptor to use for the map-key column * The descriptor to use for the map-key column
* *
* @see org.hibernate.annotations.JdbcType#value * @see org.hibernate.annotations.JdbcType#value

View File

@ -24,7 +24,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Inherited @Inherited
@Retention(RUNTIME) @Retention(RUNTIME)
public @interface MapKeyJdbcTypeCode { public @interface MapKeyJdbcTypeCode {
/** /**
* The code for the descriptor to use for the map-key column * The code for the descriptor to use for the map-key column
* *
* @see JdbcTypeCode#value * @see JdbcTypeCode#value

View File

@ -29,7 +29,7 @@ public enum SourceType {
/** /**
* Indicates that values are generated by the database. * Indicates that values are generated by the database.
* <p> * <p>
* For a generated timestamp, the {@code current_timestamp} function * For a generated timestamp, the {@code current_timestamp} function
* might be the source. * might be the source.
*/ */
DB DB

View File

@ -1855,8 +1855,8 @@ public class EntityBinder {
} }
public void finalSecondaryTableBinding(PropertyHolder propertyHolder) { public void finalSecondaryTableBinding(PropertyHolder propertyHolder) {
// This operation has to be done after the id definition of the persistence class. // This operation has to be done after the id definition of the persistence class.
// ie after the properties parsing // ie after the properties parsing
final Iterator<Object> joinColumns = secondaryTableJoins.values().iterator(); final Iterator<Object> joinColumns = secondaryTableJoins.values().iterator();
for ( Map.Entry<String, Join> entrySet : secondaryTables.entrySet() ) { for ( Map.Entry<String, Join> entrySet : secondaryTables.entrySet() ) {
if ( !secondaryTablesFromAnnotation.containsKey( entrySet.getKey() ) ) { if ( !secondaryTablesFromAnnotation.containsKey( entrySet.getKey() ) ) {
@ -1866,8 +1866,8 @@ public class EntityBinder {
} }
public void finalSecondaryTableFromAnnotationBinding(PropertyHolder propertyHolder) { public void finalSecondaryTableFromAnnotationBinding(PropertyHolder propertyHolder) {
// This operation has to be done before the end of the FK second pass processing in order // This operation has to be done before the end of the FK second pass processing in order
// to find the join columns belonging to secondary tables // to find the join columns belonging to secondary tables
Iterator<Object> joinColumns = secondaryTableFromAnnotationJoins.values().iterator(); Iterator<Object> joinColumns = secondaryTableFromAnnotationJoins.values().iterator();
for ( Map.Entry<String, Join> entrySet : secondaryTables.entrySet() ) { for ( Map.Entry<String, Join> entrySet : secondaryTables.entrySet() ) {
if ( secondaryTablesFromAnnotation.containsKey( entrySet.getKey() ) ) { if ( secondaryTablesFromAnnotation.containsKey( entrySet.getKey() ) ) {

View File

@ -17,10 +17,10 @@ import org.hibernate.boot.model.source.spi.AttributePath;
*/ */
public interface ImplicitCollectionTableNameSource extends ImplicitNameSource { public interface ImplicitCollectionTableNameSource extends ImplicitNameSource {
/** /**
* Access to the physical name of the owning entity's table. * Access to the physical name of the owning entity's table.
* *
* @return Owning entity's table name. * @return Owning entity's table name.
*/ */
Identifier getOwningPhysicalTableName(); Identifier getOwningPhysicalTableName();
/** /**

View File

@ -7,7 +7,7 @@
package org.hibernate.bytecode.enhance.spi.interceptor; package org.hibernate.bytecode.enhance.spi.interceptor;
/** /**
* Information about a particular bytecode lazy attribute grouping. * Information about a particular bytecode lazy attribute grouping.
* *
* @author Steve Ebersole * @author Steve Ebersole
*/ */

View File

@ -118,9 +118,9 @@ public interface RegionFactory extends Service, Stoppable {
*/ */
QueryResultsRegion buildQueryResultsRegion(String regionName, SessionFactoryImplementor sessionFactory); QueryResultsRegion buildQueryResultsRegion(String regionName, SessionFactoryImplementor sessionFactory);
/** /**
* Create a named {@link Region} for holding timestamps used to * Create a named {@link Region} for holding timestamps used to
* determine when a cached query result set is stale. * determine when a cached query result set is stale.
*/ */
TimestampsRegion buildTimestampsRegion(String regionName, SessionFactoryImplementor sessionFactory); TimestampsRegion buildTimestampsRegion(String regionName, SessionFactoryImplementor sessionFactory);
} }

View File

@ -166,8 +166,8 @@ public final class Environment implements AvailableSettings {
try { try {
Properties systemProperties = System.getProperties(); Properties systemProperties = System.getProperties();
// Must be thread-safe in case an application changes System properties during Hibernate initialization. // Must be thread-safe in case an application changes System properties during Hibernate initialization.
// See HHH-8383. // See HHH-8383.
synchronized (systemProperties) { synchronized (systemProperties) {
GLOBAL_PROPERTIES.putAll(systemProperties); GLOBAL_PROPERTIES.putAll(systemProperties);
} }

View File

@ -285,10 +285,8 @@ public abstract class AbstractPersistentCollection<E> implements Serializable, P
} }
} }
else { else {
/* // Whenever the collection lazy loading is triggered during the loading process,
Whenever the collection lazy loading is triggered during the loading process, // closing the connection will cause an error when RowProcessingStateStandardImpl#next() will be called.
closing the connection will cause an error when RowProcessingStateStandardImpl#next() will be called.
*/
final PersistenceContext persistenceContext = session.getPersistenceContext(); final PersistenceContext persistenceContext = session.getPersistenceContext();
if ( !session.isTransactionInProgress() if ( !session.isTransactionInProgress()
&& ( !persistenceContext.hasLoadContext() && ( !persistenceContext.hasLoadContext()

View File

@ -1646,7 +1646,6 @@ public abstract class Dialect implements ConversionContext, TypeContributor, Fun
* <p> * <p>
* An implementation may set configuration properties from * An implementation may set configuration properties from
* {@link #initDefaultProperties()}, though it is discouraged. * {@link #initDefaultProperties()}, though it is discouraged.
the
* @return the Hibernate configuration properties * @return the Hibernate configuration properties
* *
* @see #initDefaultProperties() * @see #initDefaultProperties()

View File

@ -124,7 +124,7 @@ public class DialectDelegateWrapper extends Dialect {
} }
} }
/** /**
* Exposed so to allow code needing to know the implementation. * Exposed so to allow code needing to know the implementation.
* @return the wrapped Dialect * @return the wrapped Dialect
*/ */

View File

@ -343,11 +343,11 @@ public class H2Dialect extends Dialect {
} }
/** /**
* H2 requires a very special emulation, because {@code unnest} is pretty much useless, * H2 requires a very special emulation, because {@code unnest} is pretty much useless,
* due to <a href="https://github.com/h2database/h2database/issues/1815">issue 1815</a>. * due to <a href="https://github.com/h2database/h2database/issues/1815">issue 1815</a>.
* This emulation uses {@code array_get}, {@code array_length} and {@code system_range} functions to roughly achieve the same, * This emulation uses {@code array_get}, {@code array_length} and {@code system_range} functions to roughly achieve the same,
* but requires that {@code system_range} is fed with a "maximum array size". * but requires that {@code system_range} is fed with a "maximum array size".
*/ */
protected int getMaximumArraySize() { protected int getMaximumArraySize() {
return 1000; return 1000;
} }

View File

@ -12,9 +12,9 @@ import org.hibernate.LockMode;
import org.hibernate.LockOptions; import org.hibernate.LockOptions;
import org.hibernate.persister.entity.EntityPersister; import org.hibernate.persister.entity.EntityPersister;
/** /**
* A locking strategy where an optimistic lock is obtained via a select * A locking strategy where an optimistic lock is obtained via a select
* statement. * statement.
* <p> * <p>
* Differs from {@link PessimisticWriteSelectLockingStrategy} and * Differs from {@link PessimisticWriteSelectLockingStrategy} and
* {@link PessimisticReadSelectLockingStrategy} in throwing * {@link PessimisticReadSelectLockingStrategy} in throwing

View File

@ -120,7 +120,7 @@ public abstract class AbstractLimitHandler implements LimitHandler {
* Does this dialect require a one-based offset to be specified in the offset clause? * Does this dialect require a one-based offset to be specified in the offset clause?
* *
* @implNote The value passed into {@link AbstractLimitHandler#processSql(String, Limit)} * @implNote The value passed into {@link AbstractLimitHandler#processSql(String, Limit)}
* has a zero-based offset. Handlers which do not {@link #supportsVariableLimit} * has a zero-based offset. Handlers which do not {@link #supportsVariableLimit}
* should take care to perform any needed first-row-conversion calls prior to * should take care to perform any needed first-row-conversion calls prior to
* injecting the limit values into the SQL string. * injecting the limit values into the SQL string.
* *

View File

@ -24,7 +24,7 @@ public class SQLServer2012LimitHandler extends OffsetFetchLimitHandler {
// ORDER BY ... // ORDER BY ...
// [ // [
// OFFSET m {ROW|ROWS} // OFFSET m {ROW|ROWS}
// [FETCH {FIRST|NEXT} n {ROW|ROWS} ONLY] // [FETCH {FIRST|NEXT} n {ROW|ROWS} ONLY]
// ] // ]
public static final SQLServer2012LimitHandler INSTANCE = new SQLServer2012LimitHandler(); public static final SQLServer2012LimitHandler INSTANCE = new SQLServer2012LimitHandler();

View File

@ -134,14 +134,14 @@ public final class Collections {
} }
/** /**
* Initialize the role of the collection. * Initialize the role of the collection.
* *
* @param collection The collection to be updated by reachability. * @param collection The collection to be updated by reachability.
* @param type The type of the collection. * @param type The type of the collection.
* @param entity The owner of the collection. * @param entity The owner of the collection.
* @param session The session from which this request originates * @param session The session from which this request originates
*/ */
public static void processReachableCollection( public static void processReachableCollection(
PersistentCollection<?> collection, PersistentCollection<?> collection,
CollectionType type, CollectionType type,

View File

@ -226,8 +226,8 @@ public final class ManagedTypeHelper {
} }
} }
// Not using Consumer<SelfDirtinessTracker> because of JDK-8180450: // Not using Consumer<SelfDirtinessTracker> because of JDK-8180450:
// use a custom functional interface with explicit type. // use a custom functional interface with explicit type.
@FunctionalInterface @FunctionalInterface
public interface SelfDirtinessTrackerConsumer { public interface SelfDirtinessTrackerConsumer {
void accept(SelfDirtinessTracker tracker); void accept(SelfDirtinessTracker tracker);

View File

@ -74,22 +74,22 @@ public final class Nullability {
*/ */
if ( checkNullability ) { if ( checkNullability ) {
/* /*
* Algorithm * Algorithm
* Check for any level one nullability breaks * Check for any level one nullability breaks
* Look at non-null components to * Look at non-null components to
* recursively check next level of nullability breaks * recursively check next level of nullability breaks
* Look at Collections containing components to * Look at Collections containing components to
* recursively check next level of nullability breaks * recursively check next level of nullability breaks
* *
* *
* In the previous implementation, not-null stuffs where checked * In the previous implementation, not-null stuffs where checked
* filtering by level one only updatable * filtering by level one only updatable
* or insertable columns. So setting a subcomponent as update="false" * or insertable columns. So setting a subcomponent as update="false"
* has no effect on not-null check if the main component had good checkability * has no effect on not-null check if the main component had good checkability
* In this implementation, we keep this feature. * In this implementation, we keep this feature.
* However, I never see any documentation mentioning that, but it's for * However, I never see any documentation mentioning that, but it's for
* sure a limitation. * sure a limitation.
*/ */
final boolean[] nullability = persister.getPropertyNullability(); final boolean[] nullability = persister.getPropertyNullability();
final boolean[] checkability = checkType == NullabilityCheckType.CREATE final boolean[] checkability = checkType == NullabilityCheckType.CREATE

View File

@ -777,7 +777,7 @@ public class StatefulPersistenceContext implements PersistenceContext {
session.getFactory().getMappingMetamodel() session.getFactory().getMappingMetamodel()
.getEntityDescriptor( li.getEntityName() ); .getEntityDescriptor( li.getEntityName() );
final EntityKey key = session.generateEntityKey( li.getInternalIdentifier(), persister ); final EntityKey key = session.generateEntityKey( li.getInternalIdentifier(), persister );
// any earlier proxy takes precedence // any earlier proxy takes precedence
final Map<EntityKey, EntityHolderImpl> entityHolderMap = getOrInitializeEntitiesByKey(); final Map<EntityKey, EntityHolderImpl> entityHolderMap = getOrInitializeEntitiesByKey();
final EntityHolderImpl oldHolder = entityHolderMap.get( key ); final EntityHolderImpl oldHolder = entityHolderMap.get( key );
if ( oldHolder != null ) { if ( oldHolder != null ) {
@ -1463,7 +1463,7 @@ public class StatefulPersistenceContext implements PersistenceContext {
final EntityPersister persister = mappingMetamodel.getEntityDescriptor( entityName ); final EntityPersister persister = mappingMetamodel.getEntityDescriptor( entityName );
final CollectionPersister collectionPersister = mappingMetamodel.getCollectionDescriptor( collectionRole ); final CollectionPersister collectionPersister = mappingMetamodel.getCollectionDescriptor( collectionRole );
// try cache lookup first // try cache lookup first
final Object parent = getParentsByChild( childEntity ); final Object parent = getParentsByChild( childEntity );
if ( parent != null ) { if ( parent != null ) {
final EntityEntry entityEntry = entityEntryContext.getEntityEntry( parent ); final EntityEntry entityEntry = entityEntryContext.getEntityEntry( parent );

View File

@ -33,8 +33,8 @@ import org.hibernate.type.descriptor.java.DataHelper;
*/ */
@Internal @Internal
public final class BlobProxy implements Blob, BlobImplementer { public final class BlobProxy implements Blob, BlobImplementer {
// In previous versions this used to be implemented by using a java.lang.reflect.Proxy to deal with // In previous versions this used to be implemented by using a java.lang.reflect.Proxy to deal with
// incompatibilities across various JDBC versions, hence the class name, but using a real Proxy is // incompatibilities across various JDBC versions, hence the class name, but using a real Proxy is
// no longer necessary. The class name could be updated to reflect this but that would break APIs. // no longer necessary. The class name could be updated to reflect this but that would break APIs.
private final BinaryStream binaryStream; private final BinaryStream binaryStream;

View File

@ -136,7 +136,7 @@ public interface JdbcCoordinator extends Serializable, TransactionCoordinatorOwn
*/ */
void cancelLastQuery(); void cancelLastQuery();
/** /**
* Calculate the amount of time, in seconds, still remaining before transaction timeout occurs. * Calculate the amount of time, in seconds, still remaining before transaction timeout occurs.
* *
* @return The number of seconds remaining until a transaction timeout occurs. A negative value indicates * @return The number of seconds remaining until a transaction timeout occurs. A negative value indicates

View File

@ -242,7 +242,7 @@ public interface SharedSessionContractImplementor
* This method is primarily for internal or integrator use. * This method is primarily for internal or integrator use.
* *
* @return the {@link Transaction} * @return the {@link Transaction}
*/ */
Transaction accessTransaction(); Transaction accessTransaction();
/** /**

View File

@ -19,21 +19,21 @@ public abstract class AbstractEvent implements Serializable {
private final EventSource session; private final EventSource session;
/** /**
* Constructs an event from the given event session. * Constructs an event from the given event session.
* *
* @param source The session event source. * @param source The session event source.
*/ */
public AbstractEvent(EventSource source) { public AbstractEvent(EventSource source) {
this.session = source; this.session = source;
} }
/** /**
* Returns the session event source for this event. This is the underlying * Returns the session event source for this event. This is the underlying
* session from which this event was generated. * session from which this event was generated.
* *
* @return The session event source. * @return The session event source.
*/ */
public final EventSource getSession() { public final EventSource getSession() {
return session; return session;
} }

View File

@ -55,10 +55,10 @@ public class DeleteEvent extends AbstractEvent {
} }
/** /**
* Returns the encapsulated entity to be deleted. * Returns the encapsulated entity to be deleted.
* *
* @return The entity to be deleted. * @return The entity to be deleted.
*/ */
public Object getObject() { public Object getObject() {
return object; return object;
} }

View File

@ -16,11 +16,11 @@ import org.hibernate.HibernateException;
*/ */
public interface DeleteEventListener { public interface DeleteEventListener {
/** /**
* Handle the given delete event. * Handle the given delete event.
* *
* @param event The delete event to be handled. * @param event The delete event to be handled.
*/ */
void onDelete(DeleteEvent event) throws HibernateException; void onDelete(DeleteEvent event) throws HibernateException;
void onDelete(DeleteEvent event, DeleteContext transientEntities) throws HibernateException; void onDelete(DeleteEvent event, DeleteContext transientEntities) throws HibernateException;

View File

@ -14,10 +14,10 @@ import org.hibernate.HibernateException;
* @author Steve Ebersole * @author Steve Ebersole
*/ */
public interface FlushEventListener { public interface FlushEventListener {
/** /**
* Handle the given flush event. * Handle the given flush event.
* *
* @param event The flush event to be handled. * @param event The flush event to be handled.
*/ */
void onFlush(FlushEvent event) throws HibernateException; void onFlush(FlushEvent event) throws HibernateException;
} }

View File

@ -90,8 +90,8 @@ public class MergeContext implements Map<Object,Object> {
// TODO: merge mergeEntityToOperatedOnFlagMap into mergeToManagedEntityXref, since they have the same key. // TODO: merge mergeEntityToOperatedOnFlagMap into mergeToManagedEntityXref, since they have the same key.
// need to check if this would hurt performance. // need to check if this would hurt performance.
private final Map<Object,Boolean> mergeEntityToOperatedOnFlagMap = new IdentityHashMap<>( 10 ); private final Map<Object,Boolean> mergeEntityToOperatedOnFlagMap = new IdentityHashMap<>( 10 );
// key is a merge entity; // key is a merge entity;
// value is a flag indicating if the merge entity is currently in the merge process. // value is a flag indicating if the merge entity is currently in the merge process.
public MergeContext(EventSource session, EntityCopyObserver entityCopyObserver){ public MergeContext(EventSource session, EntityCopyObserver entityCopyObserver){
this.session = session; this.session = session;

View File

@ -25,7 +25,7 @@ public class PreUpdateEvent extends AbstractPreDatabaseOperationEvent {
* @param id The id of the entity to use for updating. * @param id The id of the entity to use for updating.
* @param state The state to be updated. * @param state The state to be updated.
* @param oldState The state of the entity at the time it was loaded from * @param oldState The state of the entity at the time it was loaded from
* the database. * the database.
* @param persister The entity's persister. * @param persister The entity's persister.
* @param source The session from which the event originated. * @param source The session from which the event originated.
*/ */

View File

@ -16,11 +16,11 @@ import org.hibernate.HibernateException;
*/ */
public interface RefreshEventListener { public interface RefreshEventListener {
/** /**
* Handle the given refresh event. * Handle the given refresh event.
* *
* @param event The refresh event to be handled. * @param event The refresh event to be handled.
*/ */
void onRefresh(RefreshEvent event) throws HibernateException; void onRefresh(RefreshEvent event) throws HibernateException;
void onRefresh(RefreshEvent event, RefreshContext refreshedAlready) throws HibernateException; void onRefresh(RefreshEvent event, RefreshContext refreshedAlready) throws HibernateException;

View File

@ -77,7 +77,7 @@ public final class BytesHelper {
* *
* @param longValue The long to interpret to binary * @param longValue The long to interpret to binary
* @param dest the destination array. * @param dest the destination array.
* @param destPos starting position in the destination array. * @param destPos starting position in the destination array.
*/ */
public static void fromLong(long longValue, byte[] dest, int destPos) { public static void fromLong(long longValue, byte[] dest, int destPos) {

View File

@ -1065,41 +1065,41 @@ public class BoundedConcurrentHashMap<K, V> extends AbstractMap<K, V>
*/ */
static final class Segment<K, V> extends ReentrantLock { static final class Segment<K, V> extends ReentrantLock {
/* /*
* Segments maintain a table of entry lists that are ALWAYS * Segments maintain a table of entry lists that are ALWAYS
* kept in a consistent state, so can be read without locking. * kept in a consistent state, so can be read without locking.
* Next fields of nodes are immutable (final). All list * Next fields of nodes are immutable (final). All list
* additions are performed at the front of each bin. This * additions are performed at the front of each bin. This
* makes it easy to check changes, and also fast to traverse. * makes it easy to check changes, and also fast to traverse.
* When nodes would otherwise be changed, new nodes are * When nodes would otherwise be changed, new nodes are
* created to replace them. This works well for hash tables * created to replace them. This works well for hash tables
* since the bin lists tend to be short. (The average length * since the bin lists tend to be short. (The average length
* is less than two for the default load factor threshold.) * is less than two for the default load factor threshold.)
* *
* Read operations can thus proceed without locking, but rely * Read operations can thus proceed without locking, but rely
* on selected uses of volatiles to ensure that completed * on selected uses of volatiles to ensure that completed
* write operations performed by other threads are * write operations performed by other threads are
* noticed. For most purposes, the "count" field, tracking the * noticed. For most purposes, the "count" field, tracking the
* number of elements, serves as that volatile variable * number of elements, serves as that volatile variable
* ensuring visibility. This is convenient because this field * ensuring visibility. This is convenient because this field
* needs to be read in many read operations anyway: * needs to be read in many read operations anyway:
* *
* - All (unsynchronized) read operations must first read the * - All (unsynchronized) read operations must first read the
* "count" field, and should not look at table entries if * "count" field, and should not look at table entries if
* it is 0. * it is 0.
* *
* - All (synchronized) write operations should write to * - All (synchronized) write operations should write to
* the "count" field after structurally changing any bin. * the "count" field after structurally changing any bin.
* The operations must not take any action that could even * The operations must not take any action that could even
* momentarily cause a concurrent read operation to see * momentarily cause a concurrent read operation to see
* inconsistent data. This is made easier by the nature of * inconsistent data. This is made easier by the nature of
* the read operations in Map. For example, no operation * the read operations in Map. For example, no operation
* can reveal that the table has grown but the threshold * can reveal that the table has grown but the threshold
* has not yet been updated, so there are no atomicity * has not yet been updated, so there are no atomicity
* requirements for this with respect to reads. * requirements for this with respect to reads.
* *
* As a guide, all critical volatile reads and writes to the * As a guide, all critical volatile reads and writes to the
* count field are marked in code comments. * count field are marked in code comments.
*/ */
private static final long serialVersionUID = 2249069246763182397L; private static final long serialVersionUID = 2249069246763182397L;
@ -1515,14 +1515,14 @@ public class BoundedConcurrentHashMap<K, V> extends AbstractMap<K, V>
public boolean isEmpty() { public boolean isEmpty() {
final Segment<K, V>[] segments = this.segments; final Segment<K, V>[] segments = this.segments;
/* /*
* We keep track of per-segment modCounts to avoid ABA * We keep track of per-segment modCounts to avoid ABA
* problems in which an element in one segment was added and * problems in which an element in one segment was added and
* in another removed during traversal, in which case the * in another removed during traversal, in which case the
* table was never actually empty at any point. Note the * table was never actually empty at any point. Note the
* similar use of modCounts in the size() and containsValue() * similar use of modCounts in the size() and containsValue()
* methods, which are the only other methods also susceptible * methods, which are the only other methods also susceptible
* to ABA problems. * to ABA problems.
*/ */
int[] mc = new int[segments.length]; int[] mc = new int[segments.length];
int mcsum = 0; int mcsum = 0;
for ( int i = 0; i < segments.length; ++i ) { for ( int i = 0; i < segments.length; ++i ) {

View File

@ -1639,9 +1639,9 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V>
} }
} }
/* /**
* This class is needed for JDK5 compatibility. * This class is needed for JDK5 compatibility.
*/ */
static class SimpleEntry<K, V> implements Entry<K, V>, Serializable { static class SimpleEntry<K, V> implements Entry<K, V>, Serializable {
private static final long serialVersionUID = -8499721149061103585L; private static final long serialVersionUID = -8499721149061103585L;

View File

@ -19,8 +19,8 @@ package org.hibernate.metamodel.mapping;
*/ */
public interface DiscriminatorValueDetails { public interface DiscriminatorValueDetails {
/** /**
* The discriminator value * The discriminator value
*/ */
Object getValue(); Object getValue();
/** /**
@ -32,6 +32,6 @@ public interface DiscriminatorValueDetails {
/** /**
* Form of {@link #getIndicatedEntityName()} returning the matched {@link EntityMappingType} * Form of {@link #getIndicatedEntityName()} returning the matched {@link EntityMappingType}
*/ */
EntityMappingType getIndicatedEntity(); EntityMappingType getIndicatedEntity();
} }

View File

@ -43,7 +43,7 @@ public abstract class AbstractAttributeMapping implements AttributeMapping {
/** /**
* For Hibernate Reactive * For Hibernate Reactive
*/ */
protected AbstractAttributeMapping(AbstractAttributeMapping original) { protected AbstractAttributeMapping(AbstractAttributeMapping original) {
this( this(
original.name, original.name,

View File

@ -140,19 +140,19 @@ public class ToOneAttributeMapping
private final boolean isNullable; private final boolean isNullable;
private final boolean isLazy; private final boolean isLazy;
/* /*
The nullability of the table on which the FK column is located The nullability of the table on which the FK column is located
Note that this can be null although the FK column is not nullable e.g. in the case of a join table Note that this can be null although the FK column is not nullable e.g. in the case of a join table
@Entity @Entity
public class Entity1 { public class Entity1 {
@OneToOne @OneToOne
@JoinTable(name = "key_table") @JoinTable(name = "key_table")
Entity2 association; Entity2 association;
} }
Here the join to "key_table" is nullable, but the FK column is not null. Here the join to "key_table" is nullable, but the FK column is not null.
Choosing an inner join for the association would be wrong though, because of the nullability of the key table, Choosing an inner join for the association would be wrong though, because of the nullability of the key table,
hence this flag is also controlling the default join type. hence this flag is also controlling the default join type.
*/ */
private final boolean isKeyTableNullable; private final boolean isKeyTableNullable;
private final boolean isInternalLoadNullable; private final boolean isInternalLoadNullable;
@ -168,8 +168,8 @@ public class ToOneAttributeMapping
private final Cardinality cardinality; private final Cardinality cardinality;
private final boolean hasJoinTable; private final boolean hasJoinTable;
/* /*
Capture the other side's name of a possibly bidirectional association to allow resolving circular fetches. Capture the other side's name of a possibly bidirectional association to allow resolving circular fetches.
It may be null if the referenced property is a non-entity. It may be null if the referenced property is a non-entity.
*/ */
private final SelectablePath bidirectionalAttributePath; private final SelectablePath bidirectionalAttributePath;
private final TableGroupProducer declaringTableGroupProducer; private final TableGroupProducer declaringTableGroupProducer;
@ -379,9 +379,9 @@ public class ToOneAttributeMapping
hasJoinTable = false; hasJoinTable = false;
/* /*
The otherSidePropertyName value is used to determine bidirectionality based on the navigablePath string The otherSidePropertyName value is used to determine bidirectionality based on the navigablePath string
e.g. e.g.
class Card{ class Card{
@OneToMany( mappedBy = "card") @OneToMany( mappedBy = "card")
@ -420,7 +420,7 @@ public class ToOneAttributeMapping
in such case the mappedBy is "primaryKey.card" in such case the mappedBy is "primaryKey.card"
the navigable path is NavigablePath(Card.fields.{element}.{id}.card) and it does not contain the "primaryKey" part, the navigable path is NavigablePath(Card.fields.{element}.{id}.card) and it does not contain the "primaryKey" part,
so in order to recognize the bidirectionality the "primaryKey." is removed from the otherSidePropertyName value. so in order to recognize the bidirectionality the "primaryKey." is removed from the otherSidePropertyName value.
*/ */
final OneToOne oneToOne = (OneToOne) bootValue; final OneToOne oneToOne = (OneToOne) bootValue;
if ( oneToOne.getMappedByProperty() == null ) { if ( oneToOne.getMappedByProperty() == null ) {
this.bidirectionalAttributePath = SelectablePath.parse( referencedPropertyName ); this.bidirectionalAttributePath = SelectablePath.parse( referencedPropertyName );
@ -1476,20 +1476,20 @@ public class ToOneAttributeMapping
DerivedLevel2 level2Child; DerivedLevel2 level2Child;
} }
class Level2 { class Level2 {
@OneToOne(mappedBy = "level2Parent") @OneToOne(mappedBy = "level2Parent")
Level3 level3Child; Level3 level3Child;
} }
class DerivedLevel2 extends Level2 { class DerivedLevel2 extends Level2 {
@OneToOne @OneToOne
Level1 level1Parent; Level1 level1Parent;
} }
class Level3 { class Level3 {
@OneToOne @OneToOne
Level2 level2Parent; Level2 level2Parent;
} }
We have Level1->leve2Child->level3Child->level2Parent We have Level1->leve2Child->level3Child->level2Parent
@ -1532,15 +1532,15 @@ public class ToOneAttributeMapping
&& parentNavigablePath.equals( fetchParent.getNavigablePath().getRealParent() ); && parentNavigablePath.equals( fetchParent.getNavigablePath().getRealParent() );
/* /*
In case of selected we are going to add a fetch for the `fetchablePath` only if there is not already a `TableGroupJoin`. In case of selected we are going to add a fetch for the `fetchablePath` only if there is not already a `TableGroupJoin`.
e.g. given : e.g. given :
public static class EntityA { public static class EntityA {
... ...
@ManyToOne(fetch = FetchType.EAGER) @ManyToOne(fetch = FetchType.EAGER)
private EntityB entityB; private EntityB entityB;
} }
@Entity(name = "EntityB") @Entity(name = "EntityB")
public static class EntityB { public static class EntityB {
@ -1549,11 +1549,11 @@ public class ToOneAttributeMapping
private String name; private String name;
} }
and the HQL query : and the HQL query :
`Select a From EntityA a Left Join a.entityB b Where ( b.name IS NOT NULL )` `Select a From EntityA a Left Join a.entityB b Where ( b.name IS NOT NULL )`
having the left join we don't want to add an extra implicit join that will be translated into an SQL inner join (see HHH-15342) having the left join we don't want to add an extra implicit join that will be translated into an SQL inner join (see HHH-15342)
*/ */
if ( fetchTiming == FetchTiming.IMMEDIATE && selected ) { if ( fetchTiming == FetchTiming.IMMEDIATE && selected ) {
final TableGroup tableGroup = determineTableGroupForFetch( final TableGroup tableGroup = determineTableGroupForFetch(

View File

@ -154,7 +154,7 @@ public interface EntityPersister extends EntityMappingType, EntityMutationTarget
} }
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// stuff that is persister-centric and/or EntityInfo-centric ~~~~~~~~~~~~~~ // stuff that is persister-centric and/or EntityInfo-centric ~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/** /**
@ -1131,8 +1131,8 @@ public interface EntityPersister extends EntityMappingType, EntityMutationTarget
*/ */
Object getIdentifier(Object entity, SharedSessionContractImplementor session); Object getIdentifier(Object entity, SharedSessionContractImplementor session);
/** /**
* Inject the identifier value into the given entity. * Inject the identifier value into the given entity.
*/ */
void setIdentifier(Object entity, Object id, SharedSessionContractImplementor session); void setIdentifier(Object entity, Object id, SharedSessionContractImplementor session);

View File

@ -16,7 +16,6 @@ import org.hibernate.query.QueryParameter;
import org.hibernate.type.spi.TypeConfiguration; import org.hibernate.type.spi.TypeConfiguration;
/** /**
/**
* The value/type binding information for a particular query parameter. Supports * The value/type binding information for a particular query parameter. Supports
* both single-valued and multivalued binds * both single-valued and multivalued binds
* *

View File

@ -8941,10 +8941,10 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> extends Base
@Override @Override
public boolean isRegisteringVisitedAssociationKeys() { public boolean isRegisteringVisitedAssociationKeys() {
/* /*
We need to avoid loops in case of eager self-referencing associations We need to avoid loops in case of eager self-referencing associations
E.g. E.g.
@NamedEntityGraphs({ @NamedEntityGraphs({
@NamedEntityGraph( @NamedEntityGraph(
name = "User.overview", name = "User.overview",
attributeNodes = { @NamedAttributeNode("name") }) attributeNodes = { @NamedAttributeNode("name") })

View File

@ -152,7 +152,7 @@ public interface DomainResultCreationState {
* We walk fetches via the SqlAstCreationContext because each "context" * We walk fetches via the SqlAstCreationContext because each "context"
* will define differently what should be fetched (HQL versus load) * will define differently what should be fetched (HQL versus load)
*/ */
/* /*
* todo (6.0) : centralize the implementation of this * todo (6.0) : centralize the implementation of this
* most of the logic in the impls of this is identical. variations include: * most of the logic in the impls of this is identical. variations include:
* 1) given a Fetchable, determine the FetchTiming and `selected`[1]. Tricky as functional * 1) given a Fetchable, determine the FetchTiming and `selected`[1]. Tricky as functional
@ -176,7 +176,7 @@ public interface DomainResultCreationState {
* todo (6.0) : wrt the "trickiness" of `selected[1]`, that may no longer be an issue given how TableGroups * todo (6.0) : wrt the "trickiness" of `selected[1]`, that may no longer be an issue given how TableGroups
* are built/accessed. Comes down to how we'd know whether to join fetch or select fetch. Simply pass * are built/accessed. Comes down to how we'd know whether to join fetch or select fetch. Simply pass
* along FetchStyle? * along FetchStyle?
*/ */
ImmutableFetchList visitFetches(FetchParent fetchParent); ImmutableFetchList visitFetches(FetchParent fetchParent);
default ImmutableFetchList visitNestedFetches(FetchParent fetchParent) { default ImmutableFetchList visitNestedFetches(FetchParent fetchParent) {

View File

@ -189,11 +189,11 @@ public class BatchEntityInsideEmbeddableSelectFetchInitializer extends AbstractB
final Object[] loadedState = parentEntityEntry.getLoadedState(); final Object[] loadedState = parentEntityEntry.getLoadedState();
if ( loadedState != null ) { if ( loadedState != null ) {
/* /*
E.g. E.g.
ParentEntity -> RootEmbeddable -> ParentEmbeddable -> toOneAttributeMapping ParentEntity -> RootEmbeddable -> ParentEmbeddable -> toOneAttributeMapping
The value of RootEmbeddable is needed to update the ParentEntity loaded state The value of RootEmbeddable is needed to update the ParentEntity loaded state
*/ */
final int parentEntitySubclassId = parentInfo.parentEntitySubclassId; final int parentEntitySubclassId = parentInfo.parentEntitySubclassId;
final Object rootEmbeddable = rootEmbeddableGetters[parentEntitySubclassId].get( parentEntityInstance ); final Object rootEmbeddable = rootEmbeddableGetters[parentEntitySubclassId].get( parentEntityInstance );

View File

@ -51,7 +51,7 @@ public interface Statistics {
void logSummary(); void logSummary();
/** /**
* Obtain the statistics for the entity with the given name. * Obtain the statistics for the entity with the given name.
* *
* @param entityName the entity name * @param entityName the entity name
@ -125,39 +125,39 @@ public interface Statistics {
*/ */
@Nullable CacheRegionStatistics getCacheRegionStatistics(String regionName); @Nullable CacheRegionStatistics getCacheRegionStatistics(String regionName);
/** /**
* The global number of entity deletes. * The global number of entity deletes.
*/ */
long getEntityDeleteCount(); long getEntityDeleteCount();
/** /**
* The global number of entity inserts. * The global number of entity inserts.
*/ */
long getEntityInsertCount(); long getEntityInsertCount();
/** /**
* The global number of entity loads. * The global number of entity loads.
*/ */
long getEntityLoadCount(); long getEntityLoadCount();
/** /**
* The global number of entity fetches. * The global number of entity fetches.
*/ */
long getEntityFetchCount(); long getEntityFetchCount();
/** /**
* The global number of entity updates. * The global number of entity updates.
*/ */
long getEntityUpdateCount(); long getEntityUpdateCount();
/** /**
* The global number of executed queries. * The global number of executed queries.
*/ */
long getQueryExecutionCount(); long getQueryExecutionCount();
/** /**
* The time in milliseconds of the slowest query. * The time in milliseconds of the slowest query.
*/ */
long getQueryExecutionMaxTime(); long getQueryExecutionMaxTime();
/** /**
@ -165,21 +165,21 @@ public interface Statistics {
*/ */
@Nullable String getQueryExecutionMaxTimeQueryString(); @Nullable String getQueryExecutionMaxTimeQueryString();
/** /**
* The global number of cached queries successfully retrieved from * The global number of cached queries successfully retrieved from
* the cache. * the cache.
*/ */
long getQueryCacheHitCount(); long getQueryCacheHitCount();
/** /**
* The global number of cached queries <em>not</em>not found in the * The global number of cached queries <em>not</em>not found in the
* cache. * cache.
*/ */
long getQueryCacheMissCount(); long getQueryCacheMissCount();
/** /**
* The global number of cacheable queries put in cache. * The global number of cacheable queries put in cache.
*/ */
long getQueryCachePutCount(); long getQueryCachePutCount();
/** /**
@ -204,43 +204,43 @@ public interface Statistics {
*/ */
@Nullable String getNaturalIdQueryExecutionMaxTimeEntity(); @Nullable String getNaturalIdQueryExecutionMaxTimeEntity();
/** /**
* The global number of cached natural id lookups successfully * The global number of cached natural id lookups successfully
* retrieved from the cache. * retrieved from the cache.
*/ */
long getNaturalIdCacheHitCount(); long getNaturalIdCacheHitCount();
/** /**
* The global number of cached natural id lookups <em>not</em> found * The global number of cached natural id lookups <em>not</em> found
* in the cache. * in the cache.
*/ */
long getNaturalIdCacheMissCount(); long getNaturalIdCacheMissCount();
/** /**
* The global number of cacheable natural id lookups put in cache. * The global number of cacheable natural id lookups put in cache.
*/ */
long getNaturalIdCachePutCount(); long getNaturalIdCachePutCount();
/** /**
* The global number of timestamps successfully retrieved from cache. * The global number of timestamps successfully retrieved from cache.
*/ */
long getUpdateTimestampsCacheHitCount(); long getUpdateTimestampsCacheHitCount();
/** /**
* The global number of timestamp requests that were not found in the * The global number of timestamp requests that were not found in the
* cache. * cache.
*/ */
long getUpdateTimestampsCacheMissCount(); long getUpdateTimestampsCacheMissCount();
/** /**
* The global number of timestamps put in cache. * The global number of timestamps put in cache.
*/ */
long getUpdateTimestampsCachePutCount(); long getUpdateTimestampsCachePutCount();
/** /**
* The global number of flush operations executed, including automatic * The global number of flush operations executed, including automatic
* (either manual or automatic). * (either manual or automatic).
*/ */
long getFlushCount(); long getFlushCount();
/** /**
@ -252,15 +252,15 @@ public interface Statistics {
long getConnectCount(); long getConnectCount();
/** /**
* The global number of cacheable entities and collections successfully * The global number of cacheable entities and collections successfully
* retrieved from the cache. * retrieved from the cache.
*/ */
long getSecondLevelCacheHitCount(); long getSecondLevelCacheHitCount();
/** /**
* The global number of cacheable entities collections not found in the * The global number of cacheable entities collections not found in the
* cache and loaded from the database. * cache and loaded from the database.
*/ */
long getSecondLevelCacheMissCount(); long getSecondLevelCacheMissCount();
/** /**
@ -297,7 +297,7 @@ public interface Statistics {
/** /**
* The global number of collections removed. * The global number of collections removed.
*/ */
//even on inverse="true" //even on inverse="true"
long getCollectionRemoveCount(); long getCollectionRemoveCount();
/** /**

View File

@ -474,9 +474,9 @@ public abstract class EntityType extends AbstractType implements AssociationType
if ( lazyInitializer != null ) { if ( lazyInitializer != null ) {
/* /*
If the value is a Proxy and the property access is field, the value returned by If the value is a Proxy and the property access is field, the value returned by
`attributeMapping.getAttributeMetadata().getPropertyAccess().getGetter().get( object )` `attributeMapping.getAttributeMetadata().getPropertyAccess().getGetter().get( object )`
is always null except for the id, we need the to use the proxy implementation to is always null except for the id, we need the to use the proxy implementation to
extract the property value. extract the property value.
*/ */
value = lazyInitializer.getImplementation(); value = lazyInitializer.getImplementation();
} }

View File

@ -83,7 +83,7 @@ public class ArrayConverter<T, S, E, F> implements BasicValueConverter<T, S> {
} }
private S convertFrom(E[] domainArray, Class<F> elementClass) { private S convertFrom(E[] domainArray, Class<F> elementClass) {
//TODO: the following implementation only handles conversion between non-primitive arrays! //TODO: the following implementation only handles conversion between non-primitive arrays!
//noinspection unchecked //noinspection unchecked
final F[] relationalArray = (F[]) Array.newInstance( elementClass, domainArray.length ); final F[] relationalArray = (F[]) Array.newInstance( elementClass, domainArray.length );
for ( int i = 0; i < domainArray.length; i++ ) { for ( int i = 0; i < domainArray.length; i++ ) {

View File

@ -53,7 +53,7 @@ public class JdbcTypeRegistry implements JdbcTypeBaseline.BaselineTarget, Serial
* {@link JdbcTypeConstructor#resolveType(TypeConfiguration, Dialect, JdbcType, ColumnTypeInformation)} and * {@link JdbcTypeConstructor#resolveType(TypeConfiguration, Dialect, JdbcType, ColumnTypeInformation)} and
* {@link JdbcTypeConstructor#resolveType(TypeConfiguration, Dialect, BasicType, ColumnTypeInformation)} in a single * {@link JdbcTypeConstructor#resolveType(TypeConfiguration, Dialect, BasicType, ColumnTypeInformation)} in a single
* map. * map.
*/ */
private final ConcurrentHashMap<TypeConstructedJdbcTypeKey, JdbcType> typeConstructorDescriptorMap = new ConcurrentHashMap<>(); private final ConcurrentHashMap<TypeConstructedJdbcTypeKey, JdbcType> typeConstructorDescriptorMap = new ConcurrentHashMap<>();
private final ConcurrentHashMap<String, SqlTypedJdbcType> sqlTypedDescriptorMap = new ConcurrentHashMap<>(); private final ConcurrentHashMap<String, SqlTypedJdbcType> sqlTypedDescriptorMap = new ConcurrentHashMap<>();

View File

@ -12,8 +12,8 @@ import jakarta.persistence.MappedSuperclass;
@MappedSuperclass @MappedSuperclass
public abstract class BaseMappedSuperclass { public abstract class BaseMappedSuperclass {
@Id @Id
protected Long id; protected Long id;
protected long value; protected long value;
} }

View File

@ -14,62 +14,62 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
class DB2iDialectTest { class DB2iDialectTest {
private static final String EXPECTED_FOR_UPDATE = " for update with rs"; private static final String EXPECTED_FOR_UPDATE = " for update with rs";
private static final String EXPECTED_FOR_UPDATE_SKIP_LOCK = " for update with rs skip locked data"; private static final String EXPECTED_FOR_UPDATE_SKIP_LOCK = " for update with rs skip locked data";
private DB2iDialect dialect; private DB2iDialect dialect;
@BeforeEach @BeforeEach
void setUp() { void setUp() {
dialect = new DB2iDialect(); dialect = new DB2iDialect();
} }
@Test @Test
@JiraKey("HHH-18560") @JiraKey("HHH-18560")
void getForUpdateString() { void getForUpdateString() {
String actual = dialect.getForUpdateString(); String actual = dialect.getForUpdateString();
assertEquals(EXPECTED_FOR_UPDATE, actual); assertEquals(EXPECTED_FOR_UPDATE, actual);
} }
@Test @Test
@JiraKey("HHH-18560") @JiraKey("HHH-18560")
void getForUpdateSkipLockedString() { void getForUpdateSkipLockedString() {
String actual = dialect.getForUpdateSkipLockedString(); String actual = dialect.getForUpdateSkipLockedString();
assertEquals(EXPECTED_FOR_UPDATE_SKIP_LOCK, actual); assertEquals(EXPECTED_FOR_UPDATE_SKIP_LOCK, actual);
} }
@Test @Test
@JiraKey("HHH-18560") @JiraKey("HHH-18560")
void testGetForUpdateSkipLockedString() { void testGetForUpdateSkipLockedString() {
String actual = dialect.getForUpdateSkipLockedString("alias"); String actual = dialect.getForUpdateSkipLockedString("alias");
assertEquals(EXPECTED_FOR_UPDATE_SKIP_LOCK, actual); assertEquals(EXPECTED_FOR_UPDATE_SKIP_LOCK, actual);
} }
@Test @Test
@JiraKey("HHH-18560") @JiraKey("HHH-18560")
void getWriteLockString_skiplocked() { void getWriteLockString_skiplocked() {
String actual = dialect.getWriteLockString(-2); String actual = dialect.getWriteLockString(-2);
assertEquals(EXPECTED_FOR_UPDATE_SKIP_LOCK, actual); assertEquals(EXPECTED_FOR_UPDATE_SKIP_LOCK, actual);
} }
@Test @Test
@JiraKey("HHH-18560") @JiraKey("HHH-18560")
void getWriteLockString() { void getWriteLockString() {
String actual = dialect.getWriteLockString(0); String actual = dialect.getWriteLockString(0);
assertEquals(EXPECTED_FOR_UPDATE, actual); assertEquals(EXPECTED_FOR_UPDATE, actual);
} }
@Test @Test
@JiraKey("HHH-18560") @JiraKey("HHH-18560")
void getReadLockString() { void getReadLockString() {
String actual = dialect.getReadLockString(0); String actual = dialect.getReadLockString(0);
assertEquals(EXPECTED_FOR_UPDATE, actual); assertEquals(EXPECTED_FOR_UPDATE, actual);
} }
@Test @Test
@JiraKey("HHH-18560") @JiraKey("HHH-18560")
void getReadLockString_skipLocked() { void getReadLockString_skipLocked() {
String actual = dialect.getReadLockString(-2); String actual = dialect.getReadLockString(-2);
assertEquals(EXPECTED_FOR_UPDATE_SKIP_LOCK, actual); assertEquals(EXPECTED_FOR_UPDATE_SKIP_LOCK, actual);
} }
} }

View File

@ -17,10 +17,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
@JiraKey("HHH-17770") @JiraKey("HHH-17770")
class BlobProxyTest { class BlobProxyTest {
@Test @Test
void testLengthIsNotTruncated() throws SQLException { void testLengthIsNotTruncated() throws SQLException {
long THREE_GB = 3 * 1024 * 1024 * 1024L; long THREE_GB = 3 * 1024 * 1024 * 1024L;
Blob blob = BlobProxy.generateProxy(null, THREE_GB); Blob blob = BlobProxy.generateProxy(null, THREE_GB);
assertEquals(THREE_GB, blob.length()); assertEquals(THREE_GB, blob.length());
} }
} }

View File

@ -38,7 +38,7 @@ public class PreUpdateEventListenerVetoTest extends BaseSessionFactoryFunctional
@Override @Override
protected void sessionFactoryBuilt(SessionFactoryImplementor factory) { protected void sessionFactoryBuilt(SessionFactoryImplementor factory) {
factory.getServiceRegistry().requireService( EventListenerRegistry.class ) factory.getServiceRegistry().requireService( EventListenerRegistry.class )
.appendListeners( EventType.PRE_UPDATE, event -> true ); .appendListeners( EventType.PRE_UPDATE, event -> true );
} }

View File

@ -63,7 +63,7 @@ public class EventListenerGroupAppendListenerTest extends BaseSessionFactoryFunc
DefaultMergeEventListener mergeEventListener) { DefaultMergeEventListener mergeEventListener) {
inTransaction( session -> { inTransaction( session -> {
EventListenerGroup<MergeEventListener> group = EventListenerGroup<MergeEventListener> group =
sessionFactory().getServiceRegistry() sessionFactory().getServiceRegistry()
.requireService( EventListenerRegistry.class ) .requireService( EventListenerRegistry.class )
.getEventListenerGroup( EventType.MERGE ); .getEventListenerGroup( EventType.MERGE );

View File

@ -45,6 +45,6 @@ public class Company implements Serializable {
//should be treated as getter //should be treated as getter
private int[] getWorkingHoursPerWeek(Set<Date> holidayDays) { private int[] getWorkingHoursPerWeek(Set<Date> holidayDays) {
return null; return null;
} }
} }

View File

@ -32,188 +32,188 @@ import static org.hibernate.testing.transaction.TransactionUtil.doInJPA;
*/ */
public class CreationTimestampTest extends BaseEntityManagerFunctionalTestCase { public class CreationTimestampTest extends BaseEntityManagerFunctionalTestCase {
@Override @Override
protected Class<?>[] getAnnotatedClasses() { protected Class<?>[] getAnnotatedClasses() {
return new Class<?>[]{ return new Class<?>[]{
Event.class Event.class
}; };
} }
@Entity(name = "Event") @Entity(name = "Event")
private static class Event { private static class Event {
@Id @Id
@GeneratedValue @GeneratedValue
private Long id; private Long id;
@Column(name = "`date`") @Column(name = "`date`")
@CreationTimestamp @CreationTimestamp
private Date date; private Date date;
@Column(name = "`calendar`") @Column(name = "`calendar`")
@CreationTimestamp @CreationTimestamp
private Calendar calendar; private Calendar calendar;
@Column(name = "`sqlDate`") @Column(name = "`sqlDate`")
@CreationTimestamp @CreationTimestamp
private java.sql.Date sqlDate; private java.sql.Date sqlDate;
@Column(name = "`time`") @Column(name = "`time`")
@CreationTimestamp @CreationTimestamp
private Time time; private Time time;
@Column(name = "`timestamp`") @Column(name = "`timestamp`")
@CreationTimestamp @CreationTimestamp
private Timestamp timestamp; private Timestamp timestamp;
@Column(name = "`instant`") @Column(name = "`instant`")
@CreationTimestamp @CreationTimestamp
private Instant instant; private Instant instant;
@Column(name = "`localDate`") @Column(name = "`localDate`")
@CreationTimestamp @CreationTimestamp
private LocalDate localDate; private LocalDate localDate;
@Column(name = "`localDateTime`") @Column(name = "`localDateTime`")
@CreationTimestamp @CreationTimestamp
private LocalDateTime localDateTime; private LocalDateTime localDateTime;
@Column(name = "`localTime`") @Column(name = "`localTime`")
@CreationTimestamp @CreationTimestamp
private LocalTime localTime; private LocalTime localTime;
@Column(name = "`monthDay`") @Column(name = "`monthDay`")
@CreationTimestamp @CreationTimestamp
private MonthDay monthDay; private MonthDay monthDay;
@Column(name = "`offsetDateTime`") @Column(name = "`offsetDateTime`")
@CreationTimestamp @CreationTimestamp
private OffsetDateTime offsetDateTime; private OffsetDateTime offsetDateTime;
@Column(name = "`offsetTime`") @Column(name = "`offsetTime`")
@CreationTimestamp @CreationTimestamp
private OffsetTime offsetTime; private OffsetTime offsetTime;
@Column(name = "`year`") @Column(name = "`year`")
@CreationTimestamp @CreationTimestamp
private Year year; private Year year;
@Column(name = "`yearMonth`") @Column(name = "`yearMonth`")
@CreationTimestamp @CreationTimestamp
private YearMonth yearMonth; private YearMonth yearMonth;
@Column(name = "`zonedDateTime`") @Column(name = "`zonedDateTime`")
@CreationTimestamp @CreationTimestamp
private ZonedDateTime zonedDateTime; private ZonedDateTime zonedDateTime;
public Event() { public Event() {
} }
public Long getId() { public Long getId() {
return id; return id;
} }
public Date getDate() { public Date getDate() {
return date; return date;
} }
public Calendar getCalendar() { public Calendar getCalendar() {
return calendar; return calendar;
} }
public java.sql.Date getSqlDate() { public java.sql.Date getSqlDate() {
return sqlDate; return sqlDate;
} }
public Time getTime() { public Time getTime() {
return time; return time;
} }
public Timestamp getTimestamp() { public Timestamp getTimestamp() {
return timestamp; return timestamp;
} }
public Instant getInstant() { public Instant getInstant() {
return instant; return instant;
} }
public LocalDate getLocalDate() { public LocalDate getLocalDate() {
return localDate; return localDate;
} }
public LocalDateTime getLocalDateTime() { public LocalDateTime getLocalDateTime() {
return localDateTime; return localDateTime;
} }
public LocalTime getLocalTime() { public LocalTime getLocalTime() {
return localTime; return localTime;
} }
public MonthDay getMonthDay() { public MonthDay getMonthDay() {
return monthDay; return monthDay;
} }
public OffsetDateTime getOffsetDateTime() { public OffsetDateTime getOffsetDateTime() {
return offsetDateTime; return offsetDateTime;
} }
public OffsetTime getOffsetTime() { public OffsetTime getOffsetTime() {
return offsetTime; return offsetTime;
} }
public Year getYear() { public Year getYear() {
return year; return year;
} }
public YearMonth getYearMonth() { public YearMonth getYearMonth() {
return yearMonth; return yearMonth;
} }
public ZonedDateTime getZonedDateTime() { public ZonedDateTime getZonedDateTime() {
return zonedDateTime; return zonedDateTime;
} }
} }
@Test @Test
public void generatesCurrentTimestamp() { public void generatesCurrentTimestamp() {
doInJPA(this::entityManagerFactory, entityManager -> { doInJPA(this::entityManagerFactory, entityManager -> {
Event event = new Event(); Event event = new Event();
entityManager.persist(event); entityManager.persist(event);
entityManager.flush(); entityManager.flush();
check( event ); check( event );
}); });
} }
@Test @Test
@JiraKey( value = "HHH-16240") @JiraKey( value = "HHH-16240")
public void generatesCurrentTimestampInStatelessSession() { public void generatesCurrentTimestampInStatelessSession() {
doInJPA(this::entityManagerFactory, entityManager -> { doInJPA(this::entityManagerFactory, entityManager -> {
Session session = entityManager.unwrap( Session.class); Session session = entityManager.unwrap( Session.class);
try (StatelessSession statelessSession = session.getSessionFactory().openStatelessSession()) { try (StatelessSession statelessSession = session.getSessionFactory().openStatelessSession()) {
Event event = new Event(); Event event = new Event();
statelessSession.getTransaction().begin(); statelessSession.getTransaction().begin();
statelessSession.insert(event); statelessSession.insert(event);
statelessSession.getTransaction().commit(); statelessSession.getTransaction().commit();
check( event ); check( event );
} }
}); });
} }
private void check(Event event) { private void check(Event event) {
Assert.assertNotNull(event.getDate()); Assert.assertNotNull(event.getDate());
Assert.assertNotNull(event.getCalendar()); Assert.assertNotNull(event.getCalendar());
Assert.assertNotNull(event.getSqlDate()); Assert.assertNotNull(event.getSqlDate());
Assert.assertNotNull(event.getTime()); Assert.assertNotNull(event.getTime());
Assert.assertNotNull(event.getTimestamp()); Assert.assertNotNull(event.getTimestamp());
Assert.assertNotNull(event.getInstant()); Assert.assertNotNull(event.getInstant());
Assert.assertNotNull(event.getLocalDate()); Assert.assertNotNull(event.getLocalDate());
Assert.assertNotNull(event.getLocalDateTime()); Assert.assertNotNull(event.getLocalDateTime());
Assert.assertNotNull(event.getLocalTime()); Assert.assertNotNull(event.getLocalTime());
Assert.assertNotNull(event.getMonthDay()); Assert.assertNotNull(event.getMonthDay());
Assert.assertNotNull(event.getOffsetDateTime()); Assert.assertNotNull(event.getOffsetDateTime());
Assert.assertNotNull(event.getOffsetTime()); Assert.assertNotNull(event.getOffsetTime());
Assert.assertNotNull(event.getYear()); Assert.assertNotNull(event.getYear());
Assert.assertNotNull(event.getYearMonth()); Assert.assertNotNull(event.getYearMonth());
Assert.assertNotNull(event.getZonedDateTime()); Assert.assertNotNull(event.getZonedDateTime());
} }
} }

View File

@ -38,81 +38,81 @@ import jakarta.persistence.Id;
@JiraKey( "HHH-11096" ) @JiraKey( "HHH-11096" )
@RequiresDialectFeature( feature = DialectFeatureChecks.UsesStandardCurrentTimestampFunction.class ) @RequiresDialectFeature( feature = DialectFeatureChecks.UsesStandardCurrentTimestampFunction.class )
@Jpa( @Jpa(
annotatedClasses = { annotatedClasses = {
DatabaseCreationTimestampNullableColumnTest.Person.class DatabaseCreationTimestampNullableColumnTest.Person.class
} }
) )
public class DatabaseCreationTimestampNullableColumnTest { public class DatabaseCreationTimestampNullableColumnTest {
@Entity(name = "Person") @Entity(name = "Person")
public static class Person { public static class Person {
@Id @Id
@GeneratedValue @GeneratedValue
private Long id; private Long id;
@NaturalId @NaturalId
private String name; private String name;
@Column(nullable = false) @Column(nullable = false)
@FunctionCreationTimestamp @FunctionCreationTimestamp
private Date creationDate; private Date creationDate;
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
public Date getCreationDate() { public Date getCreationDate() {
return creationDate; return creationDate;
} }
public void setCreationDate(Date creationDate) { public void setCreationDate(Date creationDate) {
this.creationDate = creationDate; this.creationDate = creationDate;
} }
} }
@ValueGenerationType(generatedBy = FunctionCreationValueGeneration.class) @ValueGenerationType(generatedBy = FunctionCreationValueGeneration.class)
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
public @interface FunctionCreationTimestamp {} public @interface FunctionCreationTimestamp {}
public static class FunctionCreationValueGeneration implements OnExecutionGenerator { public static class FunctionCreationValueGeneration implements OnExecutionGenerator {
@Override @Override
public EnumSet<EventType> getEventTypes() { public EnumSet<EventType> getEventTypes() {
return EventTypeSets.INSERT_ONLY; return EventTypeSets.INSERT_ONLY;
} }
@Override @Override
public boolean referenceColumnsInSql(Dialect dialect) { public boolean referenceColumnsInSql(Dialect dialect) {
return true; return true;
} }
@Override @Override
public boolean writePropertyValue() { public boolean writePropertyValue() {
return false; return false;
} }
@Override @Override
public String[] getReferencedColumnValues(Dialect dialect) { public String[] getReferencedColumnValues(Dialect dialect) {
return new String[] { dialect.currentTimestamp() }; return new String[] { dialect.currentTimestamp() };
} }
} }
@Test @Test
public void generatesCurrentTimestamp(EntityManagerFactoryScope scope) { public void generatesCurrentTimestamp(EntityManagerFactoryScope scope) {
scope.inTransaction( scope.inTransaction(
entityManager -> { entityManager -> {
Person person = new Person(); Person person = new Person();
person.setName("John Doe"); person.setName("John Doe");
entityManager.persist(person); entityManager.persist(person);
entityManager.flush(); entityManager.flush();
Assertions.assertNotNull(person.getCreationDate()); Assertions.assertNotNull(person.getCreationDate());
} }
); );
} }
} }

View File

@ -34,107 +34,107 @@ import jakarta.persistence.Id;
@Jpa(annotatedClasses = DatabaseTimestampsColumnTest.Person.class) @Jpa(annotatedClasses = DatabaseTimestampsColumnTest.Person.class)
public class DatabaseTimestampsColumnTest { public class DatabaseTimestampsColumnTest {
@Entity(name = "Person") @Entity(name = "Person")
public static class Person { public static class Person {
@Id @Id
@GeneratedValue @GeneratedValue
private Long id; private Long id;
@NaturalId(mutable = true) @NaturalId(mutable = true)
private String name; private String name;
@Column(nullable = false) @Column(nullable = false)
@Timestamp @Timestamp
private Date creationDate; private Date creationDate;
@Column(nullable = true) @Column(nullable = true)
@Timestamp(EventType.UPDATE) @Timestamp(EventType.UPDATE)
private Date editionDate; private Date editionDate;
@Column(nullable = false, name="version") @Column(nullable = false, name="version")
@Timestamp({ EventType.INSERT, EventType.UPDATE }) @Timestamp({ EventType.INSERT, EventType.UPDATE })
private Date timestamp; private Date timestamp;
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
public Date getCreationDate() { public Date getCreationDate() {
return creationDate; return creationDate;
} }
public Date getEditionDate() { public Date getEditionDate() {
return editionDate; return editionDate;
} }
public Date getTimestamp() { public Date getTimestamp() {
return timestamp; return timestamp;
} }
} }
@ValueGenerationType(generatedBy = TimestampValueGeneration.class) @ValueGenerationType(generatedBy = TimestampValueGeneration.class)
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
public @interface Timestamp { EventType[] value() default EventType.INSERT; } public @interface Timestamp { EventType[] value() default EventType.INSERT; }
public static class TimestampValueGeneration implements OnExecutionGenerator { public static class TimestampValueGeneration implements OnExecutionGenerator {
private EnumSet<EventType> events; private EnumSet<EventType> events;
public TimestampValueGeneration(Timestamp annotation, Member member, GeneratorCreationContext context) { public TimestampValueGeneration(Timestamp annotation, Member member, GeneratorCreationContext context) {
events = EventTypeSets.fromArray( annotation.value() ); events = EventTypeSets.fromArray( annotation.value() );
} }
@Override @Override
public EnumSet<EventType> getEventTypes() { public EnumSet<EventType> getEventTypes() {
return events; return events;
} }
@Override @Override
public boolean referenceColumnsInSql(Dialect dialect) { public boolean referenceColumnsInSql(Dialect dialect) {
return true; return true;
} }
@Override @Override
public String[] getReferencedColumnValues(Dialect dialect) { public String[] getReferencedColumnValues(Dialect dialect) {
return new String[] { dialect.currentTimestamp() }; return new String[] { dialect.currentTimestamp() };
} }
@Override @Override
public boolean writePropertyValue() { public boolean writePropertyValue() {
return false; return false;
} }
} }
@Test @Test
public void generatesCurrentTimestamp(EntityManagerFactoryScope scope) { public void generatesCurrentTimestamp(EntityManagerFactoryScope scope) {
scope.inEntityManager( scope.inEntityManager(
entityManager -> { entityManager -> {
entityManager.getTransaction().begin(); entityManager.getTransaction().begin();
Person person = new Person(); Person person = new Person();
person.setName("John Doe"); person.setName("John Doe");
entityManager.persist(person); entityManager.persist(person);
entityManager.getTransaction().commit(); entityManager.getTransaction().commit();
Date creationDate = person.getCreationDate(); Date creationDate = person.getCreationDate();
Assertions.assertNotNull(creationDate); Assertions.assertNotNull(creationDate);
Assertions.assertNull(person.getEditionDate()); Assertions.assertNull(person.getEditionDate());
Date timestamp = person.getTimestamp(); Date timestamp = person.getTimestamp();
Assertions.assertNotNull(timestamp); Assertions.assertNotNull(timestamp);
try { Thread.sleep(1_000); } catch (InterruptedException ie) {}; try { Thread.sleep(1_000); } catch (InterruptedException ie) {};
entityManager.getTransaction().begin(); entityManager.getTransaction().begin();
person.setName("Jane Doe"); person.setName("Jane Doe");
entityManager.getTransaction().commit(); entityManager.getTransaction().commit();
Assertions.assertNotNull(person.getCreationDate()); Assertions.assertNotNull(person.getCreationDate());
Assertions.assertEquals(creationDate, person.getCreationDate()); Assertions.assertEquals(creationDate, person.getCreationDate());
Assertions.assertNotNull(person.getEditionDate()); Assertions.assertNotNull(person.getEditionDate());
Assertions.assertNotNull(person.getTimestamp()); Assertions.assertNotNull(person.getTimestamp());
Assertions.assertNotEquals(timestamp, person.getTimestamp()); Assertions.assertNotEquals(timestamp, person.getTimestamp());
} }
); );
} }
} }

View File

@ -17,48 +17,48 @@ import org.junit.Test;
@JiraKey( value = "HHH-16122" ) @JiraKey( value = "HHH-16122" )
public class HHH16122Test extends BaseEntityManagerFunctionalTestCase { public class HHH16122Test extends BaseEntityManagerFunctionalTestCase {
@Override @Override
protected Class<?>[] getAnnotatedClasses() { protected Class<?>[] getAnnotatedClasses() {
return new Class[] { ValueConverter.class, SuperClass.class, SubClass.class }; return new Class[] { ValueConverter.class, SuperClass.class, SubClass.class };
} }
@Test @Test
public void testGenericSuperClassWithConverter() { public void testGenericSuperClassWithConverter() {
// The test is successful if the entity manager factory can be built. // The test is successful if the entity manager factory can be built.
} }
public static class ConvertedValue { public static class ConvertedValue {
public final long value; public final long value;
public ConvertedValue(long value) { public ConvertedValue(long value) {
this.value = value; this.value = value;
} }
} }
@Converter(autoApply = true) @Converter(autoApply = true)
public static class ValueConverter implements AttributeConverter<ConvertedValue, Long> { public static class ValueConverter implements AttributeConverter<ConvertedValue, Long> {
@Override @Override
public Long convertToDatabaseColumn( ConvertedValue value ) { public Long convertToDatabaseColumn( ConvertedValue value ) {
return value.value; return value.value;
} }
@Override @Override
public ConvertedValue convertToEntityAttribute( Long value ) { public ConvertedValue convertToEntityAttribute( Long value ) {
return new ConvertedValue(value); return new ConvertedValue(value);
} }
} }
@MappedSuperclass @MappedSuperclass
public static abstract class SuperClass<S extends SuperClass> { public static abstract class SuperClass<S extends SuperClass> {
@Id @Id
private String id; private String id;
public ConvertedValue convertedValue = new ConvertedValue( 1 ); public ConvertedValue convertedValue = new ConvertedValue( 1 );
public ConvertedValue getConvertedValue() { public ConvertedValue getConvertedValue() {
return convertedValue; return convertedValue;
} }
public void setConvertedValue(ConvertedValue convertedValue) { public void setConvertedValue(ConvertedValue convertedValue) {
this.convertedValue = convertedValue; this.convertedValue = convertedValue;
} }
} }
@Entity(name = "SubClass") @Entity(name = "SubClass")
public static class SubClass extends SuperClass<SubClass> {} public static class SubClass extends SuperClass<SubClass> {}
} }

View File

@ -22,7 +22,7 @@ import static org.junit.Assert.fail;
* @author Emmanuel Bernard * @author Emmanuel Bernard
*/ */
public class SafeMappingTest { public class SafeMappingTest {
@Test @Test
public void testDeclarativeMix() { public void testDeclarativeMix() {
Configuration cfg = new Configuration(); Configuration cfg = new Configuration();
cfg.addAnnotatedClass( IncorrectEntity.class ); cfg.addAnnotatedClass( IncorrectEntity.class );

View File

@ -32,188 +32,188 @@ import static org.hibernate.testing.transaction.TransactionUtil.doInJPA;
*/ */
public class UpdateTimestampTest extends BaseEntityManagerFunctionalTestCase { public class UpdateTimestampTest extends BaseEntityManagerFunctionalTestCase {
@Override @Override
protected Class<?>[] getAnnotatedClasses() { protected Class<?>[] getAnnotatedClasses() {
return new Class<?>[]{ return new Class<?>[]{
Event.class Event.class
}; };
} }
@Entity(name = "Event") @Entity(name = "Event")
private static class Event { private static class Event {
@Id @Id
@GeneratedValue @GeneratedValue
private Long id; private Long id;
@Column(name = "`date`") @Column(name = "`date`")
@UpdateTimestamp @UpdateTimestamp
private Date date; private Date date;
@Column(name = "`calendar`") @Column(name = "`calendar`")
@UpdateTimestamp @UpdateTimestamp
private Calendar calendar; private Calendar calendar;
@Column(name = "`sqlDate`") @Column(name = "`sqlDate`")
@UpdateTimestamp @UpdateTimestamp
private java.sql.Date sqlDate; private java.sql.Date sqlDate;
@Column(name = "`time`") @Column(name = "`time`")
@UpdateTimestamp @UpdateTimestamp
private Time time; private Time time;
@Column(name = "`timestamp`") @Column(name = "`timestamp`")
@UpdateTimestamp @UpdateTimestamp
private Timestamp timestamp; private Timestamp timestamp;
@Column(name = "`instant`") @Column(name = "`instant`")
@UpdateTimestamp @UpdateTimestamp
private Instant instant; private Instant instant;
@Column(name = "`localDate`") @Column(name = "`localDate`")
@UpdateTimestamp @UpdateTimestamp
private LocalDate localDate; private LocalDate localDate;
@Column(name = "`localDateTime`") @Column(name = "`localDateTime`")
@UpdateTimestamp @UpdateTimestamp
private LocalDateTime localDateTime; private LocalDateTime localDateTime;
@Column(name = "`localTime`") @Column(name = "`localTime`")
@UpdateTimestamp @UpdateTimestamp
private LocalTime localTime; private LocalTime localTime;
@Column(name = "`monthDay`") @Column(name = "`monthDay`")
@UpdateTimestamp @UpdateTimestamp
private MonthDay monthDay; private MonthDay monthDay;
@Column(name = "`offsetDateTime`") @Column(name = "`offsetDateTime`")
@UpdateTimestamp @UpdateTimestamp
private OffsetDateTime offsetDateTime; private OffsetDateTime offsetDateTime;
@Column(name = "`offsetTime`") @Column(name = "`offsetTime`")
@UpdateTimestamp @UpdateTimestamp
private OffsetTime offsetTime; private OffsetTime offsetTime;
@Column(name = "`year`") @Column(name = "`year`")
@UpdateTimestamp @UpdateTimestamp
private Year year; private Year year;
@Column(name = "`yearMonth`") @Column(name = "`yearMonth`")
@UpdateTimestamp @UpdateTimestamp
private YearMonth yearMonth; private YearMonth yearMonth;
@Column(name = "`zonedDateTime`") @Column(name = "`zonedDateTime`")
@UpdateTimestamp @UpdateTimestamp
private ZonedDateTime zonedDateTime; private ZonedDateTime zonedDateTime;
public Event() { public Event() {
} }
public Long getId() { public Long getId() {
return id; return id;
} }
public Date getDate() { public Date getDate() {
return date; return date;
} }
public Calendar getCalendar() { public Calendar getCalendar() {
return calendar; return calendar;
} }
public java.sql.Date getSqlDate() { public java.sql.Date getSqlDate() {
return sqlDate; return sqlDate;
} }
public Time getTime() { public Time getTime() {
return time; return time;
} }
public Timestamp getTimestamp() { public Timestamp getTimestamp() {
return timestamp; return timestamp;
} }
public Instant getInstant() { public Instant getInstant() {
return instant; return instant;
} }
public LocalDate getLocalDate() { public LocalDate getLocalDate() {
return localDate; return localDate;
} }
public LocalDateTime getLocalDateTime() { public LocalDateTime getLocalDateTime() {
return localDateTime; return localDateTime;
} }
public LocalTime getLocalTime() { public LocalTime getLocalTime() {
return localTime; return localTime;
} }
public MonthDay getMonthDay() { public MonthDay getMonthDay() {
return monthDay; return monthDay;
} }
public OffsetDateTime getOffsetDateTime() { public OffsetDateTime getOffsetDateTime() {
return offsetDateTime; return offsetDateTime;
} }
public OffsetTime getOffsetTime() { public OffsetTime getOffsetTime() {
return offsetTime; return offsetTime;
} }
public Year getYear() { public Year getYear() {
return year; return year;
} }
public YearMonth getYearMonth() { public YearMonth getYearMonth() {
return yearMonth; return yearMonth;
} }
public ZonedDateTime getZonedDateTime() { public ZonedDateTime getZonedDateTime() {
return zonedDateTime; return zonedDateTime;
} }
} }
@Test @Test
public void generatesCurrentTimestamp() { public void generatesCurrentTimestamp() {
doInJPA(this::entityManagerFactory, entityManager -> { doInJPA(this::entityManagerFactory, entityManager -> {
Event event = new Event(); Event event = new Event();
entityManager.persist(event); entityManager.persist(event);
entityManager.flush(); entityManager.flush();
check( event ); check( event );
}); });
} }
@Test @Test
@JiraKey( value = "HHH-16240") @JiraKey( value = "HHH-16240")
public void generatesCurrentTimestampInStatelessSession() { public void generatesCurrentTimestampInStatelessSession() {
doInJPA(this::entityManagerFactory, entityManager -> { doInJPA(this::entityManagerFactory, entityManager -> {
Session session = entityManager.unwrap( Session.class); Session session = entityManager.unwrap( Session.class);
try (StatelessSession statelessSession = session.getSessionFactory().openStatelessSession()) { try (StatelessSession statelessSession = session.getSessionFactory().openStatelessSession()) {
Event event = new Event(); Event event = new Event();
statelessSession.getTransaction().begin(); statelessSession.getTransaction().begin();
statelessSession.insert(event); statelessSession.insert(event);
statelessSession.getTransaction().commit(); statelessSession.getTransaction().commit();
check( event ); check( event );
} }
}); });
} }
private void check(Event event) { private void check(Event event) {
Assert.assertNotNull(event.getDate()); Assert.assertNotNull(event.getDate());
Assert.assertNotNull(event.getCalendar()); Assert.assertNotNull(event.getCalendar());
Assert.assertNotNull(event.getSqlDate()); Assert.assertNotNull(event.getSqlDate());
Assert.assertNotNull(event.getTime()); Assert.assertNotNull(event.getTime());
Assert.assertNotNull(event.getTimestamp()); Assert.assertNotNull(event.getTimestamp());
Assert.assertNotNull(event.getInstant()); Assert.assertNotNull(event.getInstant());
Assert.assertNotNull(event.getLocalDate()); Assert.assertNotNull(event.getLocalDate());
Assert.assertNotNull(event.getLocalDateTime()); Assert.assertNotNull(event.getLocalDateTime());
Assert.assertNotNull(event.getLocalTime()); Assert.assertNotNull(event.getLocalTime());
Assert.assertNotNull(event.getMonthDay()); Assert.assertNotNull(event.getMonthDay());
Assert.assertNotNull(event.getOffsetDateTime()); Assert.assertNotNull(event.getOffsetDateTime());
Assert.assertNotNull(event.getOffsetTime()); Assert.assertNotNull(event.getOffsetTime());
Assert.assertNotNull(event.getYear()); Assert.assertNotNull(event.getYear());
Assert.assertNotNull(event.getYearMonth()); Assert.assertNotNull(event.getYearMonth());
Assert.assertNotNull(event.getZonedDateTime()); Assert.assertNotNull(event.getZonedDateTime());
} }
} }

View File

@ -13,14 +13,14 @@ import jakarta.persistence.Table;
@Entity @Entity
@Table(name="`Printer`") @Table(name="`Printer`")
public class Printer { public class Printer {
private Long id; private Long id;
@Id @Id
public Long getId() { public Long getId() {
return id; return id;
} }
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
} }

View File

@ -24,7 +24,7 @@ public class MinMax {
@Max(10) @Max(10)
@Min(2) @Min(2)
@Column(name = "`value`") @Column(name = "`value`")
private Integer value; private Integer value;
private MinMax() { private MinMax() {

View File

@ -64,7 +64,7 @@ public class Tv {
@Embeddable @Embeddable
public static class Recorder { public static class Recorder {
@NotNull @NotNull
@Column(name = "`time`") @Column(name = "`time`")
public BigDecimal time; public BigDecimal time;
} }
} }

View File

@ -20,7 +20,7 @@ public class Tooth {
@Id @Id
@GeneratedValue @GeneratedValue
public Integer id; public Integer id;
@Column(name = "`type`") @Column(name = "`type`")
public String type; public String type;
@ManyToOne(cascade = CascadeType.PERSIST) @ManyToOne(cascade = CascadeType.PERSIST)
public Tooth leftNeighbour; public Tooth leftNeighbour;

View File

@ -11,56 +11,56 @@ package org.hibernate.orm.test.annotations.cascade.circle.identity;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class A extends AbstractEntity { public class A extends AbstractEntity {
private static final long serialVersionUID = 864804063L; private static final long serialVersionUID = 864804063L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "a") , mappedBy = "a")
private java.util.Set<B> bCollection = new java.util.HashSet<B>(); private java.util.Set<B> bCollection = new java.util.HashSet<B>();
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToMany(cascade = { @jakarta.persistence.ManyToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "aCollection") , mappedBy = "aCollection")
private java.util.Set<D> dCollection = new java.util.HashSet<D>(); private java.util.Set<D> dCollection = new java.util.HashSet<D>();
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "a") , mappedBy = "a")
private java.util.Set<C> cCollection = new java.util.HashSet<C>(); private java.util.Set<C> cCollection = new java.util.HashSet<C>();
public java.util.Set<B> getBCollection() { public java.util.Set<B> getBCollection() {
return bCollection; return bCollection;
} }
public void setBCollection( public void setBCollection(
java.util.Set<B> parameter) { java.util.Set<B> parameter) {
this.bCollection = parameter; this.bCollection = parameter;
} }
public java.util.Set<D> getDCollection() { public java.util.Set<D> getDCollection() {
return dCollection; return dCollection;
} }
public void setDCollection( public void setDCollection(
java.util.Set<D> parameter) { java.util.Set<D> parameter) {
this.dCollection = parameter; this.dCollection = parameter;
} }
public java.util.Set<C> getCCollection() { public java.util.Set<C> getCCollection() {
return cCollection; return cCollection;
} }
public void setCCollection( public void setCCollection(
java.util.Set<C> parameter) { java.util.Set<C> parameter) {
this.cCollection = parameter; this.cCollection = parameter;
} }
} }

View File

@ -11,54 +11,54 @@ package org.hibernate.orm.test.annotations.cascade.circle.identity;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class B extends AbstractEntity { public class B extends AbstractEntity {
private static final long serialVersionUID = 325417243L; private static final long serialVersionUID = 325417243L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "b") , mappedBy = "b")
private java.util.Set<C> cCollection = new java.util.HashSet<C>(); private java.util.Set<C> cCollection = new java.util.HashSet<C>();
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToOne(cascade = { @jakarta.persistence.ManyToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, optional = false) , optional = false)
private A a; private A a;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToOne(cascade = { @jakarta.persistence.ManyToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, optional = false) , optional = false)
private F f; private F f;
public java.util.Set<C> getCCollection() { public java.util.Set<C> getCCollection() {
return cCollection; return cCollection;
} }
public void setCCollection( public void setCCollection(
java.util.Set<C> parameter) { java.util.Set<C> parameter) {
this.cCollection = parameter; this.cCollection = parameter;
} }
public A getA() { public A getA() {
return a; return a;
} }
public void setA(A parameter) { public void setA(A parameter) {
this.a = parameter; this.a = parameter;
} }
public F getF() { public F getF() {
return f; return f;
} }
public void setF(F parameter) { public void setF(F parameter) {
this.f = parameter; this.f = parameter;
} }
} }

View File

@ -11,53 +11,53 @@ package org.hibernate.orm.test.annotations.cascade.circle.identity;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class C extends AbstractEntity { public class C extends AbstractEntity {
private static final long serialVersionUID = 1226955752L; private static final long serialVersionUID = 1226955752L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToOne(cascade = { @jakarta.persistence.ManyToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, optional = false) , optional = false)
private A a; private A a;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToOne(cascade = { @jakarta.persistence.ManyToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
) )
private G g; private G g;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToOne(cascade = { @jakarta.persistence.ManyToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, optional = false) , optional = false)
private B b; private B b;
public A getA() { public A getA() {
return a; return a;
} }
public void setA(A parameter) { public void setA(A parameter) {
this.a = parameter; this.a = parameter;
} }
public G getG() { public G getG() {
return g; return g;
} }
public void setG(G parameter) { public void setG(G parameter) {
this.g = parameter; this.g = parameter;
} }
public B getB() { public B getB() {
return b; return b;
} }
public void setB(B parameter) { public void setB(B parameter) {
this.b = parameter; this.b = parameter;
} }
} }

View File

@ -11,39 +11,39 @@ package org.hibernate.orm.test.annotations.cascade.circle.identity;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class D extends AbstractEntity { public class D extends AbstractEntity {
private static final long serialVersionUID = 2417176961L; private static final long serialVersionUID = 2417176961L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToMany(cascade = { @jakarta.persistence.ManyToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
) )
private java.util.Set<A> aCollection = new java.util.HashSet<A>(); private java.util.Set<A> aCollection = new java.util.HashSet<A>();
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
) )
private java.util.Set<E> eCollection = new java.util.HashSet<E>(); private java.util.Set<E> eCollection = new java.util.HashSet<E>();
public java.util.Set<A> getACollection() { public java.util.Set<A> getACollection() {
return aCollection; return aCollection;
} }
public void setACollection( public void setACollection(
java.util.Set<A> parameter) { java.util.Set<A> parameter) {
this.aCollection = parameter; this.aCollection = parameter;
} }
public java.util.Set<E> getECollection() { public java.util.Set<E> getECollection() {
return eCollection; return eCollection;
} }
public void setECollection( public void setECollection(
java.util.Set<E> parameter) { java.util.Set<E> parameter) {
this.eCollection = parameter; this.eCollection = parameter;
} }
} }

View File

@ -11,21 +11,21 @@ package org.hibernate.orm.test.annotations.cascade.circle.identity;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class E extends AbstractEntity { public class E extends AbstractEntity {
private static final long serialVersionUID = 1226955558L; private static final long serialVersionUID = 1226955558L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToOne(cascade = { @jakarta.persistence.ManyToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, optional = false) , optional = false)
private F f; private F f;
public F getF() { public F getF() {
return f; return f;
} }
public void setF(F parameter) { public void setF(F parameter) {
this.f = parameter; this.f = parameter;
} }
} }

View File

@ -11,38 +11,38 @@ package org.hibernate.orm.test.annotations.cascade.circle.identity;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class F extends AbstractEntity { public class F extends AbstractEntity {
private static final long serialVersionUID = 1471534025L; private static final long serialVersionUID = 1471534025L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "f") , mappedBy = "f")
private java.util.Set<B> bCollection = new java.util.HashSet<B>(); private java.util.Set<B> bCollection = new java.util.HashSet<B>();
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToOne(cascade = { @jakarta.persistence.OneToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
) )
private H h; private H h;
public java.util.Set<B> getBCollection() { public java.util.Set<B> getBCollection() {
return bCollection; return bCollection;
} }
public void setBCollection( public void setBCollection(
java.util.Set<B> parameter) { java.util.Set<B> parameter) {
this.bCollection = parameter; this.bCollection = parameter;
} }
public H getH() { public H getH() {
return h; return h;
} }
public void setH(H parameter) { public void setH(H parameter) {
this.h = parameter; this.h = parameter;
} }
} }

View File

@ -11,22 +11,22 @@ package org.hibernate.orm.test.annotations.cascade.circle.identity;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class G extends AbstractEntity { public class G extends AbstractEntity {
private static final long serialVersionUID = 325417437L; private static final long serialVersionUID = 325417437L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "g") , mappedBy = "g")
private java.util.Set<C> cCollection = new java.util.HashSet<C>(); private java.util.Set<C> cCollection = new java.util.HashSet<C>();
public java.util.Set<C> getCCollection() { public java.util.Set<C> getCCollection() {
return cCollection; return cCollection;
} }
public void setCCollection( public void setCCollection(
java.util.Set<C> parameter) { java.util.Set<C> parameter) {
this.cCollection = parameter; this.cCollection = parameter;
} }
} }

View File

@ -11,21 +11,21 @@ package org.hibernate.orm.test.annotations.cascade.circle.identity;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class H extends AbstractEntity { public class H extends AbstractEntity {
private static final long serialVersionUID = 1226955562L; private static final long serialVersionUID = 1226955562L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToOne(cascade = { @jakarta.persistence.OneToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
) )
private G g; private G g;
public G getG() { public G getG() {
return g; return g;
} }
public void setG(G parameter) { public void setG(G parameter) {
this.g = parameter; this.g = parameter;
} }
} }

View File

@ -11,56 +11,56 @@ package org.hibernate.orm.test.annotations.cascade.circle.sequence;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class A extends AbstractEntity { public class A extends AbstractEntity {
private static final long serialVersionUID = 864804063L; private static final long serialVersionUID = 864804063L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "a") , mappedBy = "a")
private java.util.Set<B> bCollection = new java.util.HashSet<B>(); private java.util.Set<B> bCollection = new java.util.HashSet<B>();
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToMany(cascade = { @jakarta.persistence.ManyToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "aCollection") , mappedBy = "aCollection")
private java.util.Set<D> dCollection = new java.util.HashSet<D>(); private java.util.Set<D> dCollection = new java.util.HashSet<D>();
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "a") , mappedBy = "a")
private java.util.Set<C> cCollection = new java.util.HashSet<C>(); private java.util.Set<C> cCollection = new java.util.HashSet<C>();
public java.util.Set<B> getBCollection() { public java.util.Set<B> getBCollection() {
return bCollection; return bCollection;
} }
public void setBCollection( public void setBCollection(
java.util.Set<B> parameter) { java.util.Set<B> parameter) {
this.bCollection = parameter; this.bCollection = parameter;
} }
public java.util.Set<D> getDCollection() { public java.util.Set<D> getDCollection() {
return dCollection; return dCollection;
} }
public void setDCollection( public void setDCollection(
java.util.Set<D> parameter) { java.util.Set<D> parameter) {
this.dCollection = parameter; this.dCollection = parameter;
} }
public java.util.Set<C> getCCollection() { public java.util.Set<C> getCCollection() {
return cCollection; return cCollection;
} }
public void setCCollection( public void setCCollection(
java.util.Set<C> parameter) { java.util.Set<C> parameter) {
this.cCollection = parameter; this.cCollection = parameter;
} }
} }

View File

@ -11,54 +11,54 @@ package org.hibernate.orm.test.annotations.cascade.circle.sequence;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class B extends AbstractEntity { public class B extends AbstractEntity {
private static final long serialVersionUID = 325417243L; private static final long serialVersionUID = 325417243L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "b") , mappedBy = "b")
private java.util.Set<C> cCollection = new java.util.HashSet<C>(); private java.util.Set<C> cCollection = new java.util.HashSet<C>();
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToOne(cascade = { @jakarta.persistence.ManyToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, optional = false) , optional = false)
private A a; private A a;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToOne(cascade = { @jakarta.persistence.ManyToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, optional = false) , optional = false)
private F f; private F f;
public java.util.Set<C> getCCollection() { public java.util.Set<C> getCCollection() {
return cCollection; return cCollection;
} }
public void setCCollection( public void setCCollection(
java.util.Set<C> parameter) { java.util.Set<C> parameter) {
this.cCollection = parameter; this.cCollection = parameter;
} }
public A getA() { public A getA() {
return a; return a;
} }
public void setA(A parameter) { public void setA(A parameter) {
this.a = parameter; this.a = parameter;
} }
public F getF() { public F getF() {
return f; return f;
} }
public void setF(F parameter) { public void setF(F parameter) {
this.f = parameter; this.f = parameter;
} }
} }

View File

@ -11,53 +11,53 @@ package org.hibernate.orm.test.annotations.cascade.circle.sequence;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class C extends AbstractEntity { public class C extends AbstractEntity {
private static final long serialVersionUID = 1226955752L; private static final long serialVersionUID = 1226955752L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToOne(cascade = { @jakarta.persistence.ManyToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, optional = false) , optional = false)
private A a; private A a;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToOne(cascade = { @jakarta.persistence.ManyToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
) )
private G g; private G g;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToOne(cascade = { @jakarta.persistence.ManyToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, optional = false) , optional = false)
private B b; private B b;
public A getA() { public A getA() {
return a; return a;
} }
public void setA(A parameter) { public void setA(A parameter) {
this.a = parameter; this.a = parameter;
} }
public G getG() { public G getG() {
return g; return g;
} }
public void setG(G parameter) { public void setG(G parameter) {
this.g = parameter; this.g = parameter;
} }
public B getB() { public B getB() {
return b; return b;
} }
public void setB(B parameter) { public void setB(B parameter) {
this.b = parameter; this.b = parameter;
} }
} }

View File

@ -11,39 +11,39 @@ package org.hibernate.orm.test.annotations.cascade.circle.sequence;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class D extends AbstractEntity { public class D extends AbstractEntity {
private static final long serialVersionUID = 2417176961L; private static final long serialVersionUID = 2417176961L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToMany(cascade = { @jakarta.persistence.ManyToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
) )
private java.util.Set<A> aCollection = new java.util.HashSet<A>(); private java.util.Set<A> aCollection = new java.util.HashSet<A>();
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
) )
private java.util.Set<E> eCollection = new java.util.HashSet<E>(); private java.util.Set<E> eCollection = new java.util.HashSet<E>();
public java.util.Set<A> getACollection() { public java.util.Set<A> getACollection() {
return aCollection; return aCollection;
} }
public void setACollection( public void setACollection(
java.util.Set<A> parameter) { java.util.Set<A> parameter) {
this.aCollection = parameter; this.aCollection = parameter;
} }
public java.util.Set<E> getECollection() { public java.util.Set<E> getECollection() {
return eCollection; return eCollection;
} }
public void setECollection( public void setECollection(
java.util.Set<E> parameter) { java.util.Set<E> parameter) {
this.eCollection = parameter; this.eCollection = parameter;
} }
} }

View File

@ -11,21 +11,21 @@ package org.hibernate.orm.test.annotations.cascade.circle.sequence;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class E extends AbstractEntity { public class E extends AbstractEntity {
private static final long serialVersionUID = 1226955558L; private static final long serialVersionUID = 1226955558L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToOne(cascade = { @jakarta.persistence.ManyToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, optional = false) , optional = false)
private F f; private F f;
public F getF() { public F getF() {
return f; return f;
} }
public void setF(F parameter) { public void setF(F parameter) {
this.f = parameter; this.f = parameter;
} }
} }

View File

@ -11,38 +11,38 @@ package org.hibernate.orm.test.annotations.cascade.circle.sequence;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class F extends AbstractEntity { public class F extends AbstractEntity {
private static final long serialVersionUID = 1471534025L; private static final long serialVersionUID = 1471534025L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "f") , mappedBy = "f")
private java.util.Set<B> bCollection = new java.util.HashSet<B>(); private java.util.Set<B> bCollection = new java.util.HashSet<B>();
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToOne(cascade = { @jakarta.persistence.OneToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
) )
private H h; private H h;
public java.util.Set<B> getBCollection() { public java.util.Set<B> getBCollection() {
return bCollection; return bCollection;
} }
public void setBCollection( public void setBCollection(
java.util.Set<B> parameter) { java.util.Set<B> parameter) {
this.bCollection = parameter; this.bCollection = parameter;
} }
public H getH() { public H getH() {
return h; return h;
} }
public void setH(H parameter) { public void setH(H parameter) {
this.h = parameter; this.h = parameter;
} }
} }

View File

@ -11,22 +11,22 @@ package org.hibernate.orm.test.annotations.cascade.circle.sequence;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class G extends AbstractEntity { public class G extends AbstractEntity {
private static final long serialVersionUID = 325417437L; private static final long serialVersionUID = 325417437L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "g") , mappedBy = "g")
private java.util.Set<C> cCollection = new java.util.HashSet<C>(); private java.util.Set<C> cCollection = new java.util.HashSet<C>();
public java.util.Set<C> getCCollection() { public java.util.Set<C> getCCollection() {
return cCollection; return cCollection;
} }
public void setCCollection( public void setCCollection(
java.util.Set<C> parameter) { java.util.Set<C> parameter) {
this.cCollection = parameter; this.cCollection = parameter;
} }
} }

View File

@ -11,21 +11,21 @@ package org.hibernate.orm.test.annotations.cascade.circle.sequence;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class H extends AbstractEntity { public class H extends AbstractEntity {
private static final long serialVersionUID = 1226955562L; private static final long serialVersionUID = 1226955562L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToOne(cascade = { @jakarta.persistence.OneToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
) )
private G g; private G g;
public G getG() { public G getG() {
return g; return g;
} }
public void setG(G parameter) { public void setG(G parameter) {
this.g = parameter; this.g = parameter;
} }
} }

View File

@ -11,15 +11,15 @@ package org.hibernate.orm.test.annotations.cascade.multicircle.jpa.identity;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class EntityB extends AbstractEntity { public class EntityB extends AbstractEntity {
private static final long serialVersionUID = 325417243L; private static final long serialVersionUID = 325417243L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "b") , mappedBy = "b")
private java.util.Set<EntityG> gCollection = new java.util.HashSet<EntityG>(); private java.util.Set<EntityG> gCollection = new java.util.HashSet<EntityG>();
/** /**
@ -32,30 +32,30 @@ public class EntityB extends AbstractEntity {
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToOne(cascade = { @jakarta.persistence.ManyToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, optional = false) , optional = false)
private EntityD d; private EntityD d;
public java.util.Set<EntityG> getGCollection() { public java.util.Set<EntityG> getGCollection() {
return gCollection; return gCollection;
} }
public void setGCollection( public void setGCollection(
java.util.Set<EntityG> parameter) { java.util.Set<EntityG> parameter) {
this.gCollection = parameter; this.gCollection = parameter;
} }
public EntityC getC() { public EntityC getC() {
return c; return c;
} }
public void setC(EntityC parameter) { public void setC(EntityC parameter) {
this.c = parameter; this.c = parameter;
} }
public EntityD getD() { public EntityD getD() {
return d; return d;

View File

@ -13,7 +13,7 @@ import java.util.Set;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class EntityC extends AbstractEntity { public class EntityC extends AbstractEntity {
private static final long serialVersionUID = 1226955752L; private static final long serialVersionUID = 1226955752L;
@jakarta.persistence.OneToMany(mappedBy = "c") @jakarta.persistence.OneToMany(mappedBy = "c")
private Set<EntityB> bCollection = new java.util.HashSet<EntityB>(); private Set<EntityB> bCollection = new java.util.HashSet<EntityB>();

View File

@ -11,7 +11,7 @@ package org.hibernate.orm.test.annotations.cascade.multicircle.jpa.identity;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class EntityD extends AbstractEntity { public class EntityD extends AbstractEntity {
private static final long serialVersionUID = 2417176961L; private static final long serialVersionUID = 2417176961L;
@jakarta.persistence.OneToMany(mappedBy = "d") @jakarta.persistence.OneToMany(mappedBy = "d")
private java.util.Set<EntityB> bCollection = new java.util.HashSet<EntityB>(); private java.util.Set<EntityB> bCollection = new java.util.HashSet<EntityB>();
@ -22,13 +22,13 @@ public class EntityD extends AbstractEntity {
@jakarta.persistence.ManyToOne(optional = false) @jakarta.persistence.ManyToOne(optional = false)
private EntityE e; private EntityE e;
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.MERGE,
jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.PERSIST,
jakarta.persistence.CascadeType.REFRESH}, jakarta.persistence.CascadeType.REFRESH},
mappedBy = "d" mappedBy = "d"
) )
private java.util.Set<EntityF> fCollection = new java.util.HashSet<EntityF>(); private java.util.Set<EntityF> fCollection = new java.util.HashSet<EntityF>();
public java.util.Set<EntityB> getBCollection() { public java.util.Set<EntityB> getBCollection() {
return bCollection; return bCollection;
@ -52,12 +52,12 @@ public class EntityD extends AbstractEntity {
this.e = e; this.e = e;
} }
public java.util.Set<EntityF> getFCollection() { public java.util.Set<EntityF> getFCollection() {
return fCollection; return fCollection;
} }
public void setFCollection( public void setFCollection(
java.util.Set<EntityF> parameter) { java.util.Set<EntityF> parameter) {
this.fCollection = parameter; this.fCollection = parameter;
} }
} }

View File

@ -11,7 +11,7 @@ package org.hibernate.orm.test.annotations.cascade.multicircle.jpa.identity;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class EntityE extends AbstractEntity { public class EntityE extends AbstractEntity {
private static final long serialVersionUID = 1226955558L; private static final long serialVersionUID = 1226955558L;
@jakarta.persistence.OneToMany(mappedBy = "e") @jakarta.persistence.OneToMany(mappedBy = "e")
private java.util.Set<EntityD> dCollection = new java.util.HashSet<EntityD>(); private java.util.Set<EntityD> dCollection = new java.util.HashSet<EntityD>();
@ -26,10 +26,10 @@ public class EntityE extends AbstractEntity {
this.dCollection = dCollection; this.dCollection = dCollection;
} }
public EntityF getF() { public EntityF getF() {
return f; return f;
} }
public void setF(EntityF parameter) { public void setF(EntityF parameter) {
this.f = parameter; this.f = parameter;
} }
} }

View File

@ -11,15 +11,15 @@ package org.hibernate.orm.test.annotations.cascade.multicircle.jpa.identity;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class EntityF extends AbstractEntity { public class EntityF extends AbstractEntity {
private static final long serialVersionUID = 1471534025L; private static final long serialVersionUID = 1471534025L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "f") , mappedBy = "f")
private java.util.Set<EntityE> eCollection = new java.util.HashSet<EntityE>(); private java.util.Set<EntityE> eCollection = new java.util.HashSet<EntityE>();
@jakarta.persistence.ManyToOne(optional = false) @jakarta.persistence.ManyToOne(optional = false)
private EntityD d; private EntityD d;
@ -27,20 +27,20 @@ public class EntityF extends AbstractEntity {
@jakarta.persistence.ManyToOne(optional = false) @jakarta.persistence.ManyToOne(optional = false)
private EntityG g; private EntityG g;
public java.util.Set<EntityE> getECollection() { public java.util.Set<EntityE> getECollection() {
return eCollection; return eCollection;
} }
public void setECollection( public void setECollection(
java.util.Set<EntityE> parameter) { java.util.Set<EntityE> parameter) {
this.eCollection = parameter; this.eCollection = parameter;
} }
public EntityD getD() { public EntityD getD() {
return d; return d;
} }
public void setD(EntityD parameter) { public void setD(EntityD parameter) {
this.d = parameter; this.d = parameter;
} }
public EntityG getG() { public EntityG getG() {
return g; return g;

View File

@ -11,13 +11,13 @@ package org.hibernate.orm.test.annotations.cascade.multicircle.jpa.identity;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class EntityG extends AbstractEntity { public class EntityG extends AbstractEntity {
private static final long serialVersionUID = 325417437L; private static final long serialVersionUID = 325417437L;
@jakarta.persistence.ManyToOne(optional = false) @jakarta.persistence.ManyToOne(optional = false)
private EntityB b; private EntityB b;
@jakarta.persistence.OneToMany(mappedBy = "g") @jakarta.persistence.OneToMany(mappedBy = "g")
private java.util.Set<EntityF> fCollection = new java.util.HashSet<EntityF>(); private java.util.Set<EntityF> fCollection = new java.util.HashSet<EntityF>();
public EntityB getB() { public EntityB getB() {
return b; return b;
@ -26,11 +26,11 @@ public class EntityG extends AbstractEntity {
this.b = parameter; this.b = parameter;
} }
public java.util.Set<EntityF> getFCollection() { public java.util.Set<EntityF> getFCollection() {
return fCollection; return fCollection;
} }
public void setFCollection( public void setFCollection(
java.util.Set<EntityF> parameter) { java.util.Set<EntityF> parameter) {
this.fCollection = parameter; this.fCollection = parameter;
} }
} }

View File

@ -11,15 +11,15 @@ package org.hibernate.orm.test.annotations.cascade.multicircle.jpa.sequence;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class B extends AbstractEntity { public class B extends AbstractEntity {
private static final long serialVersionUID = 325417243L; private static final long serialVersionUID = 325417243L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "b") , mappedBy = "b")
private java.util.Set<G> gCollection = new java.util.HashSet<G>(); private java.util.Set<G> gCollection = new java.util.HashSet<G>();
/** /**
@ -32,30 +32,30 @@ public class B extends AbstractEntity {
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.ManyToOne(cascade = { @jakarta.persistence.ManyToOne(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, optional = false) , optional = false)
private D d; private D d;
public java.util.Set<G> getGCollection() { public java.util.Set<G> getGCollection() {
return gCollection; return gCollection;
} }
public void setGCollection( public void setGCollection(
java.util.Set<G> parameter) { java.util.Set<G> parameter) {
this.gCollection = parameter; this.gCollection = parameter;
} }
public C getC() { public C getC() {
return c; return c;
} }
public void setC(C parameter) { public void setC(C parameter) {
this.c = parameter; this.c = parameter;
} }
public D getD() { public D getD() {
return d; return d;

View File

@ -13,7 +13,7 @@ import java.util.Set;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class C extends AbstractEntity { public class C extends AbstractEntity {
private static final long serialVersionUID = 1226955752L; private static final long serialVersionUID = 1226955752L;
@jakarta.persistence.OneToMany(mappedBy = "c") @jakarta.persistence.OneToMany(mappedBy = "c")
private Set<B> bCollection = new java.util.HashSet<B>(); private Set<B> bCollection = new java.util.HashSet<B>();

View File

@ -11,7 +11,7 @@ package org.hibernate.orm.test.annotations.cascade.multicircle.jpa.sequence;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class D extends AbstractEntity { public class D extends AbstractEntity {
private static final long serialVersionUID = 2417176961L; private static final long serialVersionUID = 2417176961L;
@jakarta.persistence.OneToMany(mappedBy = "d") @jakarta.persistence.OneToMany(mappedBy = "d")
private java.util.Set<B> bCollection = new java.util.HashSet<B>(); private java.util.Set<B> bCollection = new java.util.HashSet<B>();
@ -22,11 +22,11 @@ public class D extends AbstractEntity {
@jakarta.persistence.ManyToOne(optional = false) @jakarta.persistence.ManyToOne(optional = false)
private E e; private E e;
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}, jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH},
mappedBy = "d" mappedBy = "d"
) )
private java.util.Set<F> fCollection = new java.util.HashSet<F>(); private java.util.Set<F> fCollection = new java.util.HashSet<F>();
public java.util.Set<B> getBCollection() { public java.util.Set<B> getBCollection() {
return bCollection; return bCollection;
@ -50,12 +50,12 @@ public class D extends AbstractEntity {
this.e = e; this.e = e;
} }
public java.util.Set<F> getFCollection() { public java.util.Set<F> getFCollection() {
return fCollection; return fCollection;
} }
public void setFCollection( public void setFCollection(
java.util.Set<F> parameter) { java.util.Set<F> parameter) {
this.fCollection = parameter; this.fCollection = parameter;
} }
} }

View File

@ -11,7 +11,7 @@ package org.hibernate.orm.test.annotations.cascade.multicircle.jpa.sequence;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class E extends AbstractEntity { public class E extends AbstractEntity {
private static final long serialVersionUID = 1226955558L; private static final long serialVersionUID = 1226955558L;
@jakarta.persistence.OneToMany(mappedBy = "e") @jakarta.persistence.OneToMany(mappedBy = "e")
private java.util.Set<D> dCollection = new java.util.HashSet<D>(); private java.util.Set<D> dCollection = new java.util.HashSet<D>();
@ -26,10 +26,10 @@ public class E extends AbstractEntity {
this.dCollection = dCollection; this.dCollection = dCollection;
} }
public F getF() { public F getF() {
return f; return f;
} }
public void setF(F parameter) { public void setF(F parameter) {
this.f = parameter; this.f = parameter;
} }
} }

View File

@ -11,15 +11,15 @@ package org.hibernate.orm.test.annotations.cascade.multicircle.jpa.sequence;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class F extends AbstractEntity { public class F extends AbstractEntity {
private static final long serialVersionUID = 1471534025L; private static final long serialVersionUID = 1471534025L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToMany(cascade = { @jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH} jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "f") , mappedBy = "f")
private java.util.Set<E> eCollection = new java.util.HashSet<E>(); private java.util.Set<E> eCollection = new java.util.HashSet<E>();
@jakarta.persistence.ManyToOne(optional = false) @jakarta.persistence.ManyToOne(optional = false)
private D d; private D d;
@ -27,20 +27,20 @@ public class F extends AbstractEntity {
@jakarta.persistence.ManyToOne(optional = false) @jakarta.persistence.ManyToOne(optional = false)
private G g; private G g;
public java.util.Set<E> getECollection() { public java.util.Set<E> getECollection() {
return eCollection; return eCollection;
} }
public void setECollection( public void setECollection(
java.util.Set<E> parameter) { java.util.Set<E> parameter) {
this.eCollection = parameter; this.eCollection = parameter;
} }
public D getD() { public D getD() {
return d; return d;
} }
public void setD(D parameter) { public void setD(D parameter) {
this.d = parameter; this.d = parameter;
} }
public G getG() { public G getG() {
return g; return g;

View File

@ -11,13 +11,13 @@ package org.hibernate.orm.test.annotations.cascade.multicircle.jpa.sequence;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class G extends AbstractEntity { public class G extends AbstractEntity {
private static final long serialVersionUID = 325417437L; private static final long serialVersionUID = 325417437L;
@jakarta.persistence.ManyToOne(optional = false) @jakarta.persistence.ManyToOne(optional = false)
private B b; private B b;
@jakarta.persistence.OneToMany(mappedBy = "g") @jakarta.persistence.OneToMany(mappedBy = "g")
private java.util.Set<F> fCollection = new java.util.HashSet<F>(); private java.util.Set<F> fCollection = new java.util.HashSet<F>();
public B getB() { public B getB() {
return b; return b;
@ -26,11 +26,11 @@ public class G extends AbstractEntity {
this.b = parameter; this.b = parameter;
} }
public java.util.Set<F> getFCollection() { public java.util.Set<F> getFCollection() {
return fCollection; return fCollection;
} }
public void setFCollection( public void setFCollection(
java.util.Set<F> parameter) { java.util.Set<F> parameter) {
this.fCollection = parameter; this.fCollection = parameter;
} }
} }

View File

@ -8,15 +8,15 @@ package org.hibernate.orm.test.annotations.cascade.multicircle.nonjpa.identity;
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class EntityB extends AbstractEntity { public class EntityB extends AbstractEntity {
private static final long serialVersionUID = 325417243L; private static final long serialVersionUID = 325417243L;
@jakarta.persistence.OneToMany(mappedBy = "b") @jakarta.persistence.OneToMany(mappedBy = "b")
@org.hibernate.annotations.Cascade({ @org.hibernate.annotations.Cascade({
org.hibernate.annotations.CascadeType.PERSIST, org.hibernate.annotations.CascadeType.PERSIST,
org.hibernate.annotations.CascadeType.MERGE, org.hibernate.annotations.CascadeType.MERGE,
org.hibernate.annotations.CascadeType.REFRESH org.hibernate.annotations.CascadeType.REFRESH
}) })
private java.util.Set<EntityG> gCollection = new java.util.HashSet<EntityG>(); private java.util.Set<EntityG> gCollection = new java.util.HashSet<EntityG>();
@jakarta.persistence.ManyToOne(optional = false) @jakarta.persistence.ManyToOne(optional = false)
@ -33,24 +33,24 @@ public class EntityB extends AbstractEntity {
org.hibernate.annotations.CascadeType.MERGE, org.hibernate.annotations.CascadeType.MERGE,
org.hibernate.annotations.CascadeType.REFRESH org.hibernate.annotations.CascadeType.REFRESH
}) })
private EntityD d; private EntityD d;
public java.util.Set<EntityG> getGCollection() { public java.util.Set<EntityG> getGCollection() {
return gCollection; return gCollection;
} }
public void setGCollection( public void setGCollection(
java.util.Set<EntityG> parameter) { java.util.Set<EntityG> parameter) {
this.gCollection = parameter; this.gCollection = parameter;
} }
public EntityC getC() { public EntityC getC() {
return c; return c;
} }
public void setC(EntityC parameter) { public void setC(EntityC parameter) {
this.c = parameter; this.c = parameter;
} }
public EntityD getD() { public EntityD getD() {
return d; return d;

View File

@ -13,7 +13,7 @@ import java.util.Set;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class EntityC extends AbstractEntity { public class EntityC extends AbstractEntity {
private static final long serialVersionUID = 1226955752L; private static final long serialVersionUID = 1226955752L;
@jakarta.persistence.OneToMany(mappedBy = "c") @jakarta.persistence.OneToMany(mappedBy = "c")
private Set<EntityB> bCollection = new java.util.HashSet<EntityB>(); private Set<EntityB> bCollection = new java.util.HashSet<EntityB>();

View File

@ -11,7 +11,7 @@ package org.hibernate.orm.test.annotations.cascade.multicircle.nonjpa.identity;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class EntityD extends AbstractEntity { public class EntityD extends AbstractEntity {
private static final long serialVersionUID = 2417176961L; private static final long serialVersionUID = 2417176961L;
@jakarta.persistence.OneToMany(mappedBy = "d") @jakarta.persistence.OneToMany(mappedBy = "d")
private java.util.Set<EntityB> bCollection = new java.util.HashSet<EntityB>(); private java.util.Set<EntityB> bCollection = new java.util.HashSet<EntityB>();
@ -22,13 +22,13 @@ public class EntityD extends AbstractEntity {
@jakarta.persistence.ManyToOne(optional = false) @jakarta.persistence.ManyToOne(optional = false)
private EntityE e; private EntityE e;
@jakarta.persistence.OneToMany(mappedBy = "d") @jakarta.persistence.OneToMany(mappedBy = "d")
@org.hibernate.annotations.Cascade({ @org.hibernate.annotations.Cascade({
org.hibernate.annotations.CascadeType.PERSIST, org.hibernate.annotations.CascadeType.PERSIST,
org.hibernate.annotations.CascadeType.MERGE, org.hibernate.annotations.CascadeType.MERGE,
org.hibernate.annotations.CascadeType.REFRESH org.hibernate.annotations.CascadeType.REFRESH
}) })
private java.util.Set<EntityF> fCollection = new java.util.HashSet<EntityF>(); private java.util.Set<EntityF> fCollection = new java.util.HashSet<EntityF>();
public java.util.Set<EntityB> getBCollection() { public java.util.Set<EntityB> getBCollection() {
return bCollection; return bCollection;
@ -52,12 +52,12 @@ public class EntityD extends AbstractEntity {
this.e = e; this.e = e;
} }
public java.util.Set<EntityF> getFCollection() { public java.util.Set<EntityF> getFCollection() {
return fCollection; return fCollection;
} }
public void setFCollection( public void setFCollection(
java.util.Set<EntityF> parameter) { java.util.Set<EntityF> parameter) {
this.fCollection = parameter; this.fCollection = parameter;
} }
} }

View File

@ -11,7 +11,7 @@ package org.hibernate.orm.test.annotations.cascade.multicircle.nonjpa.identity;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class EntityE extends AbstractEntity { public class EntityE extends AbstractEntity {
private static final long serialVersionUID = 1226955558L; private static final long serialVersionUID = 1226955558L;
@jakarta.persistence.OneToMany(mappedBy = "e") @jakarta.persistence.OneToMany(mappedBy = "e")
private java.util.Set<EntityD> dCollection = new java.util.HashSet<EntityD>(); private java.util.Set<EntityD> dCollection = new java.util.HashSet<EntityD>();
@ -26,10 +26,10 @@ public class EntityE extends AbstractEntity {
this.dCollection = dCollection; this.dCollection = dCollection;
} }
public EntityF getF() { public EntityF getF() {
return f; return f;
} }
public void setF(EntityF parameter) { public void setF(EntityF parameter) {
this.f = parameter; this.f = parameter;
} }
} }

View File

@ -11,18 +11,18 @@ package org.hibernate.orm.test.annotations.cascade.multicircle.nonjpa.identity;
*/ */
@jakarta.persistence.Entity @jakarta.persistence.Entity
public class EntityF extends AbstractEntity { public class EntityF extends AbstractEntity {
private static final long serialVersionUID = 1471534025L; private static final long serialVersionUID = 1471534025L;
/** /**
* No documentation * No documentation
*/ */
@jakarta.persistence.OneToMany(mappedBy = "f") @jakarta.persistence.OneToMany(mappedBy = "f")
@org.hibernate.annotations.Cascade({ @org.hibernate.annotations.Cascade({
org.hibernate.annotations.CascadeType.PERSIST, org.hibernate.annotations.CascadeType.PERSIST,
org.hibernate.annotations.CascadeType.MERGE, org.hibernate.annotations.CascadeType.MERGE,
org.hibernate.annotations.CascadeType.REFRESH org.hibernate.annotations.CascadeType.REFRESH
}) })
private java.util.Set<EntityE> eCollection = new java.util.HashSet<EntityE>(); private java.util.Set<EntityE> eCollection = new java.util.HashSet<EntityE>();
@jakarta.persistence.ManyToOne(optional = false) @jakarta.persistence.ManyToOne(optional = false)
private EntityD d; private EntityD d;
@ -30,20 +30,20 @@ public class EntityF extends AbstractEntity {
@jakarta.persistence.ManyToOne(optional = false) @jakarta.persistence.ManyToOne(optional = false)
private EntityG g; private EntityG g;
public java.util.Set<EntityE> getECollection() { public java.util.Set<EntityE> getECollection() {
return eCollection; return eCollection;
} }
public void setECollection( public void setECollection(
java.util.Set<EntityE> parameter) { java.util.Set<EntityE> parameter) {
this.eCollection = parameter; this.eCollection = parameter;
} }
public EntityD getD() { public EntityD getD() {
return d; return d;
} }
public void setD(EntityD parameter) { public void setD(EntityD parameter) {
this.d = parameter; this.d = parameter;
} }
public EntityG getG() { public EntityG getG() {
return g; return g;

Some files were not shown because too many files have changed in this diff Show More