/** * Instantiate a new "underlying" collection exhibiting the same capacity * charactersitcs and the passed "original". * * @param original The original collection. * @return The newly instantiated collection. */ protected Object instantiateResult(Object original) { // by default just use an unanticipated capacity since we don't // know how to extract the capacity to use from original here... return instantiate( -1 ); }
@Override public void beforeInitialize(CollectionPersister persister, int anticipatedSize) { this.map = (Map) persister.getCollectionType().instantiate( anticipatedSize ); }
@Override public void beforeInitialize(CollectionPersister persister, int anticipatedSize) { this.bag = (List) persister.getCollectionType().instantiate( anticipatedSize ); }
@Override public void beforeInitialize(CollectionPersister persister, int anticipatedSize) { this.set = (Set) persister.getCollectionType().instantiate( anticipatedSize ); }
@Override public void beforeInitialize(CollectionPersister persister, int anticipatedSize) { this.list = (List) persister.getCollectionType().instantiate( anticipatedSize ); }
collection = instantiate( session, persister, key );
collection = persister.getCollectionType().instantiate( loadContexts.getPersistenceContext().getSession(), persister, key );
PersistentCollection collection = session.getPersistenceContext().getCollection( new CollectionKey( persister, key ) ); if ( collection == null ) { collection = collectionType.instantiate( session, persister, key ); collection.setOwner( entity ); session.getPersistenceContext().addUninitializedCollection( persister, collection, key );
/** * Instantiate a new "underlying" collection exhibiting the same capacity * charactersitcs and the passed "original". * * @param original The original collection. * @return The newly instantiated collection. */ protected Object instantiateResult(Object original) { // by default just use an unanticipated capacity since we don't // know how to extract the capacity to use from original here... return instantiate( -1 ); }
/** * Instantiate a new "underlying" collection exhibiting the same capacity * charactersitcs and the passed "original". * * @param original The original collection. * @return The newly instantiated collection. */ protected Object instantiateResult(Object original) { // by default just use an unanticipated capacity since we don't // know how to extract the capacity to use from original here... return instantiate( -1 ); }
public void beforeInitialize(CollectionPersister persister, int anticipatedSize) { this.set = ( Set ) persister.getCollectionType().instantiate( anticipatedSize ); }
public void beforeInitialize(CollectionPersister persister, int anticipatedSize) { this.set = ( Set ) persister.getCollectionType().instantiate( anticipatedSize ); }
public void beforeInitialize(CollectionPersister persister, int anticipatedSize) { this.list = ( List ) persister.getCollectionType().instantiate( anticipatedSize ); }
public void beforeInitialize(CollectionPersister persister, int anticipatedSize) { this.bag = ( List ) persister.getCollectionType().instantiate( anticipatedSize ); }
public void beforeInitialize(CollectionPersister persister, int anticipatedSize) { this.map = ( Map ) persister.getCollectionType().instantiate( anticipatedSize ); }
public void beforeInitialize(CollectionPersister persister, int anticipatedSize) { this.bag = ( List ) persister.getCollectionType().instantiate( anticipatedSize ); }
public void beforeInitialize(CollectionPersister persister, int anticipatedSize) { this.map = ( Map ) persister.getCollectionType().instantiate( anticipatedSize ); }
@SuppressWarnings("unchecked") @Override public void beforeInitialize(CollectionPersister persister, int anticipatedSize) { Object instantiate = persister.getCollectionType().instantiate(anticipatedSize); if (!(instantiate instanceof MASet<?>)) { throw new IllegalProgramException( CommonMessages.illegalInstantiate( persister.getCollectionType().getClass(), MASet.class ) ); } this.setBase((MASet<E>)instantiate); }
@SuppressWarnings("unchecked") @Override public void beforeInitialize(CollectionPersister persister, int anticipatedSize) { Object instantiate = persister.getCollectionType().instantiate(anticipatedSize); if (!(instantiate instanceof MAList<?>)) { throw new IllegalProgramException( CommonMessages.illegalInstantiate( persister.getCollectionType().getClass(), MAList.class ) ); } this.initBase((MAList<E>)instantiate); }
@Override public PersistentCollection instantiate(final SessionImplementor session, final CollectionPersister persister) { final org.hibernate.engine.spi.SessionImplementor sessionV5 = (org.hibernate.engine.spi.SessionImplementor) HibernateBridge.get(session.getFactory()).getV5Session(session); return PersistentCollectionV2Adapter.adapt( type.instantiate(sessionV5, CollectionPersisterV5Adapter.adapt(persister, sessionV5.getFactory()), null)); }