站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 2.1.8 正式版 API 英文文档

BasicCollectionPersister (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档


net.sf.hibernate.collection
Class BasicCollectionPersister

java.lang.Object
  extended bynet.sf.hibernate.collection.AbstractCollectionPersister
      extended bynet.sf.hibernate.collection.BasicCollectionPersister
All Implemented Interfaces:
CollectionMetadata, CollectionPersister, Joinable, PropertyMapping, QueryableCollection

public class BasicCollectionPersister
extends AbstractCollectionPersister

Collection persister for collections of values and many-to-many associations.

Author:
Gavin King

Field Summary
 
Fields inherited from class net.sf.hibernate.collection.AbstractCollectionPersister
batchSize, elementColumnAliases, elementColumnNames, elementPersister, elementType, hasIdentifier, hasIndex, hasWhere, identifierColumnName, indexColumnAliases, indexColumnNames, keyColumnAliases, keyColumnNames, qualifiedTableName, rowSelectColumnNames, sqlWhereString
 
Constructor Summary
BasicCollectionPersister(Collection collection, Configuration cfg, SessionFactoryImplementor factory)
           
 
Method Summary
 boolean consumesAlias()
          Ugly, very ugly....
protected  CollectionInitializer createCollectionInitializer(SessionFactoryImplementor factory)
          Create the CollectionLoader
protected  int doUpdateRows(Serializable id, PersistentCollection collection, SessionImplementor session)
           
 String fromJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)
          Get the from clause part of any joins (optional operation)
protected  String generateDeleteRowString()
          Generate the SQL DELETE that deletes a particular row
protected  String generateDeleteString()
          Generate the SQL DELETE that deletes all rows
protected  String generateInsertRowString()
          Generate the SQL INSERT that creates a new row
protected  String generateUpdateRowString()
          Generate the SQL UPDATE that updates a row
 boolean isManyToMany()
          Is this instance actually a many-to-many association?
 boolean isOneToMany()
          Is this a one-to-many association?
 String selectFragment(String alias, String suffix, boolean includeCollectionColumns)
          All columns to select, when loading.
 String whereJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)
          Get the where clause part of any joins (optional operation)
 
Methods inherited from class net.sf.hibernate.collection.AbstractCollectionPersister
convert, deleteRows, enableJoinedFetch, getCache, getCollectionMetadata, getCollectionSpace, getCollectionType, getElementClass, getElementColumnNames, getElementPersister, getElementType, getIdentifierGenerator, getIdentifierType, getIndexColumnNames, getIndexType, getJoinKeyColumnNames, getKeyColumnNames, getKeyType, getName, getOwnerClass, getRole, getSQLDeleteRowString, getSQLDeleteString, getSQLInsertRowString, getSQLOrderByString, getSQLUpdateRowString, getSQLWhereString, getTableName, getType, hasCache, hasIndex, hasOrdering, hasOrphanDelete, hasWhere, initialize, insertRows, isArray, isCollection, isInverse, isLazy, isPrimitiveArray, readElement, readIdentifier, readIndex, readKey, recreate, remove, selectFragment, toColumns, toString, toType, updateRows, writeElement, writeIdentifier, writeIndex, writeKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicCollectionPersister

public BasicCollectionPersister(Collection collection,
                                Configuration cfg,
                                SessionFactoryImplementor factory)
                         throws MappingException,
                                CacheException
Method Detail

generateDeleteString

protected String generateDeleteString()
Generate the SQL DELETE that deletes all rows

Specified by:
generateDeleteString in class AbstractCollectionPersister

generateInsertRowString

protected String generateInsertRowString()
Generate the SQL INSERT that creates a new row

Specified by:
generateInsertRowString in class AbstractCollectionPersister

generateUpdateRowString

protected String generateUpdateRowString()
Generate the SQL UPDATE that updates a row

Specified by:
generateUpdateRowString in class AbstractCollectionPersister

generateDeleteRowString

protected String generateDeleteRowString()
Generate the SQL DELETE that deletes a particular row

Specified by:
generateDeleteRowString in class AbstractCollectionPersister

consumesAlias

public boolean consumesAlias()
Description copied from interface: Joinable
Ugly, very ugly....


isOneToMany

public boolean isOneToMany()
Description copied from interface: CollectionPersister
Is this a one-to-many association?


isManyToMany

public boolean isManyToMany()
Description copied from interface: Joinable
Is this instance actually a many-to-many association?


doUpdateRows

protected int doUpdateRows(Serializable id,
                           PersistentCollection collection,
                           SessionImplementor session)
                    throws HibernateException
Specified by:
doUpdateRows in class AbstractCollectionPersister
Throws:
HibernateException

createCollectionInitializer

protected CollectionInitializer createCollectionInitializer(SessionFactoryImplementor factory)
                                                     throws MappingException
Create the CollectionLoader

Specified by:
createCollectionInitializer in class AbstractCollectionPersister
Throws:
MappingException
See Also:
CollectionLoader

fromJoinFragment

public String fromJoinFragment(String alias,
                               boolean innerJoin,
                               boolean includeSubclasses)
Description copied from interface: Joinable
Get the from clause part of any joins (optional operation)


whereJoinFragment

public String whereJoinFragment(String alias,
                                boolean innerJoin,
                                boolean includeSubclasses)
Description copied from interface: Joinable
Get the where clause part of any joins (optional operation)


selectFragment

public String selectFragment(String alias,
                             String suffix,
                             boolean includeCollectionColumns)
Description copied from interface: Joinable
All columns to select, when loading.