Java Code Examples for org.hibernate.persister.collection.CollectionPersister#getFactory()
The following examples show how to use
org.hibernate.persister.collection.CollectionPersister#getFactory() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: lams File: BatchingLoadQueryDetailsFactory.java License: GNU General Public License v2.0 | 6 votes |
/** * Constructs a BasicCollectionLoadQueryDetails object from the given inputs. * * @param collectionPersister The collection persister. * @param loadPlan The load plan. * @param buildingParameters And influencers that would affect the generated SQL (mostly we are concerned with those * that add additional joins here) * * @return The EntityLoadQueryDetails */ public LoadQueryDetails makeCollectionLoadQueryDetails( CollectionPersister collectionPersister, LoadPlan loadPlan, QueryBuildingParameters buildingParameters) { final CollectionReturn rootReturn = RootHelper.INSTANCE.extractRootReturn( loadPlan, CollectionReturn.class ); final AliasResolutionContextImpl aliasResolutionContext = new AliasResolutionContextImpl( collectionPersister.getFactory() ); return collectionPersister.isOneToMany() ? new OneToManyLoadQueryDetails( loadPlan, aliasResolutionContext, rootReturn, buildingParameters, collectionPersister.getFactory() ) : new BasicCollectionLoadQueryDetails( loadPlan, aliasResolutionContext, rootReturn, buildingParameters, collectionPersister.getFactory() ); }
Example 2
Source Project: cacheonix-core File: PersistentIndexedElementHolder.java License: GNU Lesser General Public License v2.1 | 6 votes |
public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner) throws HibernateException, SQLException { Object object = persister.readElement( rs, owner, descriptor.getSuffixedElementAliases(), getSession() ); final Type elementType = persister.getElementType(); final SessionFactoryImplementor factory = persister.getFactory(); String indexNode = getIndexAttributeName(persister); Element elem = element.addElement( persister.getElementNodeName() ); elementType.setToXMLNode( elem, object, factory ); final Type indexType = persister.getIndexType(); final Object indexValue = persister.readIndex( rs, descriptor.getSuffixedIndexAliases(), getSession() ); final String index = ( (NullableType) indexType ).toXMLString( indexValue, factory ); setIndex(elem, indexNode, index); return object; }
Example 3
Source Project: lams File: CollectionKey.java License: GNU General Public License v2.0 | 5 votes |
public CollectionKey(CollectionPersister persister, Serializable key) { this( persister.getRole(), key, persister.getKeyType(), persister.getOwnerEntityPersister().getEntityMetamodel().getEntityMode(), persister.getFactory() ); }
Example 4
Source Project: lams File: CollectionKey.java License: GNU General Public License v2.0 | 4 votes |
public CollectionKey(CollectionPersister persister, Serializable key, EntityMode em) { this( persister.getRole(), key, persister.getKeyType(), em, persister.getFactory() ); }
Example 5
Source Project: cacheonix-core File: CollectionKey.java License: GNU Lesser General Public License v2.1 | 4 votes |
public CollectionKey(CollectionPersister persister, Serializable key, EntityMode em) { this( persister.getRole(), key, persister.getKeyType(), em, persister.getFactory() ); }