@SuppressWarnings("SimplifiableIfStatement") private boolean isReturnableEntity(SelectExpression selectExpression) throws SemanticException { FromElement fromElement = selectExpression.getFromElement(); boolean isFetchOrValueCollection = fromElement != null && ( fromElement.isFetch() || fromElement.isCollectionOfValuesOrComponents() ); if ( isFetchOrValueCollection ) { return false; } else { return selectExpression.isReturnableEntity(); } }
boolean collectionOfElements = fromElement.isCollectionOfValuesOrComponents(); if ( !collectionOfElements ) { if ( !fromElement.isFetch() ) {
private void handleElements(FromReferenceNode collectionNode, String propertyName) { FromElement collectionFromElement = collectionNode.getFromElement(); QueryableCollection queryableCollection = collectionFromElement.getQueryableCollection(); String path = collectionNode.getPath() + "[]." + propertyName; LOG.debugf( "Creating elements for %s", path ); fromElement = collectionFromElement; if ( !collectionFromElement.isCollectionOfValuesOrComponents() ) { getWalker().addQuerySpaces( queryableCollection.getElementPersister().getQuerySpaces() ); } setDataType( queryableCollection.getElementType() ); selectColumns = collectionFromElement.toColumns( fromElement.getTableAlias(), propertyName, inSelect ); }
addCollectionFromElement( fromElement ); if ( type != null ) { boolean collectionOfElements = fromElement.isCollectionOfValuesOrComponents(); if ( !collectionOfElements ) {
while ( itr.hasNext() ) { FromElement child = (FromElement) itr.next(); if ( child.isCollectionOfValuesOrComponents() && child.isFetch() ) {
private boolean isReturnableEntity(SelectExpression selectExpression) throws SemanticException { FromElement fromElement = selectExpression.getFromElement(); boolean isFetchOrValueCollection = fromElement != null && ( fromElement.isFetch() || fromElement.isCollectionOfValuesOrComponents() ); if ( isFetchOrValueCollection ) { return false; } else { return selectExpression.isReturnableEntity(); } }
private boolean isReturnableEntity(SelectExpression selectExpression) throws SemanticException { FromElement fromElement = selectExpression.getFromElement(); boolean isFetchOrValueCollection = fromElement != null && ( fromElement.isFetch() || fromElement.isCollectionOfValuesOrComponents() ); if ( isFetchOrValueCollection ) { return false; } else { return selectExpression.isReturnableEntity(); } }
boolean collectionOfElements = fromElement.isCollectionOfValuesOrComponents(); if ( !collectionOfElements ) { if ( !fromElement.isFetch() ) {
boolean collectionOfElements = fromElement.isCollectionOfValuesOrComponents(); if ( !collectionOfElements ) { if ( !fromElement.isFetch() ) {
addCollectionFromElement( fromElement ); if ( type != null ) { boolean collectionOfElements = fromElement.isCollectionOfValuesOrComponents(); if ( !collectionOfElements ) {
addCollectionFromElement( fromElement ); if ( type != null ) { boolean collectionOfElements = fromElement.isCollectionOfValuesOrComponents(); if ( !collectionOfElements ) {
private void handleElements(FromReferenceNode collectionNode, String propertyName) { FromElement collectionFromElement = collectionNode.getFromElement(); QueryableCollection queryableCollection = collectionFromElement.getQueryableCollection(); String path = collectionNode.getPath() + "[]." + propertyName; LOG.debugf( "Creating elements for %s", path ); fromElement = collectionFromElement; if ( !collectionFromElement.isCollectionOfValuesOrComponents() ) { getWalker().addQuerySpaces( queryableCollection.getElementPersister().getQuerySpaces() ); } setDataType( queryableCollection.getElementType() ); selectColumns = collectionFromElement.toColumns( fromElement.getTableAlias(), propertyName, inSelect ); }
private void handleElements(FromReferenceNode collectionNode, String propertyName) { FromElement collectionFromElement = collectionNode.getFromElement(); QueryableCollection queryableCollection = collectionFromElement.getQueryableCollection(); String path = collectionNode.getPath() + "[]." + propertyName; LOG.debugf( "Creating elements for %s", path ); fromElement = collectionFromElement; if ( !collectionFromElement.isCollectionOfValuesOrComponents() ) { getWalker().addQuerySpaces( queryableCollection.getElementPersister().getQuerySpaces() ); } setDataType( queryableCollection.getElementType() ); selectColumns = collectionFromElement.toColumns( fromElement.getTableAlias(), propertyName, inSelect ); }
private void renderNonScalarProperties(ASTAppender appender, FromElement fromElement, int nonscalarSize, int k) { String text = fromElement.renderPropertySelect( nonscalarSize, k ); appender.append( SqlTokenTypes.SQL_TOKEN, text, false ); if ( fromElement.getQueryableCollection() != null && fromElement.isFetch() ) { text = fromElement.renderCollectionSelectFragment( nonscalarSize, k ); appender.append( SqlTokenTypes.SQL_TOKEN, text, false ); } // Look through the FromElement's children to find any collections of values that should be fetched... ASTIterator iter = new ASTIterator( fromElement ); while ( iter.hasNext() ) { FromElement child = ( FromElement ) iter.next(); if ( child.isCollectionOfValuesOrComponents() && child.isFetch() ) { // Need a better way to define the suffixes here... text = child.renderValueCollectionSelectFragment( nonscalarSize, nonscalarSize + k ); appender.append( SqlTokenTypes.SQL_TOKEN, text, false ); } } }
private void renderNonScalarProperties(ASTAppender appender, FromElement fromElement, int nonscalarSize, int k) { String text = fromElement.renderPropertySelect( nonscalarSize, k ); appender.append( SqlTokenTypes.SQL_TOKEN, text, false ); if ( fromElement.getQueryableCollection() != null && fromElement.isFetch() ) { text = fromElement.renderCollectionSelectFragment( nonscalarSize, k ); appender.append( SqlTokenTypes.SQL_TOKEN, text, false ); } // Look through the FromElement's children to find any collections of values that should be fetched... ASTIterator iter = new ASTIterator( fromElement ); while ( iter.hasNext() ) { FromElement child = ( FromElement ) iter.next(); if ( child.isCollectionOfValuesOrComponents() && child.isFetch() ) { // Need a better way to define the suffixes here... text = child.renderValueCollectionSelectFragment( nonscalarSize, nonscalarSize + k ); appender.append( SqlTokenTypes.SQL_TOKEN, text, false ); } } }