Hibernate ORM QueryableCollection - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM QueryableCollection class.

This code example shows how to use the following methods:getCollectionType, getElementType, hasIndex, isOneToMany, getElementColumnNames
	private void prepareForIndex(QueryTranslatorImpl q) throws QueryException {
 
		QueryableCollection collPersister = q.getCollectionPersister( collectionRole );
 
		if ( !collPersister.hasIndex() ) throw new QueryException( "unindexed collection before []: " + path );
		String[] indexCols = collPersister.getIndexColumnNames();
		if ( indexCols.length != 1 ) throw new QueryException( "composite-index appears in []: " + path );
		//String[] keyCols = collPersister.getKeyColumnNames(); 
 
		JoinSequence fromJoins = new JoinSequence( q.getFactory() )
				.setUseThetaStyle( useThetaStyleJoin )
				.setRoot( collPersister, collectionName )
				.setNext( joinSequence.copy() );
 
		if ( !continuation ) addJoin( collectionName, collPersister.getCollectionType() );
 
		joinSequence.addCondition( collectionName + '.' + indexCols[0] + " = " ); //TODO: get SQL rendering out of here
 
		CollectionElement elem = new CollectionElement();
		elem.elementColumns = collPersister.getElementColumnNames(collectionName);

6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getElementType, getRole
See Code Examples for Hibernate ORM QueryableCollection Methods: