1 package org.hibernate.persister.collection; 3 4 import java.io.Serializable ; 5 import java.sql.ResultSet ; 6 import java.sql.SQLException ; 7 import java.util.Map ; 8 9 import org.hibernate.HibernateException; 10 import org.hibernate.MappingException; 11 import org.hibernate.cache.CacheConcurrencyStrategy; 12 import org.hibernate.cache.entry.CacheEntryStructure; 13 import org.hibernate.collection.PersistentCollection; 14 import org.hibernate.engine.SessionFactoryImplementor; 15 import org.hibernate.engine.SessionImplementor; 16 import org.hibernate.id.IdentifierGenerator; 17 import org.hibernate.metadata.CollectionMetadata; 18 import org.hibernate.persister.entity.EntityPersister; 19 import org.hibernate.type.CollectionType; 20 import org.hibernate.type.Type; 21 22 41 public interface CollectionPersister { 42 45 public void initialize(Serializable key, SessionImplementor session) throws HibernateException; 47 50 public CacheConcurrencyStrategy getCache(); 51 54 public boolean hasCache(); 55 58 public CacheEntryStructure getCacheEntryStructure(); 59 62 public CollectionType getCollectionType(); 63 66 public Type getKeyType(); 67 70 public Type getIndexType(); 71 74 public Type getElementType(); 75 78 public Class getElementClass(); 79 82 public Object readKey(ResultSet rs, String [] keyAliases, SessionImplementor session) 83 throws HibernateException, SQLException ; 84 87 public Object readElement( 88 ResultSet rs, 89 Object owner, 90 String [] columnAliases, 91 SessionImplementor session) 92 throws HibernateException, SQLException ; 93 96 public Object readIndex(ResultSet rs, String [] columnAliases, SessionImplementor session) 97 throws HibernateException, SQLException ; 98 101 public Object readIdentifier( 102 ResultSet rs, 103 String columnAlias, 104 SessionImplementor session) 105 throws HibernateException, SQLException ; 106 109 public boolean isPrimitiveArray(); 110 113 public boolean isArray(); 114 117 public boolean isOneToMany(); 118 124 public boolean isManyToMany(); 125 126 public String getManyToManyFilterFragment(String alias, Map enabledFilters); 127 128 131 public boolean hasIndex(); 132 135 public boolean isLazy(); 136 140 public boolean isInverse(); 141 144 public void remove(Serializable id, SessionImplementor session) 145 throws HibernateException; 146 149 public void recreate( 150 PersistentCollection collection, 151 Serializable key, 152 SessionImplementor session) 153 throws HibernateException; 154 158 public void deleteRows( 159 PersistentCollection collection, 160 Serializable key, 161 SessionImplementor session) 162 throws HibernateException; 163 166 public void updateRows( 167 PersistentCollection collection, 168 Serializable key, 169 SessionImplementor session) 170 throws HibernateException; 171 174 public void insertRows( 175 PersistentCollection collection, 176 Serializable key, 177 SessionImplementor session) 178 throws HibernateException; 179 183 public String getRole(); 184 187 public EntityPersister getOwnerEntityPersister(); 188 191 public IdentifierGenerator getIdentifierGenerator(); 192 195 public Type getIdentifierType(); 196 199 public boolean hasOrphanDelete(); 200 205 public boolean hasOrdering(); 206 209 public Serializable [] getCollectionSpaces(); 210 211 public CollectionMetadata getCollectionMetadata(); 212 213 217 public abstract boolean isCascadeDeleteEnabled(); 218 219 223 public boolean isVersioned(); 224 225 228 public boolean isMutable(); 229 230 232 public String getNodeName(); 233 234 public String getElementNodeName(); 235 236 public String getIndexNodeName(); 237 238 public void postInstantiate() throws MappingException; 239 240 public SessionFactoryImplementor getFactory(); 241 242 public boolean isAffectedByEnabledFilters(SessionImplementor session); 243 244 251 public String [] getKeyColumnAliases(String suffix); 252 253 260 public String [] getIndexColumnAliases(String suffix); 261 262 269 public String [] getElementColumnAliases(String suffix); 270 271 278 public String getIdentifierColumnAlias(String suffix); 279 } 280 | Popular Tags |