|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.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 PersistentCollection
HibernateException
public Collection getOrphans(Serializable snapshot) throws HibernateException
PersistentCollection
getOrphans
in class PersistentCollection
HibernateException
public Object getArray()
public boolean isWrapper(Object collection)
PersistentCollection
isWrapper
in class PersistentCollection
public boolean equalsSnapshot(Type elementType) throws HibernateException
PersistentCollection
equalsSnapshot
in class PersistentCollection
HibernateException
public Iterator elements()
PersistentCollection.entries()
public boolean empty()
PersistentCollection
empty
in class PersistentCollection
public void writeTo(PreparedStatement st, CollectionPersister persister, Object entry, int i, boolean writeOrder) throws HibernateException, SQLException
PersistentCollection
writeTo
in class PersistentCollection
public Object readFrom(ResultSet rs, CollectionPersister persister, Object owner) throws HibernateException, SQLException
PersistentCollection
readFrom
in class PersistentCollection
public Iterator entries()
PersistentCollection
entries
in class PersistentCollection
PersistentCollection.entries()
public void beginRead()
PersistentCollection
beginRead
in class PersistentCollection
public boolean endRead()
PersistentCollection
endRead
in class PersistentCollection
public void beforeInitialize(CollectionPersister persister)
PersistentCollection
beforeInitialize
in class PersistentCollection
public boolean isDirectlyAccessible()
PersistentCollection
isDirectlyAccessible
in class PersistentCollection
public void initializeFromCache(CollectionPersister persister, Serializable disassembled, Object owner) throws HibernateException
PersistentCollection
initializeFromCache
in class PersistentCollection
HibernateException
public Serializable disassemble(CollectionPersister persister) throws HibernateException
PersistentCollection
disassemble
in class PersistentCollection
HibernateException
public Object getValue()
PersistentCollection
getValue
in class PersistentCollection
public Iterator getDeletes(Type elemType) throws HibernateException
PersistentCollection
getDeletes
in class PersistentCollection
HibernateException
public boolean needsInserting(Object entry, int i, Type elemType) throws HibernateException
PersistentCollection
needsInserting
in class PersistentCollection
HibernateException
public boolean needsUpdating(Object entry, int i, Type elemType) throws HibernateException
PersistentCollection
needsUpdating
in class PersistentCollection
HibernateException
public Object getIndex(Object entry, int i)
PersistentCollection
getIndex
in class PersistentCollection
public 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 |