Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public Object[] assemble(

}

persister.setPropertyValues( instance, state );
persister.setValues( instance, state );

return state;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void onFlushEntity(FlushEntityEvent event) throws HibernateException {
// now update the object
// has to be outside the main if block above (because of collections)
if ( substitute ) {
persister.setPropertyValues( entity, values );
persister.setValues( entity, values );
}
// Search for collections by reachability, updating their role.
// We don't want to touch collections reachable from a deleted object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1276,25 +1276,6 @@ public void applyBaseManyToManyRestrictions(
}
}

@Override
public String getManyToManyFilterFragment(TableGroup tableGroup, Map<String, Filter> enabledFilters) {
final var fragment = new StringBuilder();
if ( manyToManyFilterHelper != null ) {
manyToManyFilterHelper.render( fragment,
elementPersister.getFilterAliasGenerator( tableGroup ), enabledFilters );
}
if ( manyToManyWhereString != null ) {
if ( !fragment.isEmpty() ) {
fragment.append( " and " );
}
assert elementPersister != null;
fragment.append( replace( manyToManyWhereTemplate, Template.TEMPLATE,
tableGroup.resolveTableReference( elementPersister.getTableName() )
.getIdentificationVariable() ) );
}
return fragment.toString();
}

@Override
public EntityPersister getElementPersister() {
if ( elementPersister == null ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ default boolean needsRemove() {
*/
boolean isManyToMany();

String getManyToManyFilterFragment(TableGroup tableGroup, Map<String, Filter> enabledFilters);

/**
* Is this an "indexed" collection? (list or map)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,15 @@ public abstract class AbstractEntityPersister

private static final CoreMessageLogger LOG = CoreLogging.messageLogger( AbstractEntityPersister.class );

/**
* The property name of the "special" identifier property in HQL
*
* @deprecated this feature of HQL is now deprecated
*/
@Deprecated(since = "6.2")
public static final String ENTITY_ID = "id";
public static final String ENTITY_CLASS = "class";

public static final String VERSION_COLUMN_ALIAS = "version_";
public static final String ROWID_ALIAS = "rowid_";

Expand Down Expand Up @@ -4082,11 +4090,6 @@ public CascadeStyle[] getPropertyCascadeStyles() {
return getCascadeStyles();
}

@Override
public boolean isPropertySelectable(int propertyNumber) {
return getAttributeMapping( propertyNumber ).getAttributeMetadata().isSelectable();
}

@Override
public final Class<?> getMappedClass() {
return this.getMappedJavaType().getJavaTypeClass();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,10 @@ default MultiNaturalIdLoader<?> getMultiNaturalIdLoader() {

/**
* Load the id for the entity based on the natural id.
*
* @deprecated No longer used
*/
@Deprecated(since = "7.2")
Object loadEntityIdByNaturalId(
Object[] naturalIdValues,
LockOptions lockOptions,
Expand All @@ -638,17 +641,6 @@ Object loadEntityIdByNaturalId(
*/
Object load(Object id, Object optionalObject, LockMode lockMode, SharedSessionContractImplementor session);

/**
* @deprecated Use {@link #load(Object, Object, LockMode, SharedSessionContractImplementor)}
*/
@Deprecated(since = "6.0")
default Object load(
Object id, Object optionalObject, LockMode lockMode, SharedSessionContractImplementor session,
@SuppressWarnings("unused") Boolean readOnly)
throws HibernateException {
return load( id, optionalObject, lockMode, session );
}

/**
* Load an instance of the persistent class.
*/
Expand Down Expand Up @@ -898,10 +890,6 @@ default UpdateCoordinator getMergeCoordinator() {
*/
CascadeStyle[] getPropertyCascadeStyles();

default boolean isPropertySelectable(int propertyNumber) {
return true;
}

/**
* Get the identifier type
*/
Expand Down Expand Up @@ -1378,14 +1366,6 @@ default int[] resolveDirtyAttributeIndexes(

boolean hasFilterForLoadByKey();

/**
* The property name of the "special" identifier property in HQL
*
* @deprecated this feature of HQL is now deprecated
*/
@Deprecated(since = "6.2")
String ENTITY_ID = "id";

/**
* @return Metadata for each unique key defined
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,9 @@ protected void initIdentifierPropertyPaths(

if ( etype.isReferenceToPrimaryKey() ) {
if ( !hasNonIdentifierPropertyNamedId ) {
String idpath1 = extendPath( path, EntityPersister.ENTITY_ID );
addPropertyPath( idpath1, idtype, columns, columnReaders, columnReaderTemplates, factory );
initPropertyPaths( idpath1, idtype, columns, columnReaders, columnReaderTemplates, formulaTemplates, factory );
String idpath = extendPath( path, AbstractEntityPersister.ENTITY_ID );
addPropertyPath( idpath, idtype, columns, columnReaders, columnReaderTemplates, factory );
initPropertyPaths( idpath, idtype, columns, columnReaders, columnReaderTemplates, formulaTemplates, factory );
}
}

Expand All @@ -352,7 +352,7 @@ private boolean hasNonIdentifierPropertyNamedId(final EntityType entityType, fin
try {
return factory.getReferencedPropertyType(
entityType.getAssociatedEntityName(),
EntityPersister.ENTITY_ID
AbstractEntityPersister.ENTITY_ID
) != null;
}
catch (MappingException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ protected boolean preInsertInMemoryValueGeneration(Object[] values, Object entit
&& generator.generatesOnInsert()
&& generator.generatedBeforeExecution( entity, session ) ) {
values[i] = ( (BeforeExecutionGenerator) generator ).generate( session, entity, values[i], INSERT );
persister.setPropertyValue( entity, i, values[i] );
persister.setValue( entity, i, values[i] );
foundStateDependentGenerator = foundStateDependentGenerator || generator.generatedOnExecution();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ private int[] preUpdateInMemoryValueGeneration(
&& generator.generatesOnUpdate()
&& generator.generatedBeforeExecution( object, session ) ) {
newValues[i] = ( (BeforeExecutionGenerator) generator ).generate( session, object, newValues[i], UPDATE );
entityPersister().setPropertyValue( object, i, newValues[i] );
entityPersister().setValue( object, i, newValues[i] );
fieldsPreUpdateNeeded[count++] = i;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1366,7 +1366,7 @@ protected void initializeEntityInstance(EntityInitializerData data) {
.injectInterceptor( entityInstanceForNotify, entityIdentifier, session );
}
}
data.concreteDescriptor.setPropertyValues( entityInstanceForNotify, resolvedEntityState );
data.concreteDescriptor.setValues( entityInstanceForNotify, resolvedEntityState );

persistenceContext.addEntity( entityKey, entityInstanceForNotify );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1192,10 +1192,6 @@ public boolean isManyToMany() {
return false; //To change body of implemented methods use File | Settings | File Templates.
}

public String getManyToManyFilterFragment(TableGroup tableGroup, Map<String, Filter> enabledFilters) {
return null; //To change body of implemented methods use File | Settings | File Templates.
}

public boolean hasIndex() {
return false; //To change body of implemented methods use File | Settings | File Templates.
}
Expand Down