Hibernate ORM JoinedIterable - 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 JoinedIterable class.

This code example shows how to use the following methods:
 */ 
public class JoinedIterableTest extends BaseUnitTestCase { 
	@Test
	public void testNullIterables() { 
		try { 
			new JoinedIterable<String>( null );
			fail(); 
		} 
		catch (NullPointerException ex) {
			// expected 
		} 
	} 
 
	@Test
	public void testSingleEmptyIterable() { 
		Set<String> emptyList = new HashSet<String>();
		List<Iterable<String>> iterableSets = new ArrayList<Iterable<String>>(  );
		iterableSets.add( emptyList );
		Iterable<String> iterable = new JoinedIterable<String>( iterableSets );
		assertFalse( iterable.iterator().hasNext() );
4
CodeRank
This code example shows how to use the following methods:
		Iterable<AttributeBinding> iterable;
		if ( superEntityBinding != null ) {
			List<Iterable<AttributeBinding>> iterables = new ArrayList<Iterable<AttributeBinding>>( 2 );
			iterables.add( superEntityBinding.getAttributeBindingClosure() );
			iterables.add( attributeBindings() );
			iterable = new JoinedIterable<AttributeBinding>( iterables );
		} 
		else { 
			iterable = attributeBindings();
		} 
		return iterable;
	} 
 
	/** 
	 * Gets the attribute bindings for this EntityBinding and all of its 
	 * sub-EntityBinding, starting from the root of the hierarchy; includes 
	 * the identifier and attribute bindings defined as part of a join. 
	 * @return 
	 */ 
	public Iterable<AttributeBinding> getSubEntityAttributeBindingClosure() {
3
CodeRank