|
|||||||||
| Home >> All >> org >> hibernate >> [ collection overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.hibernate.collection
Class PersistentArrayHolder

java.lang.Objectorg.hibernate.collection.AbstractPersistentCollection
org.hibernate.collection.PersistentArrayHolder
- All Implemented Interfaces:
- PersistentCollection, java.io.Serializable
- public class PersistentArrayHolder
- extends AbstractPersistentCollection
A persistent wrapper for an array. Lazy initialization is NOT supported. Use of Hibernate arrays is not really recommended.
| Nested Class Summary |
| Nested classes inherited from class org.hibernate.collection.AbstractPersistentCollection |
AbstractPersistentCollection.DelayedOperation, AbstractPersistentCollection.IteratorProxy, AbstractPersistentCollection.ListIteratorProxy, AbstractPersistentCollection.ListProxy, AbstractPersistentCollection.SetProxy |
| Field Summary | |
protected java.lang.Object |
array
|
private java.lang.Class |
elementClass
|
private static org.apache.commons.logging.Log |
log
|
private java.util.List |
tempList
|
| Fields inherited from class org.hibernate.collection.AbstractPersistentCollection |
UNKNOWN |
| Constructor Summary | |
PersistentArrayHolder(org.hibernate.engine.SessionImplementor session,
org.hibernate.persister.collection.CollectionPersister persister)
|
|
PersistentArrayHolder(org.hibernate.engine.SessionImplementor session,
java.lang.Object array)
|
|
| Method Summary | |
void |
beforeInitialize(org.hibernate.persister.collection.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 |
java.io.Serializable |
disassemble(org.hibernate.persister.collection.CollectionPersister persister)
Disassemble the collection, ready for the cache |
java.util.Iterator |
elements()
|
boolean |
empty()
Is the initialized collection empty? |
boolean |
endRead()
Called after reading all rows from the JDBC result set |
java.util.Iterator |
entries(org.hibernate.persister.collection.CollectionPersister persister)
Iterate all collection entries, during update of the database |
boolean |
entryExists(java.lang.Object entry,
int i)
Does an element exist at this entry in the collection? |
boolean |
equalsSnapshot(org.hibernate.persister.collection.CollectionPersister persister)
Does the current state exactly match the snapshot? |
java.lang.Object |
getArray()
|
java.util.Iterator |
getDeletes(org.hibernate.persister.collection.CollectionPersister persister,
boolean indexIsFormula)
Get all the elements that need deleting |
java.lang.Object |
getElement(java.lang.Object entry)
Get the value of the given collection entry |
java.lang.Object |
getIndex(java.lang.Object entry,
int i,
org.hibernate.persister.collection.CollectionPersister persister)
Get the index of the given collection entry |
java.util.Collection |
getOrphans(java.io.Serializable snapshot,
java.lang.String entityName)
get all "orphaned" elements |
java.io.Serializable |
getSnapshot(org.hibernate.persister.collection.CollectionPersister persister)
Return a new snapshot of the current state of the collection |
java.lang.Object |
getSnapshotElement(java.lang.Object entry,
int i)
Get the snapshot value of the given collection entry |
java.lang.Object |
getValue()
return the user-visible collection (or array) instance |
void |
initializeFromCache(org.hibernate.persister.collection.CollectionPersister persister,
java.io.Serializable disassembled,
java.lang.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 |
isSnapshotEmpty(java.io.Serializable snapshot)
Is the snapshot empty? |
boolean |
isWrapper(java.lang.Object collection)
Is this the wrapper for the given underlying collection instance? |
boolean |
needsInserting(java.lang.Object entry,
int i,
org.hibernate.type.Type elemType)
Do we need to insert this element? |
boolean |
needsUpdating(java.lang.Object entry,
int i,
org.hibernate.type.Type elemType)
Do we need to update this element? |
java.lang.Object |
readFrom(java.sql.ResultSet rs,
org.hibernate.persister.collection.CollectionPersister persister,
org.hibernate.loader.CollectionAliases descriptor,
java.lang.Object owner)
Read a row from the JDBC result set |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
array
protected java.lang.Object array
log
private static final org.apache.commons.logging.Log log
elementClass
private transient java.lang.Class elementClass
tempList
private transient java.util.List tempList
| Constructor Detail |
PersistentArrayHolder
public PersistentArrayHolder(org.hibernate.engine.SessionImplementor session, java.lang.Object array)
PersistentArrayHolder
public PersistentArrayHolder(org.hibernate.engine.SessionImplementor session, org.hibernate.persister.collection.CollectionPersister persister) throws org.hibernate.HibernateException
| Method Detail |
getSnapshot
public java.io.Serializable getSnapshot(org.hibernate.persister.collection.CollectionPersister persister) throws org.hibernate.HibernateException
- Description copied from interface:
PersistentCollection - Return a new snapshot of the current state of the collection
isSnapshotEmpty
public boolean isSnapshotEmpty(java.io.Serializable snapshot)
- Description copied from interface:
PersistentCollection - Is the snapshot empty?
getOrphans
public java.util.Collection getOrphans(java.io.Serializable snapshot, java.lang.String entityName) throws org.hibernate.HibernateException
- Description copied from class:
AbstractPersistentCollection - get all "orphaned" elements
- Specified by:
getOrphansin interfacePersistentCollection- Specified by:
getOrphansin classAbstractPersistentCollection
getArray
public java.lang.Object getArray()
isWrapper
public boolean isWrapper(java.lang.Object collection)
- Description copied from interface:
PersistentCollection - Is this the wrapper for the given underlying collection instance?
equalsSnapshot
public boolean equalsSnapshot(org.hibernate.persister.collection.CollectionPersister persister) throws org.hibernate.HibernateException
- Description copied from interface:
PersistentCollection - Does the current state exactly match the snapshot?
elements
public java.util.Iterator elements()
empty
public boolean empty()
- Description copied from class:
AbstractPersistentCollection - Is the initialized collection empty?
- Specified by:
emptyin interfacePersistentCollection- Specified by:
emptyin classAbstractPersistentCollection
readFrom
public java.lang.Object readFrom(java.sql.ResultSet rs, org.hibernate.persister.collection.CollectionPersister persister, org.hibernate.loader.CollectionAliases descriptor, java.lang.Object owner) throws org.hibernate.HibernateException, java.sql.SQLException
- Description copied from interface:
PersistentCollection - Read a row from the JDBC result set
entries
public java.util.Iterator entries(org.hibernate.persister.collection.CollectionPersister persister)
- Description copied from interface:
PersistentCollection - Iterate all collection entries, during update of the database
beginRead
public void beginRead()
- Description copied from class:
AbstractPersistentCollection - Called just before reading any rows from the JDBC result set
- Specified by:
beginReadin interfacePersistentCollection- Overrides:
beginReadin classAbstractPersistentCollection
endRead
public boolean endRead()
- Description copied from class:
AbstractPersistentCollection - Called after reading all rows from the JDBC result set
- Specified by:
endReadin interfacePersistentCollection- Overrides:
endReadin classAbstractPersistentCollection
beforeInitialize
public void beforeInitialize(org.hibernate.persister.collection.CollectionPersister persister)
- Description copied from interface:
PersistentCollection - Called before any elements are read into the collection,
allowing appropriate initializations to occur.
isDirectlyAccessible
public boolean isDirectlyAccessible()
- Description copied from class:
AbstractPersistentCollection - Could the application possibly have a direct reference to
the underlying collection implementation?
- Specified by:
isDirectlyAccessiblein interfacePersistentCollection- Overrides:
isDirectlyAccessiblein classAbstractPersistentCollection
initializeFromCache
public void initializeFromCache(org.hibernate.persister.collection.CollectionPersister persister, java.io.Serializable disassembled, java.lang.Object owner) throws org.hibernate.HibernateException
- Description copied from interface:
PersistentCollection - Read the state of the collection from a disassembled cached value
disassemble
public java.io.Serializable disassemble(org.hibernate.persister.collection.CollectionPersister persister) throws org.hibernate.HibernateException
- Description copied from interface:
PersistentCollection - Disassemble the collection, ready for the cache
getValue
public java.lang.Object getValue()
- Description copied from class:
AbstractPersistentCollection - return the user-visible collection (or array) instance
- Specified by:
getValuein interfacePersistentCollection- Overrides:
getValuein classAbstractPersistentCollection
getDeletes
public java.util.Iterator getDeletes(org.hibernate.persister.collection.CollectionPersister persister, boolean indexIsFormula) throws org.hibernate.HibernateException
- Description copied from interface:
PersistentCollection - Get all the elements that need deleting
needsInserting
public boolean needsInserting(java.lang.Object entry, int i, org.hibernate.type.Type elemType) throws org.hibernate.HibernateException
- Description copied from interface:
PersistentCollection - Do we need to insert this element?
needsUpdating
public boolean needsUpdating(java.lang.Object entry, int i, org.hibernate.type.Type elemType) throws org.hibernate.HibernateException
- Description copied from interface:
PersistentCollection - Do we need to update this element?
getIndex
public java.lang.Object getIndex(java.lang.Object entry, int i, org.hibernate.persister.collection.CollectionPersister persister)
- Description copied from interface:
PersistentCollection - Get the index of the given collection entry
getElement
public java.lang.Object getElement(java.lang.Object entry)
- Description copied from interface:
PersistentCollection - Get the value of the given collection entry
getSnapshotElement
public java.lang.Object getSnapshotElement(java.lang.Object entry, int i)
- Description copied from interface:
PersistentCollection - Get the snapshot value of the given collection entry
entryExists
public boolean entryExists(java.lang.Object entry, int i)
- Description copied from interface:
PersistentCollection - Does an element exist at this entry in the collection?
|
|||||||||
| Home >> All >> org >> hibernate >> [ collection overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC