Migrate type from Serializable[] to String[]
This commit is contained in:
parent
ab0bd8d75d
commit
f49535d397
|
@ -46,7 +46,7 @@ import org.hibernate.sql.ast.tree.insert.InsertSelectStatement;
|
||||||
*/
|
*/
|
||||||
public class BulkOperationCleanupAction implements Executable, Serializable {
|
public class BulkOperationCleanupAction implements Executable, Serializable {
|
||||||
|
|
||||||
private final Serializable[] affectedTableSpaces;
|
private final String[] affectedTableSpaces;
|
||||||
|
|
||||||
private final Set<EntityCleanup> entityCleanups = new HashSet<>();
|
private final Set<EntityCleanup> entityCleanups = new HashSet<>();
|
||||||
private final Set<CollectionCleanup> collectionCleanups = new HashSet<>();
|
private final Set<CollectionCleanup> collectionCleanups = new HashSet<>();
|
||||||
|
@ -211,7 +211,7 @@ public class BulkOperationCleanupAction implements Executable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Serializable[] getPropertySpaces() {
|
public String[] getPropertySpaces() {
|
||||||
return affectedTableSpaces;
|
return affectedTableSpaces;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.action.internal;
|
package org.hibernate.action.internal;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import org.hibernate.action.spi.AfterTransactionCompletionProcess;
|
import org.hibernate.action.spi.AfterTransactionCompletionProcess;
|
||||||
import org.hibernate.action.spi.BeforeTransactionCompletionProcess;
|
import org.hibernate.action.spi.BeforeTransactionCompletionProcess;
|
||||||
import org.hibernate.cache.CacheException;
|
import org.hibernate.cache.CacheException;
|
||||||
|
@ -101,7 +99,7 @@ public abstract class CollectionAction implements ComparableExecutable {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Serializable[] getPropertySpaces() {
|
public String[] getPropertySpaces() {
|
||||||
return persister.getCollectionSpaces();
|
return persister.getCollectionSpaces();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.action.internal;
|
package org.hibernate.action.internal;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import org.hibernate.AssertionFailure;
|
import org.hibernate.AssertionFailure;
|
||||||
import org.hibernate.action.spi.AfterTransactionCompletionProcess;
|
import org.hibernate.action.spi.AfterTransactionCompletionProcess;
|
||||||
import org.hibernate.action.spi.BeforeTransactionCompletionProcess;
|
import org.hibernate.action.spi.BeforeTransactionCompletionProcess;
|
||||||
|
@ -136,7 +134,7 @@ public abstract class EntityAction
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final Serializable[] getPropertySpaces() {
|
public final String[] getPropertySpaces() {
|
||||||
return persister.getPropertySpaces();
|
return persister.getPropertySpaces();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.action.spi;
|
package org.hibernate.action.spi;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.event.spi.EventSource;
|
import org.hibernate.event.spi.EventSource;
|
||||||
|
|
||||||
|
@ -27,7 +25,7 @@ public interface Executable {
|
||||||
*
|
*
|
||||||
* @return The spaces affected by this action.
|
* @return The spaces affected by this action.
|
||||||
*/
|
*/
|
||||||
Serializable[] getPropertySpaces();
|
String[] getPropertySpaces();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called before executing any actions. Gives actions a chance to perform any preparation.
|
* Called before executing any actions. Gives actions a chance to perform any preparation.
|
||||||
|
|
|
@ -423,7 +423,7 @@ public class ActionQueue {
|
||||||
beforeTransactionProcesses.register( executable.getBeforeTransactionCompletionProcess() );
|
beforeTransactionProcesses.register( executable.getBeforeTransactionCompletionProcess() );
|
||||||
}
|
}
|
||||||
if ( session.getFactory().getSessionFactoryOptions().isQueryCacheEnabled() ) {
|
if ( session.getFactory().getSessionFactoryOptions().isQueryCacheEnabled() ) {
|
||||||
invalidateSpaces( (String[]) executable.getPropertySpaces() );
|
invalidateSpaces( executable.getPropertySpaces() );
|
||||||
}
|
}
|
||||||
if ( executable.getAfterTransactionCompletionProcess() != null ) {
|
if ( executable.getAfterTransactionCompletionProcess() != null ) {
|
||||||
if ( afterTransactionProcesses == null ) {
|
if ( afterTransactionProcesses == null ) {
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.persister.collection;
|
package org.hibernate.persister.collection;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -255,7 +254,7 @@ public interface CollectionPersister extends Restrictable {
|
||||||
/**
|
/**
|
||||||
* Get the "space" that holds the persistent state
|
* Get the "space" that holds the persistent state
|
||||||
*/
|
*/
|
||||||
Serializable[] getCollectionSpaces();
|
String[] getCollectionSpaces();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the user-visible metadata for the collection (optional operation)
|
* Get the user-visible metadata for the collection (optional operation)
|
||||||
|
|
|
@ -210,7 +210,7 @@ public interface EntityPersister extends EntityMappingType, RootTableGroupProduc
|
||||||
*
|
*
|
||||||
* @return The property spaces.
|
* @return The property spaces.
|
||||||
*/
|
*/
|
||||||
Serializable[] getPropertySpaces();
|
String[] getPropertySpaces();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array of objects that identify spaces in which properties of
|
* Returns an array of objects that identify spaces in which properties of
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.persister.entity;
|
package org.hibernate.persister.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -873,7 +872,7 @@ public class JoinedSubclassEntityPersister extends AbstractEntityPersister {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Serializable[] getPropertySpaces() {
|
public String[] getPropertySpaces() {
|
||||||
return spaces; // don't need subclass tables, because they can't appear in conditions
|
return spaces; // don't need subclass tables, because they can't appear in conditions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
*/
|
*/
|
||||||
package org.hibernate.persister.entity;
|
package org.hibernate.persister.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -502,7 +501,7 @@ public class SingleTableEntityPersister extends AbstractEntityPersister {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Serializable[] getPropertySpaces() {
|
public String[] getPropertySpaces() {
|
||||||
return spaces;
|
return spaces;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -341,7 +341,7 @@ public class UnionSubclassEntityPersister extends AbstractEntityPersister {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Serializable[] getPropertySpaces() {
|
public String[] getPropertySpaces() {
|
||||||
return spaces;
|
return spaces;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -250,8 +250,8 @@ public class GoofyPersisterClassProvider implements PersisterClassResolver {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Serializable[] getPropertySpaces() {
|
public String[] getPropertySpaces() {
|
||||||
return new Serializable[0];
|
return new String[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -924,8 +924,8 @@ public class GoofyPersisterClassProvider implements PersisterClassResolver {
|
||||||
return false; //To change body of implemented methods use File | Settings | File Templates.
|
return false; //To change body of implemented methods use File | Settings | File Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
public Serializable[] getCollectionSpaces() {
|
public String[] getCollectionSpaces() {
|
||||||
return new Serializable[0]; //To change body of implemented methods use File | Settings | File Templates.
|
return new String[0]; //To change body of implemented methods use File | Settings | File Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
public CollectionMetadata getCollectionMetadata() {
|
public CollectionMetadata getCollectionMetadata() {
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class NonSortedExecutableListTest {
|
||||||
private static class AnExecutable implements ComparableExecutable {
|
private static class AnExecutable implements ComparableExecutable {
|
||||||
|
|
||||||
private final int n;
|
private final int n;
|
||||||
private final Serializable[] spaces;
|
private final String[] spaces;
|
||||||
|
|
||||||
private transient boolean afterDeserializeCalled;
|
private transient boolean afterDeserializeCalled;
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ public class NonSortedExecutableListTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Serializable[] getPropertySpaces() {
|
public String[] getPropertySpaces() {
|
||||||
return spaces;
|
return spaces;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class SortedExecutableListTest {
|
||||||
private static class AnExecutable implements ComparableExecutable {
|
private static class AnExecutable implements ComparableExecutable {
|
||||||
|
|
||||||
private final int n;
|
private final int n;
|
||||||
private Serializable[] spaces;
|
private String[] spaces;
|
||||||
private transient boolean afterDeserializeCalled;
|
private transient boolean afterDeserializeCalled;
|
||||||
|
|
||||||
public AnExecutable(int n, String... spaces) {
|
public AnExecutable(int n, String... spaces) {
|
||||||
|
@ -73,7 +73,7 @@ public class SortedExecutableListTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Serializable[] getPropertySpaces() {
|
public String[] getPropertySpaces() {
|
||||||
return spaces;
|
return spaces;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -277,8 +277,8 @@ public class PersisterClassProviderTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Serializable[] getPropertySpaces() {
|
public String[] getPropertySpaces() {
|
||||||
return new Serializable[0];
|
return new String[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -594,7 +594,7 @@ public class CustomPersister implements EntityPersister {
|
||||||
return "CUSTOMS";
|
return "CUSTOMS";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Serializable[] getPropertySpaces() {
|
public String[] getPropertySpaces() {
|
||||||
return new String[] { "CUSTOMS" };
|
return new String[] { "CUSTOMS" };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,6 @@ import org.hibernate.type.ListType;
|
||||||
import org.hibernate.type.MapType;
|
import org.hibernate.type.MapType;
|
||||||
import org.hibernate.type.Type;
|
import org.hibernate.type.Type;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import static org.hibernate.internal.util.StringHelper.root;
|
import static org.hibernate.internal.util.StringHelper.root;
|
||||||
import static org.hibernate.jpamodelgen.validation.MockSessionFactory.typeConfiguration;
|
import static org.hibernate.jpamodelgen.validation.MockSessionFactory.typeConfiguration;
|
||||||
|
|
||||||
|
@ -146,8 +144,8 @@ public abstract class MockCollectionPersister implements QueryableCollection {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Serializable[] getCollectionSpaces() {
|
public String[] getCollectionSpaces() {
|
||||||
return new Serializable[] {role};
|
return new String[] {role};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -173,8 +173,8 @@ public abstract class MockEntityPersister implements EntityPersister, Queryable,
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Serializable[] getPropertySpaces() {
|
public String[] getPropertySpaces() {
|
||||||
return new Serializable[] {entityName};
|
return new String[] {entityName};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue