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" );
/*
PostgreSQL 10 and later adds support for Partition table.
PostgreSQL 10 and later adds support for Partition table.
*/
if ( getVersion().isSameOrAfter( 10 ) ) {
tableTypesList.add( "PARTITIONED TABLE" );

View File

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

View File

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

View File

@ -135,9 +135,9 @@ public class SQLServer2008DialectTestCase extends BaseUnitTestCase {
public void testPagingWithColumnNameStartingWithFrom() {
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 (" +
"select column1 c1, from_column c2 from table1) row_) " +
"select c1,c2 from query_ where rownumber_>=? and rownumber_<?",
dialect.getLimitHandler().processSql(sql, toRowSelection(3, 5)));
"select column1 c1, from_column c2 from table1) row_) " +
"select c1,c2 from query_ where rownumber_>=? and rownumber_<?",
dialect.getLimitHandler().processSql(sql, toRowSelection(3, 5)));
}
@Test
@ -345,9 +345,9 @@ public class SQLServer2008DialectTestCase extends BaseUnitTestCase {
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 (" +
"select [Created From Nonstock Item] as col0_, field2 as col1_ from table1) row_) " +
"select col0_,col1_ from query_ where rownumber_>=? and rownumber_<?",
dialect.getLimitHandler().processSql( query, toRowSelection( 1, 5 ) )
"select [Created From Nonstock Item] as col0_, field2 as col1_ from table1) row_) " +
"select col0_,col1_ from query_ where rownumber_>=? and rownumber_<?",
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";
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 c1,col0_ from query_ where rownumber_>=? and rownumber_<?",
dialect.getLimitHandler().processSql( query, toRowSelection( 1, 5 ) )
"select [Created From Item] c1, field2 as col0_ from table1) row_) " +
"select c1,col0_ from query_ where rownumber_>=? and rownumber_<?",
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";
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 c1,col0_ from query_ where rownumber_>=? and rownumber_<?",
dialect.getLimitHandler().processSql( query, toRowSelection( 1, 5 ) )
"select [Created From Item] as c1, field2 as col0_ from table1) row_) " +
"select c1,col0_ from query_ where rownumber_>=? and rownumber_<?",
dialect.getLimitHandler().processSql( query, toRowSelection( 1, 5 ) )
);
}

View File

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

View File

@ -14,10 +14,10 @@ import java.util.Date;
*/
public class TestInterSystemsFunctionsClass {
private Long id;
private Date date3;
private Date date1;
private Date date;
private String dateText;
private Date date3;
private Date date1;
private Date date;
private String dateText;
public TestInterSystemsFunctionsClass() {
}
@ -35,38 +35,38 @@ public class TestInterSystemsFunctionsClass {
}
public Date getDate() {
return date;
}
return date;
}
public void setDate(Date date) {
this.date = date;
}
public void setDate(Date date) {
this.date = date;
}
public String getDateText() {
return dateText;
}
public String getDateText() {
return dateText;
}
public void setDateText(String dateText) {
this.dateText = dateText;
}
public void setDateText(String dateText) {
this.dateText = dateText;
}
public Date getDate1() {
return date1;
}
public Date getDate1() {
return date1;
}
public void setDate1(Date date1) {
this.date1 = date1;
}
public void setDate1(Date date1) {
this.date1 = date1;
}
public Date getDate3() {
return date3;
}
public Date getDate3() {
return date3;
}
public void setDate3(Date date3) {
this.date3 = date3;
}
public void setDate3(Date 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
* entity object.
*
@ -375,7 +375,7 @@ public final class Hibernate {
*
* @throws LazyInitializationException if this operation is called on an
* uninitialized proxy that is not associated with an open session.
*/
*/
public static Object unproxy(Object proxy) {
final LazyInitializer lazyInitializer = extractLazyInitializer( proxy );
return lazyInitializer != null ? lazyInitializer.getImplementation() : proxy;

View File

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

View File

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

View File

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

View File

@ -1855,8 +1855,8 @@ public class EntityBinder {
}
public void finalSecondaryTableBinding(PropertyHolder propertyHolder) {
// This operation has to be done after the id definition of the persistence class.
// ie after the properties parsing
// This operation has to be done after the id definition of the persistence class.
// ie after the properties parsing
final Iterator<Object> joinColumns = secondaryTableJoins.values().iterator();
for ( Map.Entry<String, Join> entrySet : secondaryTables.entrySet() ) {
if ( !secondaryTablesFromAnnotation.containsKey( entrySet.getKey() ) ) {
@ -1866,8 +1866,8 @@ public class EntityBinder {
}
public void finalSecondaryTableFromAnnotationBinding(PropertyHolder propertyHolder) {
// 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
// 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
Iterator<Object> joinColumns = secondaryTableFromAnnotationJoins.values().iterator();
for ( Map.Entry<String, Join> entrySet : secondaryTables.entrySet() ) {
if ( secondaryTablesFromAnnotation.containsKey( entrySet.getKey() ) ) {

View File

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

View File

@ -7,7 +7,7 @@
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
*/

View File

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

View File

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

View File

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

View File

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

View File

@ -124,7 +124,7 @@ public class DialectDelegateWrapper extends Dialect {
}
}
/**
/**
* Exposed so to allow code needing to know the implementation.
* @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,
* 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,
* but requires that {@code system_range} is fed with a "maximum array size".
*/
* 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>.
* 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".
*/
protected int getMaximumArraySize() {
return 1000;
}

View File

@ -12,9 +12,9 @@ import org.hibernate.LockMode;
import org.hibernate.LockOptions;
import org.hibernate.persister.entity.EntityPersister;
/**
/**
* A locking strategy where an optimistic lock is obtained via a select
* statement.
* statement.
* <p>
* Differs from {@link PessimisticWriteSelectLockingStrategy} and
* {@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?
*
* @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
* injecting the limit values into the SQL string.
*

View File

@ -24,7 +24,7 @@ public class SQLServer2012LimitHandler extends OffsetFetchLimitHandler {
// ORDER BY ...
// [
// 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();

View File

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

View File

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

View File

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

View File

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

View File

@ -33,8 +33,8 @@ import org.hibernate.type.descriptor.java.DataHelper;
*/
@Internal
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
// incompatibilities across various JDBC versions, hence the class name, but using a real Proxy is
// 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
// no longer necessary. The class name could be updated to reflect this but that would break APIs.
private final BinaryStream binaryStream;

View File

@ -136,7 +136,7 @@ public interface JdbcCoordinator extends Serializable, TransactionCoordinatorOwn
*/
void cancelLastQuery();
/**
/**
* 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

View File

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

View File

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

View File

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

View File

@ -16,11 +16,11 @@ import org.hibernate.HibernateException;
*/
public interface DeleteEventListener {
/**
/**
* 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, DeleteContext transientEntities) throws HibernateException;

View File

@ -14,10 +14,10 @@ import org.hibernate.HibernateException;
* @author Steve Ebersole
*/
public interface FlushEventListener {
/**
/**
* 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;
}

View File

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

View File

@ -16,11 +16,11 @@ import org.hibernate.HibernateException;
*/
public interface RefreshEventListener {
/**
* Handle the given refresh event.
*
* @param event The refresh event to be handled.
*/
/**
* Handle the given refresh event.
*
* @param event The refresh event to be handled.
*/
void onRefresh(RefreshEvent event) 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 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) {

View File

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

View File

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

View File

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

View File

@ -140,19 +140,19 @@ public class ToOneAttributeMapping
private final boolean isNullable;
private final boolean isLazy;
/*
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
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
@Entity
public class Entity1 {
@OneToOne
@JoinTable(name = "key_table")
Entity2 association;
}
@Entity
public class Entity1 {
@OneToOne
@JoinTable(name = "key_table")
Entity2 association;
}
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,
hence this flag is also controlling the default join type.
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,
hence this flag is also controlling the default join type.
*/
private final boolean isKeyTableNullable;
private final boolean isInternalLoadNullable;
@ -168,8 +168,8 @@ public class ToOneAttributeMapping
private final Cardinality cardinality;
private final boolean hasJoinTable;
/*
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.
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.
*/
private final SelectablePath bidirectionalAttributePath;
private final TableGroupProducer declaringTableGroupProducer;
@ -379,9 +379,9 @@ public class ToOneAttributeMapping
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{
@OneToMany( mappedBy = "card")
@ -420,7 +420,7 @@ public class ToOneAttributeMapping
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,
so in order to recognize the bidirectionality the "primaryKey." is removed from the otherSidePropertyName value.
*/
*/
final OneToOne oneToOne = (OneToOne) bootValue;
if ( oneToOne.getMappedByProperty() == null ) {
this.bidirectionalAttributePath = SelectablePath.parse( referencedPropertyName );
@ -1476,20 +1476,20 @@ public class ToOneAttributeMapping
DerivedLevel2 level2Child;
}
class Level2 {
@OneToOne(mappedBy = "level2Parent")
class Level2 {
@OneToOne(mappedBy = "level2Parent")
Level3 level3Child;
}
}
class DerivedLevel2 extends Level2 {
@OneToOne
class DerivedLevel2 extends Level2 {
@OneToOne
Level1 level1Parent;
}
}
class Level3 {
@OneToOne
class Level3 {
@OneToOne
Level2 level2Parent;
}
}
We have Level1->leve2Child->level3Child->level2Parent
@ -1532,15 +1532,15 @@ public class ToOneAttributeMapping
&& 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 :
public static class EntityA {
e.g. given :
public static class EntityA {
...
@ManyToOne(fetch = FetchType.EAGER)
private EntityB entityB;
}
}
@Entity(name = "EntityB")
public static class EntityB {
@ -1549,11 +1549,11 @@ public class ToOneAttributeMapping
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 ) {
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);
/**
* Inject the identifier value into the given entity.
/**
* Inject the identifier value into the given entity.
*/
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;
/**
/**
* The value/type binding information for a particular query parameter. Supports
* both single-valued and multivalued binds
*

View File

@ -8941,10 +8941,10 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> extends Base
@Override
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.
@NamedEntityGraphs({
E.g.
@NamedEntityGraphs({
@NamedEntityGraph(
name = "User.overview",
attributeNodes = { @NamedAttributeNode("name") })

View File

@ -152,7 +152,7 @@ public interface DomainResultCreationState {
* We walk fetches via the SqlAstCreationContext because each "context"
* will define differently what should be fetched (HQL versus load)
*/
/*
/*
* todo (6.0) : centralize the implementation of this
* 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
@ -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
* are built/accessed. Comes down to how we'd know whether to join fetch or select fetch. Simply pass
* along FetchStyle?
*/
*/
ImmutableFetchList visitFetches(FetchParent fetchParent);
default ImmutableFetchList visitNestedFetches(FetchParent fetchParent) {

View File

@ -189,11 +189,11 @@ public class BatchEntityInsideEmbeddableSelectFetchInitializer extends AbstractB
final Object[] loadedState = parentEntityEntry.getLoadedState();
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 Object rootEmbeddable = rootEmbeddableGetters[parentEntitySubclassId].get( parentEntityInstance );

View File

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

View File

@ -474,9 +474,9 @@ public abstract class EntityType extends AbstractType implements AssociationType
if ( lazyInitializer != null ) {
/*
If the value is a Proxy and the property access is field, the value returned by
`attributeMapping.getAttributeMetadata().getPropertyAccess().getGetter().get( object )`
is always null except for the id, we need the to use the proxy implementation to
extract the property value.
`attributeMapping.getAttributeMetadata().getPropertyAccess().getGetter().get( object )`
is always null except for the id, we need the to use the proxy implementation to
extract the property value.
*/
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) {
//TODO: the following implementation only handles conversion between non-primitive arrays!
//TODO: the following implementation only handles conversion between non-primitive arrays!
//noinspection unchecked
final F[] relationalArray = (F[]) Array.newInstance( elementClass, domainArray.length );
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, BasicType, ColumnTypeInformation)} in a single
* map.
*/
*/
private final ConcurrentHashMap<TypeConstructedJdbcTypeKey, JdbcType> typeConstructorDescriptorMap = new ConcurrentHashMap<>();
private final ConcurrentHashMap<String, SqlTypedJdbcType> sqlTypedDescriptorMap = new ConcurrentHashMap<>();

View File

@ -12,8 +12,8 @@ import jakarta.persistence.MappedSuperclass;
@MappedSuperclass
public abstract class BaseMappedSuperclass {
@Id
protected Long id;
@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 {
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 = " for update with rs";
private static final String EXPECTED_FOR_UPDATE_SKIP_LOCK = " for update with rs skip locked data";
private DB2iDialect dialect;
private DB2iDialect dialect;
@BeforeEach
void setUp() {
dialect = new DB2iDialect();
}
@BeforeEach
void setUp() {
dialect = new DB2iDialect();
}
@Test
@JiraKey("HHH-18560")
void getForUpdateString() {
String actual = dialect.getForUpdateString();
assertEquals(EXPECTED_FOR_UPDATE, actual);
}
@Test
@JiraKey("HHH-18560")
void getForUpdateString() {
String actual = dialect.getForUpdateString();
assertEquals(EXPECTED_FOR_UPDATE, actual);
}
@Test
@JiraKey("HHH-18560")
void getForUpdateSkipLockedString() {
String actual = dialect.getForUpdateSkipLockedString();
assertEquals(EXPECTED_FOR_UPDATE_SKIP_LOCK, actual);
}
@Test
@JiraKey("HHH-18560")
void getForUpdateSkipLockedString() {
String actual = dialect.getForUpdateSkipLockedString();
assertEquals(EXPECTED_FOR_UPDATE_SKIP_LOCK, actual);
}
@Test
@JiraKey("HHH-18560")
void testGetForUpdateSkipLockedString() {
String actual = dialect.getForUpdateSkipLockedString("alias");
assertEquals(EXPECTED_FOR_UPDATE_SKIP_LOCK, actual);
}
@Test
@JiraKey("HHH-18560")
void testGetForUpdateSkipLockedString() {
String actual = dialect.getForUpdateSkipLockedString("alias");
assertEquals(EXPECTED_FOR_UPDATE_SKIP_LOCK, actual);
}
@Test
@JiraKey("HHH-18560")
void getWriteLockString_skiplocked() {
String actual = dialect.getWriteLockString(-2);
assertEquals(EXPECTED_FOR_UPDATE_SKIP_LOCK, actual);
}
@Test
@JiraKey("HHH-18560")
void getWriteLockString_skiplocked() {
String actual = dialect.getWriteLockString(-2);
assertEquals(EXPECTED_FOR_UPDATE_SKIP_LOCK, actual);
}
@Test
@JiraKey("HHH-18560")
void getWriteLockString() {
String actual = dialect.getWriteLockString(0);
assertEquals(EXPECTED_FOR_UPDATE, actual);
}
@Test
@JiraKey("HHH-18560")
void getWriteLockString() {
String actual = dialect.getWriteLockString(0);
assertEquals(EXPECTED_FOR_UPDATE, actual);
}
@Test
@JiraKey("HHH-18560")
void getReadLockString() {
String actual = dialect.getReadLockString(0);
assertEquals(EXPECTED_FOR_UPDATE, actual);
}
@Test
@JiraKey("HHH-18560")
void getReadLockString() {
String actual = dialect.getReadLockString(0);
assertEquals(EXPECTED_FOR_UPDATE, actual);
}
@Test
@JiraKey("HHH-18560")
void getReadLockString_skipLocked() {
String actual = dialect.getReadLockString(-2);
assertEquals(EXPECTED_FOR_UPDATE_SKIP_LOCK, actual);
}
@Test
@JiraKey("HHH-18560")
void getReadLockString_skipLocked() {
String actual = dialect.getReadLockString(-2);
assertEquals(EXPECTED_FOR_UPDATE_SKIP_LOCK, actual);
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -13,7 +13,7 @@ import java.util.Set;
*/
@jakarta.persistence.Entity
public class EntityC extends AbstractEntity {
private static final long serialVersionUID = 1226955752L;
private static final long serialVersionUID = 1226955752L;
@jakarta.persistence.OneToMany(mappedBy = "c")
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
public class EntityD extends AbstractEntity {
private static final long serialVersionUID = 2417176961L;
private static final long serialVersionUID = 2417176961L;
@jakarta.persistence.OneToMany(mappedBy = "d")
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)
private EntityE e;
@jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE,
@jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE,
jakarta.persistence.CascadeType.PERSIST,
jakarta.persistence.CascadeType.REFRESH},
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() {
return bCollection;
@ -52,12 +52,12 @@ public class EntityD extends AbstractEntity {
this.e = e;
}
public java.util.Set<EntityF> getFCollection() {
return fCollection;
}
public void setFCollection(
public java.util.Set<EntityF> getFCollection() {
return fCollection;
}
public void setFCollection(
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
public class EntityE extends AbstractEntity {
private static final long serialVersionUID = 1226955558L;
private static final long serialVersionUID = 1226955558L;
@jakarta.persistence.OneToMany(mappedBy = "e")
private java.util.Set<EntityD> dCollection = new java.util.HashSet<EntityD>();
@ -26,10 +26,10 @@ public class EntityE extends AbstractEntity {
this.dCollection = dCollection;
}
public EntityF getF() {
return f;
}
public void setF(EntityF parameter) {
this.f = parameter;
}
public EntityF getF() {
return f;
}
public void setF(EntityF parameter) {
this.f = parameter;
}
}

View File

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

View File

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

View File

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

View File

@ -13,7 +13,7 @@ import java.util.Set;
*/
@jakarta.persistence.Entity
public class C extends AbstractEntity {
private static final long serialVersionUID = 1226955752L;
private static final long serialVersionUID = 1226955752L;
@jakarta.persistence.OneToMany(mappedBy = "c")
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
public class D extends AbstractEntity {
private static final long serialVersionUID = 2417176961L;
private static final long serialVersionUID = 2417176961L;
@jakarta.persistence.OneToMany(mappedBy = "d")
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)
private E e;
@jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH},
@jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH},
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() {
return bCollection;
@ -50,12 +50,12 @@ public class D extends AbstractEntity {
this.e = e;
}
public java.util.Set<F> getFCollection() {
return fCollection;
}
public void setFCollection(
public java.util.Set<F> getFCollection() {
return fCollection;
}
public void setFCollection(
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
public class E extends AbstractEntity {
private static final long serialVersionUID = 1226955558L;
private static final long serialVersionUID = 1226955558L;
@jakarta.persistence.OneToMany(mappedBy = "e")
private java.util.Set<D> dCollection = new java.util.HashSet<D>();
@ -26,10 +26,10 @@ public class E extends AbstractEntity {
this.dCollection = dCollection;
}
public F getF() {
return f;
}
public void setF(F parameter) {
this.f = parameter;
}
public F getF() {
return f;
}
public void setF(F parameter) {
this.f = parameter;
}
}

View File

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

View File

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

View File

@ -8,15 +8,15 @@ package org.hibernate.orm.test.annotations.cascade.multicircle.nonjpa.identity;
@jakarta.persistence.Entity
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.CascadeType.PERSIST,
org.hibernate.annotations.CascadeType.MERGE,
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)
@ -33,24 +33,24 @@ public class EntityB extends AbstractEntity {
org.hibernate.annotations.CascadeType.MERGE,
org.hibernate.annotations.CascadeType.REFRESH
})
private EntityD d;
private EntityD d;
public java.util.Set<EntityG> getGCollection() {
return gCollection;
}
public java.util.Set<EntityG> getGCollection() {
return gCollection;
}
public void setGCollection(
java.util.Set<EntityG> parameter) {
this.gCollection = parameter;
}
public void setGCollection(
java.util.Set<EntityG> parameter) {
this.gCollection = parameter;
}
public EntityC getC() {
return c;
}
public EntityC getC() {
return c;
}
public void setC(EntityC parameter) {
this.c = parameter;
}
public void setC(EntityC parameter) {
this.c = parameter;
}
public EntityD getD() {
return d;

View File

@ -13,7 +13,7 @@ import java.util.Set;
*/
@jakarta.persistence.Entity
public class EntityC extends AbstractEntity {
private static final long serialVersionUID = 1226955752L;
private static final long serialVersionUID = 1226955752L;
@jakarta.persistence.OneToMany(mappedBy = "c")
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
public class EntityD extends AbstractEntity {
private static final long serialVersionUID = 2417176961L;
private static final long serialVersionUID = 2417176961L;
@jakarta.persistence.OneToMany(mappedBy = "d")
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)
private EntityE e;
@jakarta.persistence.OneToMany(mappedBy = "d")
@jakarta.persistence.OneToMany(mappedBy = "d")
@org.hibernate.annotations.Cascade({
org.hibernate.annotations.CascadeType.PERSIST,
org.hibernate.annotations.CascadeType.MERGE,
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() {
return bCollection;
@ -52,12 +52,12 @@ public class EntityD extends AbstractEntity {
this.e = e;
}
public java.util.Set<EntityF> getFCollection() {
return fCollection;
}
public void setFCollection(
public java.util.Set<EntityF> getFCollection() {
return fCollection;
}
public void setFCollection(
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
public class EntityE extends AbstractEntity {
private static final long serialVersionUID = 1226955558L;
private static final long serialVersionUID = 1226955558L;
@jakarta.persistence.OneToMany(mappedBy = "e")
private java.util.Set<EntityD> dCollection = new java.util.HashSet<EntityD>();
@ -26,10 +26,10 @@ public class EntityE extends AbstractEntity {
this.dCollection = dCollection;
}
public EntityF getF() {
return f;
}
public void setF(EntityF parameter) {
this.f = parameter;
}
public EntityF getF() {
return f;
}
public void setF(EntityF parameter) {
this.f = parameter;
}
}

View File

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

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