1 package org.hibernate.collection; 3 4 import java.io.Serializable ; 5 import java.sql.ResultSet ; 6 import java.sql.SQLException ; 7 import java.util.Collection ; 8 import java.util.Iterator ; 9 10 import org.hibernate.HibernateException; 11 import org.hibernate.engine.SessionImplementor; 12 import org.hibernate.loader.CollectionAliases; 13 import org.hibernate.persister.collection.CollectionPersister; 14 import org.hibernate.type.Type; 15 16 43 public interface PersistentCollection { 44 45 50 public Object getOwner(); 51 54 public void setOwner(Object entity); 55 56 59 public boolean empty(); 60 61 64 public void setSnapshot(Serializable key, String role, Serializable snapshot); 65 66 70 public void postAction(); 71 72 75 public Object getValue(); 76 77 80 public void beginRead(); 81 82 85 public boolean endRead(); 86 87 90 public boolean afterInitialize(); 91 92 96 public boolean isDirectlyAccessible(); 97 98 102 public boolean unsetSession(SessionImplementor currentSession); 103 104 110 public boolean setCurrentSession(SessionImplementor session) 111 throws HibernateException; 112 113 116 public void initializeFromCache(CollectionPersister persister, 117 Serializable disassembled, Object owner) throws HibernateException; 118 119 122 public Iterator entries(CollectionPersister persister); 123 124 127 public Object readFrom(ResultSet rs, CollectionPersister role, CollectionAliases descriptor, Object owner) 128 throws HibernateException, SQLException ; 129 130 133 public Object getIdentifier(Object entry, int i); 134 135 139 public Object getIndex(Object entry, int i, CollectionPersister persister); 140 141 144 public Object getElement(Object entry); 145 146 149 public Object getSnapshotElement(Object entry, int i); 150 151 155 public void beforeInitialize(CollectionPersister persister); 156 157 160 public boolean equalsSnapshot(CollectionPersister persister) 161 throws HibernateException; 162 163 166 public boolean isSnapshotEmpty(Serializable snapshot); 167 168 171 public Serializable disassemble(CollectionPersister persister) 172 throws HibernateException; 173 174 177 public boolean needsRecreate(CollectionPersister persister); 178 179 182 public Serializable getSnapshot(CollectionPersister persister) 183 throws HibernateException; 184 185 189 public void forceInitialization() throws HibernateException; 190 191 194 public boolean entryExists(Object entry, int i); 196 199 public boolean needsInserting(Object entry, int i, Type elemType) 200 throws HibernateException; 201 202 205 public boolean needsUpdating(Object entry, int i, Type elemType) 206 throws HibernateException; 207 208 public boolean isRowUpdatePossible(); 209 210 213 public Iterator getDeletes(CollectionPersister persister, boolean indexIsFormula) 214 throws HibernateException; 215 216 219 public boolean isWrapper(Object collection); 220 221 224 public boolean wasInitialized(); 225 226 229 public boolean hasQueuedAdditions(); 230 231 234 public Iterator queuedAdditionIterator(); 235 236 239 public Serializable getKey(); 240 241 244 public String getRole(); 245 246 249 public boolean isUnreferenced(); 250 251 257 public boolean isDirty(); 258 259 263 public void clearDirty(); 264 265 269 public Serializable getStoredSnapshot(); 270 271 274 public void dirty(); 275 276 280 public void preInsert(CollectionPersister persister) 281 throws HibernateException; 282 283 286 public void afterRowInsert(CollectionPersister persister, Object entry, int i) 287 throws HibernateException; 288 289 292 public Collection getOrphans(Serializable snapshot, String entityName) 293 throws HibernateException; 294 295 } | Popular Tags |