Java Code Examples for org.hibernate.persister.collection.CollectionPersister#isOneToMany()

The following examples show how to use org.hibernate.persister.collection.CollectionPersister#isOneToMany() . 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
/**
 * 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: lams   File: PersistentBag.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public boolean needsRecreate(CollectionPersister persister) {
	return !persister.isOneToMany();
}
 
Example 3
public boolean needsRecreate(CollectionPersister persister) {
	return !persister.isOneToMany();
}