@SuppressWarnings("SimplifiableIfStatement") private boolean isManyToManyRoot(Joinable joinable) { if ( joinable != null && joinable.isCollection() ) { return ( (QueryableCollection) joinable ).isManyToMany(); } return false; }
public boolean isManyToManyWith(OuterJoinableAssociation other) { if ( joinable.isCollection() ) { QueryableCollection persister = (QueryableCollection) joinable; if ( persister.isManyToMany() ) { return persister.getElementType() == other.getJoinableType(); } } return false; }
@Override public AssociationNature getAssociationNature() { if ( getType().isAnyType() ) { return AssociationNature.ANY; } else { if ( getJoinable().isCollection() ) { return AssociationNature.COLLECTION; } else { return AssociationNature.ENTITY; } } }
/** * Count the number of instances of Joinable which are actually * also instances of PersistentCollection which are being fetched * by outer join */ protected static int countCollectionPersisters(List associations) throws MappingException { int result = 0; for ( Object association : associations ) { final OuterJoinableAssociation oj = (OuterJoinableAssociation) association; if ( oj.getJoinType() == JoinType.LEFT_OUTER_JOIN && oj.getJoinable().isCollection() && !oj.hasRestriction() ) { result++; } } return result; }
OuterJoinableAssociation oj = (OuterJoinableAssociation) iter.next(); if ( oj.getJoinType() == JoinType.LEFT_OUTER_JOIN ) { // why does this matter? if ( oj.getJoinable().isCollection() ) { final QueryableCollection queryableCollection = (QueryableCollection) oj.getJoinable(); if ( queryableCollection.hasOrdering() ) { if ( last != null && last.getJoinable().isCollection() ) { final QueryableCollection queryableCollection = (QueryableCollection) last.getJoinable(); if ( queryableCollection.isManyToMany() && last.isManyToManyWith( oj ) ) {
public String selectFragment( Joinable rhs, String rhsAlias, String lhsAlias, String entitySuffix, String collectionSuffix, boolean includeCollectionColumns) { // we need to determine the best way to know that two joinables // represent a single many-to-many... if ( rhs != null && isManyToMany() && !rhs.isCollection() ) { AssociationType elementType = ( (AssociationType) getElementType() ); if ( rhs.equals( elementType.getAssociatedJoinable( getFactory() ) ) ) { return manyToManySelectFragment( rhs, rhsAlias, lhsAlias, collectionSuffix ); } } return includeCollectionColumns ? selectFragment( lhsAlias, collectionSuffix ) : ""; }
if ( !checkForSqlAlias && joinable.isCollection() ) {
if ( !joinable.isCollection() ) { if ( joinable instanceof OuterJoinLoadable ) { walkEntityTree(
final String[] lhsColumnNames; if ( joinable.isCollection() ) { final QueryableCollection collectionPersister = (QueryableCollection) joinable; lhsTableName = collectionPersister.getTableName();
@Override public boolean isCollection() { return joinable.isCollection(); }
private boolean isManyToManyRoot(Joinable joinable) { if ( joinable != null && joinable.isCollection() ) { QueryableCollection persister = ( QueryableCollection ) joinable; return persister.isManyToMany(); } return false; }
private boolean isManyToManyRoot(Joinable joinable) { if ( joinable != null && joinable.isCollection() ) { QueryableCollection persister = ( QueryableCollection ) joinable; return persister.isManyToMany(); } return false; }
private boolean isManyToManyRoot(Joinable joinable) { if ( joinable != null && joinable.isCollection() ) { QueryableCollection persister = ( QueryableCollection ) joinable; return persister.isManyToMany(); } return false; }
private boolean isManyToManyRoot(Joinable joinable) { if ( joinable != null && joinable.isCollection() ) { QueryableCollection persister = ( QueryableCollection ) joinable; return persister.isManyToMany(); } return false; }
/** * Count the number of instances of Joinable which are actually * also instances of PersistentCollection which are being fetched * by outer join */ protected static final int countCollectionPersisters(List associations) throws MappingException { int result = 0; Iterator iter = associations.iterator(); while ( iter.hasNext() ) { OuterJoinableAssociation oj = (OuterJoinableAssociation) iter.next(); if ( oj.getJoinType()==JoinFragment.LEFT_OUTER_JOIN && oj.getJoinable().isCollection() ) { result++; } } return result; }
public boolean isManyToManyWith(OuterJoinableAssociation other) { if ( joinable.isCollection() ) { QueryableCollection persister = ( QueryableCollection ) joinable; if ( persister.isManyToMany() ) { return persister.getElementType() == other.getJoinableType(); } } return false; }
public boolean isManyToManyWith(OuterJoinableAssociation other) { if ( joinable.isCollection() ) { QueryableCollection persister = ( QueryableCollection ) joinable; if ( persister.isManyToMany() ) { return persister.getElementType() == other.getJoinableType(); } } return false; }
public boolean isManyToManyWith(OuterJoinableAssociation other) { if ( joinable.isCollection() ) { QueryableCollection persister = ( QueryableCollection ) joinable; if ( persister.isManyToMany() ) { return persister.getElementType() == other.getJoinableType(); } } return false; }
public boolean isManyToManyWith(OuterJoinableAssociation other) { if ( joinable.isCollection() ) { QueryableCollection persister = ( QueryableCollection ) joinable; if ( persister.isManyToMany() ) { return persister.getElementType() == other.getJoinableType(); } } return false; }
public String selectFragment( Joinable rhs, String rhsAlias, String lhsAlias, String entitySuffix, String collectionSuffix, boolean includeCollectionColumns) { // we need to determine the best way to know that two joinables // represent a single many-to-many... if ( rhs != null && isManyToMany() && !rhs.isCollection() ) { AssociationType elementType = ( ( AssociationType ) getElementType() ); if ( rhs.equals( elementType.getAssociatedJoinable( getFactory() ) ) ) { return manyToManySelectFragment( rhs, rhsAlias, lhsAlias, collectionSuffix ); } } return includeCollectionColumns ? selectFragment( lhsAlias, collectionSuffix ) : ""; }