Skip to content

Commit 2bfa861

Browse files
committed
fix spelling "updateable" -> "updatable"
1 parent 8cbe910 commit 2bfa861

34 files changed

+226
-178
lines changed

hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/transform/ColumnDefaults.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ interface ColumnDefaults {
2020

2121
Boolean isInsertable();
2222

23-
Boolean isUpdateable();
23+
Boolean isUpdatable();
2424
}

hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/transform/ColumnDefaultsBasicImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public Boolean isInsertable() {
4444
}
4545

4646
@Override
47-
public Boolean isUpdateable() {
47+
public Boolean isUpdatable() {
4848
return Boolean.TRUE;
4949
}
5050
}

hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/transform/ColumnDefaultsInsertableNonUpdateableImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public Boolean isInsertable() {
4444
}
4545

4646
@Override
47-
public Boolean isUpdateable() {
47+
public Boolean isUpdatable() {
4848
return false;
4949
}
5050
}

hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/transform/ColumnDefaultsProperty.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public Boolean isInsertable() {
2727
}
2828

2929
@Override
30-
public Boolean isUpdateable() {
31-
return property.isUpdateable();
30+
public Boolean isUpdatable() {
31+
return property.isUpdatable();
3232
}
3333

3434
@Override

hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/transform/HbmXmlTransformer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,7 @@ public Boolean isInsertable() {
15541554
}
15551555

15561556
@Override
1557-
public Boolean isUpdateable() {
1557+
public Boolean isUpdatable() {
15581558
return hbmProp.isUpdate();
15591559
}
15601560
},
@@ -2797,7 +2797,7 @@ public Boolean isInsertable() {
27972797
}
27982798

27992799
@Override
2800-
public Boolean isUpdateable() {
2800+
public Boolean isUpdatable() {
28012801
return true;
28022802
}
28032803
},
@@ -3027,7 +3027,7 @@ public Boolean isInsertable() {
30273027
}
30283028

30293029
@Override
3030-
public Boolean isUpdateable() {
3030+
public Boolean isUpdatable() {
30313031
return true;
30323032
}
30333033
},

hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/transform/TargetColumnAdapterJaxbColumn.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public TargetColumnAdapterJaxbColumn(JaxbColumnImpl jaxbColumn, ColumnDefaults c
2626
this.jaxbColumn.setNullable( columnDefaults.isNullable() );
2727
this.jaxbColumn.setUnique( columnDefaults.isUnique() );
2828
this.jaxbColumn.setInsertable( columnDefaults.isInsertable() );
29-
this.jaxbColumn.setUpdatable( columnDefaults.isUpdateable() );
29+
this.jaxbColumn.setUpdatable( columnDefaults.isUpdatable() );
3030
}
3131

3232
public JaxbColumnImpl getTargetColumn() {

hibernate-core/src/main/java/org/hibernate/boot/jaxb/hbm/transform/TargetColumnAdapterJaxbJoinColumn.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public TargetColumnAdapterJaxbJoinColumn(JaxbJoinColumnImpl jaxbColumn, ColumnDe
2121
this.jaxbColumn.setNullable( columnDefaults.isNullable() );
2222
this.jaxbColumn.setUnique( columnDefaults.isUnique() );
2323
this.jaxbColumn.setInsertable( columnDefaults.isInsertable() );
24-
this.jaxbColumn.setUpdatable( columnDefaults.isUpdateable() );
24+
this.jaxbColumn.setUpdatable( columnDefaults.isUpdatable() );
2525
}
2626

2727
public JaxbJoinColumnImpl getTargetColumn() {

hibernate-core/src/main/java/org/hibernate/boot/model/internal/BinderHelper.java

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ private static String associationMessage(PersistentClass associatedEntity, Annot
302302
return "'" + associatedEntity.getEntityName() + "." + joinColumns.getPropertyName() + "'";
303303
}
304304
else {
305-
final PropertyHolder propertyHolder = joinColumns.getPropertyHolder();
305+
final var propertyHolder = joinColumns.getPropertyHolder();
306306
return propertyHolder != null
307307
? "'" + propertyHolder.getEntityName() + "." + joinColumns.getPropertyName() + "'"
308308
: "";
@@ -321,6 +321,31 @@ private static Property makeSyntheticComponentProperty(
321321
MetadataBuildingContext context,
322322
String syntheticPropertyName,
323323
List<Property> properties) {
324+
final Component embeddedComponent =
325+
embeddedComponent( ownerEntity, persistentClassOrJoin, context, properties );
326+
final Property result = new SyntheticProperty();
327+
result.setName( syntheticPropertyName );
328+
result.setPersistentClass( ownerEntity );
329+
result.setUpdatable( false );
330+
result.setInsertable( false );
331+
result.setValue( embeddedComponent );
332+
result.setPropertyAccessorName( EMBEDDED.getExternalName() );
333+
if ( persistentClassOrJoin instanceof Join ) {
334+
// the referenced column is in the joined table, add the synthetic property there
335+
persistentClassOrJoin.addProperty( result );
336+
}
337+
else {
338+
ownerEntity.addProperty( result );
339+
}
340+
embeddedComponent.createUniqueKey( context ); //make it unique
341+
return result;
342+
}
343+
344+
private static Component embeddedComponent(
345+
PersistentClass ownerEntity,
346+
AttributeContainer persistentClassOrJoin,
347+
MetadataBuildingContext context,
348+
List<Property> properties) {
324349
final Component embeddedComponent;
325350
if ( persistentClassOrJoin instanceof PersistentClass persistentClass ) {
326351
embeddedComponent = new Component( context, persistentClass );
@@ -337,22 +362,7 @@ else if ( persistentClassOrJoin instanceof Join join ) {
337362
embeddedComponent.addProperty( cloneProperty( ownerEntity, context, property ) );
338363
}
339364
embeddedComponent.sortProperties();
340-
final Property result = new SyntheticProperty();
341-
result.setName( syntheticPropertyName );
342-
result.setPersistentClass( ownerEntity );
343-
result.setUpdateable( false );
344-
result.setInsertable( false );
345-
result.setValue( embeddedComponent );
346-
result.setPropertyAccessorName( EMBEDDED.getExternalName() );
347-
if ( persistentClassOrJoin instanceof Join ) {
348-
// the referenced column is in the joined table, add the synthetic property there
349-
persistentClassOrJoin.addProperty( result );
350-
}
351-
else {
352-
ownerEntity.addProperty( result );
353-
}
354-
embeddedComponent.createUniqueKey( context ); //make it unique
355-
return result;
365+
return embeddedComponent;
356366
}
357367

358368
/**
@@ -373,7 +383,7 @@ private static Property cloneProperty(PersistentClass ownerEntity, MetadataBuild
373383
final Property result = new SyntheticProperty();
374384
result.setName( property.getName() );
375385
result.setPersistentClass( ownerEntity );
376-
result.setUpdateable( false );
386+
result.setUpdatable( false );
377387
result.setInsertable( false );
378388
result.setValue(copy);
379389
result.setPropertyAccessorName( property.getPropertyAccessorName() );
@@ -382,7 +392,7 @@ private static Property cloneProperty(PersistentClass ownerEntity, MetadataBuild
382392
else {
383393
final Property clone = shallowCopy( property );
384394
clone.setInsertable( false );
385-
clone.setUpdateable( false );
395+
clone.setUpdatable( false );
386396
clone.setNaturalIdentifier( false );
387397
clone.setValueGeneratorCreator( property.getValueGeneratorCreator() );
388398
return clone;
@@ -405,7 +415,7 @@ public static Property shallowCopy(Property property) {
405415
clone.setPersistentClass( property.getPersistentClass() );
406416
clone.setPropertyAccessorName( property.getPropertyAccessorName() );
407417
clone.setSelectable( property.isSelectable() );
408-
clone.setUpdateable( property.isUpdateable() );
418+
clone.setUpdatable( property.isUpdatable() );
409419
clone.setValue( property.getValue() );
410420
return clone;
411421
}
@@ -946,8 +956,8 @@ private static CascadeType convertCascadeType(jakarta.persistence.CascadeType ca
946956
}
947957

948958
public static String renderCascadeTypeList(EnumSet<CascadeType> cascadeTypes) {
949-
final StringBuilder cascade = new StringBuilder();
950-
for ( CascadeType cascadeType : cascadeTypes ) {
959+
final var cascade = new StringBuilder();
960+
for ( var cascadeType : cascadeTypes ) {
951961
cascade.append( "," );
952962
cascade.append( switch ( cascadeType ) {
953963
case ALL -> "all";

hibernate-core/src/main/java/org/hibernate/boot/model/internal/CollectionBinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1630,7 +1630,7 @@ private void createOneToManyBackref(org.hibernate.mapping.OneToMany oneToMany) {
16301630
+ "Backref";
16311631
backref.setName( backrefName );
16321632
backref.setOptional( true );
1633-
backref.setUpdateable( false);
1633+
backref.setUpdatable( false);
16341634
backref.setSelectable( false );
16351635
backref.setCollectionRole( getRole() );
16361636
backref.setEntityName( collection.getOwner().getEntityName() );

hibernate-core/src/main/java/org/hibernate/boot/model/internal/EntityBinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ private Component createMapperProperty(
561561
);
562562
final Property mapperProperty = new SyntheticProperty();
563563
mapperProperty.setName( NavigablePath.IDENTIFIER_MAPPER_PROPERTY );
564-
mapperProperty.setUpdateable( false );
564+
mapperProperty.setUpdatable( false );
565565
mapperProperty.setInsertable( false );
566566
mapperProperty.setPropertyAccessorName( EMBEDDED.getExternalName() );
567567
mapperProperty.setValue( mapper );

0 commit comments

Comments
 (0)