@Override public PersistentCollection instantiate(SharedSessionContractImplementor session, CollectionPersister persister, Serializable key) { return new PersistentList( session ); }
@Override public PersistentCollection wrap(SharedSessionContractImplementor session, Object collection) { return new PersistentList( session, (List) collection ); }
public PersistentCollection wrap(SessionImplementor session, Object collection) { return new PersistentList( session, (List) collection ); }
@Override public PersistentCollection instantiateWrapper( Object key, PersistentCollectionDescriptor collectionDescriptor, SharedSessionContractImplementor session) { return new PersistentList( session, collectionDescriptor, key ); }
public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) { return new PersistentList(session); }
public PersistentCollection wrap(SessionImplementor session, Object collection) { return new PersistentList( session, (List) collection ); }
public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) { return new PersistentList(session); }
public PersistentList newInstance(ExtendedObjectInput in, String className) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException { PersistentCollectionSnapshot snapshot = new JMFPersistentCollectionSnapshot(null); snapshot.readInitializationData(in); return (snapshot.isInitialized() ? new PersistentList(null, new ArrayList<Object>()) : new PersistentList(null)); } }
/** * Tests that the Hibernate {@link PersistentList} can be serialized, but in way that * deserialized class will be java list and but not {@link PersistentList}. * * @throws SerializationException * SerializationException */ @Test public void hibernatePersistentList() throws SerializationException { PersistentList object = new PersistentList(); Object deserialized = serializeBackAndForth(object); assertThat(deserialized, is(not(instanceOf(PersistentList.class)))); assertThat(deserialized, is(instanceOf(List.class))); }
return persistentSet; } else if (detachedCollection instanceof List) { PersistentList persistentList = new PersistentList(null, (List<?>) detachedCollection); changeCollectionOwner(persistentList, owner); ArrayList<Object> snapshot = new ArrayList<>();
if (initialized) { List<?> list = ((ExternalizablePersistentList)value).getContentAsList(target); coll = new PersistentList(null, list); coll = new PersistentList();
clonedPropertyValue = (E) new PersistentList(