public String[] getIdentityColumns() { checkInitialized(); final String table = getTableAlias(); if ( table == null ) { throw new IllegalStateException( "No table alias for node " + this ); } final String[] propertyNames = getIdentifierPropertyNames(); List<String> columns = new ArrayList<>(); for ( int i = 0; i < propertyNames.length; i++ ) { String[] propertyNameColumns = toColumns( table, propertyNames[i], getWalker().getStatementType() == HqlSqlTokenTypes.SELECT ); for ( int j = 0; j < propertyNameColumns.length; j++ ) { columns.add( propertyNameColumns[j] ); } } return columns.toArray( new String[columns.size()] ); }
@Override protected String[] resolveColumns(QueryableCollection collectionPersister) { final FromElement fromElement = getFromElement(); return fromElement.toColumns( fromElement.getCollectionTableAlias(), "elements", // the JPA VALUE "qualifier" is the same concept as the HQL ELEMENTS function/property getWalker().isInSelect() ); }
protected String[] resolveColumns(QueryableCollection collectionPersister) { final FromElement fromElement = getFromElement(); return fromElement.toColumns( fromElement.getCollectionTableAlias(), "elements", // the JPA VALUE "qualifier" is the same concept as the HQL ELEMENTS function/property getWalker().isInSelect() ); }
private String[] getColumns() throws QueryException { if ( columns == null ) { // Use the table fromElement and the property name to get the array of column names. String tableAlias = getLhs().getFromElement().getTableAlias(); columns = getFromElement().toColumns( tableAlias, propertyPath, false ); } return columns; }
@Override protected String[] resolveColumns(QueryableCollection collectionPersister) { this.mapKeyEntityFromElement = findOrAddMapKeyEntityFromElement( collectionPersister ); if ( mapKeyEntityFromElement != null ) { setFromElement( mapKeyEntityFromElement ); } final FromElement fromElement = getMapFromElement(); return fromElement.toColumns( fromElement.getCollectionTableAlias(), "index", // the JPA KEY "qualifier" is the same concept as the HQL INDEX function/property getWalker().isInSelect() ); }
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 ); }
final EntityType entityType = (EntityType) propertyType; final String[] columns = origin.toColumns( originTableAlias, attributeName, false ); final String tableAlias = walker.getAliasGenerator().createName( entityType.getAssociatedEntityName() final String[] columns = origin.toColumns( originTableAlias, attributeName, false );
selectColumns = fromElement.toColumns( fromElement.getTableAlias(), propertyName, inSelect );
propertyName, alias, getFromElement().toColumns(columnTableAlias, propertyName, false), true );
columns = getFromElement().toColumns( lhsTableName, propertyPath, false, true );
private String[] getColumns() throws QueryException { if ( columns == null ) { // Use the table fromElement and the property name to get the array of column names. String tableAlias = getLhs().getFromElement().getTableAlias(); columns = getFromElement().toColumns( tableAlias, propertyPath, false ); } return columns; }
private String[] getColumns() throws QueryException { if ( columns == null ) { // Use the table fromElement and the property name to get the array of column names. String tableAlias = getLhs().getFromElement().getTableAlias(); columns = getFromElement().toColumns( tableAlias, propertyPath, false ); } return columns; }
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 ); }
selectColumns = fromElement.toColumns( fromElement.getTableAlias(), propertyName, inSelect );
selectColumns = fromElement.toColumns( fromElement.getTableAlias(), propertyName, inSelect );
propertyName, alias, getFromElement().toColumns(columnTableAlias, propertyName, false), true );
propertyName, alias, getFromElement().toColumns(columnTableAlias, propertyName, false), true );
columns = getFromElement().toColumns( alias, propertyPath, false, true );
columns = getFromElement().toColumns( alias, propertyPath, false, true );