public PersistentIndexedElementHolder(SessionImplementor session, Element element) { super(session); this.element = element; setInitialized(); }
public PersistentCollection instantiate( SessionImplementor session, CollectionPersister persister, Serializable key) throws HibernateException { return new PersistentIdentifierBag(session); }
public PersistentList(SessionImplementor session, List list) { super(session); this.list = list; setInitialized(); setDirectlyAccessible(true); }
public void assemble( final PersistentCollection collection, final CollectionPersister persister, final Object owner ) { collection.initializeFromCache(persister, state, owner); collection.afterInitialize(); }
/** * @see java.util.List#iterator() */ public Iterator iterator() { read(); return new IteratorProxy( list.iterator() ); }
public PersistentCollection wrap(SessionImplementor session, Object collection) { if ( session.getEntityMode()==EntityMode.DOM4J ) { return new PersistentListElementHolder( session, (Element) collection ); } else { return new PersistentList( session, (List) collection ); } }
public PersistentCollection wrap(SessionImplementor session, Object collection) { if ( session.getEntityMode()==EntityMode.DOM4J ) { return new PersistentElementHolder( session, (Element) collection ); } else { return new PersistentSortedMap( session, (java.util.SortedMap) collection ); } }
public PersistentCollection wrap(SessionImplementor session, Object collection) { if ( session.getEntityMode()==EntityMode.DOM4J ) { return new PersistentMapElementHolder( session, (Element) collection ); } else { return new PersistentMap( session, (java.util.Map) collection ); } }
/** * Called by any writer method of the collection interface */ protected final void write() { initialize(true); dirty(); } /**
/** * Is this collection in a state that would allow us to * "queue" puts? This is a special case, because of orphan * delete. */ protected boolean isPutQueueEnabled() { return !initialized && isConnectedToSession() && isInverseOneToManyOrNoOrphanDelete(); } /**
public PersistentSet(SessionImplementor session, java.util.Set set) { super(session); // Sets can be just a view of a part of another collection. // do we need to copy it to be sure it won't be changing // underneath us? // ie. this.set.addAll(set); this.set = set; setInitialized(); setDirectlyAccessible(true); }
/** * @see java.util.Set#iterator() */ public Iterator iterator() { read(); return new IteratorProxy( set.iterator() ); }
/** * Called after reading all rows from the JDBC result set */ public boolean endRead() { //override on some subclasses return afterInitialize(); }
/** * @see java.util.Map#entrySet() */ public Set entrySet() { read(); return new EntrySetProxy( map.entrySet() ); }
/** * @see java.util.Set#iterator() */ public Iterator iterator() { read(); return new IteratorProxy( set.iterator() ); }
/** * @see java.util.Map#get(Object) */ public Object get(Object key) { Object result = readElementByIndex(key); return result==UNKNOWN ? map.get(key) : result; }
/** * Return a new snapshot of the current state of the collection, * or null if no persister is passed */ public final Serializable getSnapshot(CollectionPersister persister) throws HibernateException { return (persister==null) ? null : snapshot(persister); }
/** * Called after reading all rows from the JDBC result set */ public boolean endRead() { //override on some subclasses return afterInitialize(); }