@Override public PersistentCollection instantiate(SharedSessionContractImplementor session, CollectionPersister persister, Serializable key) throws HibernateException { return new PersistentBag( session ); }
@Override public PersistentCollection wrap(SharedSessionContractImplementor session, Object collection) { return new PersistentBag( session, (Collection) collection ); }
@Override @SuppressWarnings("unchecked") public <E> PersistentCollection<E> instantiateWrapper( Object key, PersistentCollectionDescriptor<?, Collection<?>, E> collectionDescriptor, SharedSessionContractImplementor session) { return new PersistentBag( session, collectionDescriptor ); }
@Override @SuppressWarnings("unchecked") public <E> PersistentCollection<E> wrap( Collection<?> rawCollection, PersistentCollectionDescriptor<?, Collection<?>, E> collectionDescriptor, SharedSessionContractImplementor session) { return new PersistentBag( session, collectionDescriptor, rawCollection ); }
public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) throws HibernateException { return new PersistentBag(session); }
public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister, Serializable key) throws HibernateException { return new PersistentBag(session); }
public PersistentCollection wrap(SessionImplementor session, Object collection) { return new PersistentBag( session, (Collection) collection ); }
public PersistentCollection wrap(SessionImplementor session, Object collection) { return new PersistentBag( session, (Collection) collection ); }
public Object create(Kryo kryo, Input input, Class type) { return (new PersistentBag( (SharedSessionContractImplementor) entityManager.unwrap(Session.class))); } });
public PersistentBag 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 PersistentBag(null, new ArrayList<Object>()) : new PersistentBag(null)); } }
if (initialized) { List<?> bag = ((ExternalizablePersistentBag)value).getContentAsList(target); coll = new PersistentBag(null, bag); coll = new PersistentBag();