public class

OneToManyPersister

extends AbstractCollectionPersister
java.lang.Object
   ↳ org.hibernate.persister.collection.AbstractCollectionPersister
     ↳ org.hibernate.persister.collection.OneToManyPersister

Class Overview

Collection persister for one-to-many associations.

Summary

[Expand]
Inherited Fields
From class org.hibernate.persister.collection.AbstractCollectionPersister
Public Constructors
OneToManyPersister(Collection collection, CollectionRegionAccessStrategy cacheAccessStrategy, Configuration cfg, SessionFactoryImplementor factory)
Public Methods
boolean consumesCollectionAlias()
boolean consumesEntityAlias()
String filterFragment(String alias)
String fromJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)
Object getElementByIndex(Serializable key, Object index, SessionImplementor session, Object owner)
String getTableName()
The table to join to.
boolean isCascadeDeleteEnabled()
boolean isManyToMany()
Is this a many-to-many association? Note that this is mainly a convenience feature as the single persister does not conatin all the information needed to handle a many-to-many itself, as internally it is looked at as two many-to-ones.
boolean isOneToMany()
String selectFragment(Joinable rhs, String rhsAlias, String lhsAlias, String entitySuffix, String collectionSuffix, boolean includeCollectionColumns)
String whereJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)
Protected Methods
CollectionInitializer createCollectionInitializer(LoadQueryInfluencers loadQueryInfluencers)
Create the OneToManyLoader
CollectionInitializer createSubselectInitializer(SubselectFetch subselect, SessionImplementor session)
int doUpdateRows(Serializable id, PersistentCollection collection, SessionImplementor session)
String generateDeleteRowString()
Generate the SQL UPDATE that updates a particular row's foreign key to null
String generateDeleteString()
Generate the SQL UPDATE that updates all the foreign keys to null
String generateInsertRowString()
Generate the SQL UPDATE that updates a foreign key to a value
String generateUpdateRowString()
Not needed for one-to-many association
boolean isRowDeleteEnabled()
boolean isRowInsertEnabled()
[Expand]
Inherited Methods
From class org.hibernate.persister.collection.AbstractCollectionPersister
From class java.lang.Object
From interface org.hibernate.metadata.CollectionMetadata
From interface org.hibernate.persister.collection.CollectionPersister
From interface org.hibernate.persister.collection.QueryableCollection
From interface org.hibernate.persister.collection.SQLLoadableCollection
From interface org.hibernate.persister.entity.Joinable
From interface org.hibernate.persister.entity.PropertyMapping

Public Constructors

public OneToManyPersister (Collection collection, CollectionRegionAccessStrategy cacheAccessStrategy, Configuration cfg, SessionFactoryImplementor factory)

Public Methods

public boolean consumesCollectionAlias ()

public boolean consumesEntityAlias ()

public String filterFragment (String alias)

public String fromJoinFragment (String alias, boolean innerJoin, boolean includeSubclasses)

public Object getElementByIndex (Serializable key, Object index, SessionImplementor session, Object owner)

public String getTableName ()

The table to join to.

public boolean isCascadeDeleteEnabled ()

public boolean isManyToMany ()

Is this a many-to-many association? Note that this is mainly a convenience feature as the single persister does not conatin all the information needed to handle a many-to-many itself, as internally it is looked at as two many-to-ones.

public boolean isOneToMany ()

public String selectFragment (Joinable rhs, String rhsAlias, String lhsAlias, String entitySuffix, String collectionSuffix, boolean includeCollectionColumns)

public String whereJoinFragment (String alias, boolean innerJoin, boolean includeSubclasses)

Protected Methods

protected CollectionInitializer createCollectionInitializer (LoadQueryInfluencers loadQueryInfluencers)

Create the OneToManyLoader

See Also

protected CollectionInitializer createSubselectInitializer (SubselectFetch subselect, SessionImplementor session)

protected int doUpdateRows (Serializable id, PersistentCollection collection, SessionImplementor session)

protected String generateDeleteRowString ()

Generate the SQL UPDATE that updates a particular row's foreign key to null

protected String generateDeleteString ()

Generate the SQL UPDATE that updates all the foreign keys to null

protected String generateInsertRowString ()

Generate the SQL UPDATE that updates a foreign key to a value

protected String generateUpdateRowString ()

Not needed for one-to-many association

protected boolean isRowDeleteEnabled ()

protected boolean isRowInsertEnabled ()