|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sf.hibernate.collection.PersistentCollection
net.sf.hibernate.collection.ArrayHolder
A persistent wrapper for an array. Lazy initialization is NOT supported. Use of Hibernate arrays is not really recommended.
| Constructor Summary | |
ArrayHolder(SessionImplementor session,
CollectionPersister persister)
|
|
ArrayHolder(SessionImplementor session,
Object array)
|
|
| Method Summary | |
void |
beforeInitialize(CollectionPersister persister)
Called before any elements are read into the collection, allowing appropriate initializations to occur. |
void |
beginRead()
Called just before reading any rows from the JDBC result set |
Serializable |
disassemble(CollectionPersister persister)
Disassemble the collection, ready for the cache |
Iterator |
elements()
|
boolean |
empty()
Is the initialized collection empty? |
boolean |
endRead()
Called after reading all rows from the JDBC result set |
Iterator |
entries()
Iterate all collection entries, during update of the database |
boolean |
entryExists(Object entry,
int i)
Does an element exist at this entry in the collection? |
boolean |
equalsSnapshot(Type elementType)
Does the current state exactly match the snapshot? |
Object |
getArray()
|
Iterator |
getDeletes(Type elemType)
Get all the elements that need deleting |
Object |
getIndex(Object entry,
int i)
Get the index of the given collection entry |
Collection |
getOrphans(Serializable snapshot)
get all "orphaned" elements |
Object |
getValue()
return the user-visible collection (or array) instance |
void |
initializeFromCache(CollectionPersister persister,
Serializable disassembled,
Object owner)
Read the state of the collection from a disassembled cached value |
boolean |
isDirectlyAccessible()
Could the application possibly have a direct reference to the underlying collection implementation? |
boolean |
isWrapper(Object collection)
Is this the wrapper for the given underlying collection instance? |
boolean |
needsInserting(Object entry,
int i,
Type elemType)
Do we need to insert this element? |
boolean |
needsUpdating(Object entry,
int i,
Type elemType)
Do we need to update this element? |
Object |
readFrom(ResultSet rs,
CollectionPersister persister,
Object owner)
Read a row from the JDBC result set |
protected Serializable |
snapshot(CollectionPersister persister)
Return a new snapshot of the current state |
void |
writeTo(PreparedStatement st,
CollectionPersister persister,
Object entry,
int i,
boolean writeOrder)
Write a row to the JDBC prepared statement |
| Methods inherited from class net.sf.hibernate.collection.PersistentCollection |
afterRowInsert, delayedAddAll, forceInitialization, getCollectionSnapshot, getOrphans, getSession, getSnapshot, getSnapshot, hasQueuedAdditions, initialize, needsRecreate, postFlush, preInsert, queueAdd, queueAddAll, queuedAdditionIterator, read, setCollectionSnapshot, setCurrentSession, setDirectlyAccessible, setInitialized, unsetSession, wasInitialized, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ArrayHolder(SessionImplementor session, Object array)
public ArrayHolder(SessionImplementor session, CollectionPersister persister) throws HibernateException
| Method Detail |
protected Serializable snapshot(CollectionPersister persister) throws HibernateException
PersistentCollection
snapshot in class PersistentCollectionHibernateExceptionpublic Collection getOrphans(Serializable snapshot) throws HibernateException
PersistentCollection
getOrphans in class PersistentCollectionHibernateExceptionpublic Object getArray()
public boolean isWrapper(Object collection)
PersistentCollection
isWrapper in class PersistentCollectionpublic boolean equalsSnapshot(Type elementType) throws HibernateException
PersistentCollection
equalsSnapshot in class PersistentCollectionHibernateExceptionpublic Iterator elements()
PersistentCollection.entries()public boolean empty()
PersistentCollection
empty in class PersistentCollectionpublic void writeTo(PreparedStatement st, CollectionPersister persister, Object entry, int i, boolean writeOrder) throws HibernateException, SQLException
PersistentCollection
writeTo in class PersistentCollectionpublic Object readFrom(ResultSet rs, CollectionPersister persister, Object owner) throws HibernateException, SQLException
PersistentCollection
readFrom in class PersistentCollectionpublic Iterator entries()
PersistentCollection
entries in class PersistentCollectionPersistentCollection.entries()public void beginRead()
PersistentCollection
beginRead in class PersistentCollectionpublic boolean endRead()
PersistentCollection
endRead in class PersistentCollectionpublic void beforeInitialize(CollectionPersister persister)
PersistentCollection
beforeInitialize in class PersistentCollectionpublic boolean isDirectlyAccessible()
PersistentCollection
isDirectlyAccessible in class PersistentCollectionpublic void initializeFromCache(CollectionPersister persister, Serializable disassembled, Object owner) throws HibernateException
PersistentCollection
initializeFromCache in class PersistentCollectionHibernateExceptionpublic Serializable disassemble(CollectionPersister persister) throws HibernateException
PersistentCollection
disassemble in class PersistentCollectionHibernateExceptionpublic Object getValue()
PersistentCollection
getValue in class PersistentCollectionpublic Iterator getDeletes(Type elemType) throws HibernateException
PersistentCollection
getDeletes in class PersistentCollectionHibernateExceptionpublic boolean needsInserting(Object entry, int i, Type elemType) throws HibernateException
PersistentCollection
needsInserting in class PersistentCollectionHibernateExceptionpublic boolean needsUpdating(Object entry, int i, Type elemType) throws HibernateException
PersistentCollection
needsUpdating in class PersistentCollectionHibernateExceptionpublic Object getIndex(Object entry, int i)
PersistentCollection
getIndex in class PersistentCollectionpublic boolean entryExists(Object entry, int i)
PersistentCollection
entryExists in class PersistentCollection
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||