public Type toType(String propertyName) throws QueryException { if ( propertyName.equals(CollectionPropertyNames.COLLECTION_ELEMENTS) ) { return memberPersister.getElementType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_INDICES) ) { if ( !memberPersister.hasIndex() ) { throw new QueryException("unindexed collection before indices()"); } return memberPersister.getIndexType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_SIZE) ) { return StandardBasicTypes.INTEGER; } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MAX_INDEX) ) { return memberPersister.getIndexType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MIN_INDEX) ) { return memberPersister.getIndexType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MAX_ELEMENT) ) { return memberPersister.getElementType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MIN_ELEMENT) ) { return memberPersister.getElementType(); } else { //return memberPersister.getPropertyType(propertyName); throw new QueryException("illegal syntax near collection: " + propertyName); } }
if ( !memberPersister.hasIndex() ) { throw new QueryException("unindexed collection in indices()"); if ( !memberPersister.hasIndex() ) { throw new QueryException("unindexed collection in maxIndex()"); if ( !memberPersister.hasIndex() ) { throw new QueryException("unindexed collection in minIndex()");
&& queryableCollection.hasIndex() && SPECIAL_MANY2MANY_TREATMENT_FUNCTION_NAMES.contains( propertyName ) ) { collectionPropertyMapping = new SpecialManyToManyCollectionPropertyMapping();
&& queryableCollection.hasIndex() && SPECIAL_MANY2MANY_TREATMENT_FUNCTION_NAMES.contains( propertyName ) ) { return new SpecialManyToManyCollectionPropertyMapping();
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); elem.elementType = collPersister.getElementType(); elem.isOneToMany = collPersister.isOneToMany(); elem.alias = collectionName; elem.joinSequence = joinSequence; collectionElements.addLast( elem ); setExpectingCollectionIndex(); q.addCollection( collectionName, collectionRole ); q.addFromJoinOnly( collectionName, fromJoins ); }
if ( !queryableCollection.hasIndex() ) { throw new QueryException( "unindexed fromElement before []: " + collectionNode.getPath() );
public Type toType(String propertyName) throws QueryException { if ( propertyName.equals(CollectionPropertyNames.COLLECTION_ELEMENTS) ) { return memberPersister.getElementType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_INDICES) ) { if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection before indices()"); return memberPersister.getIndexType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_SIZE) ) { return Hibernate.INTEGER; } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MAX_INDEX) ) { return memberPersister.getIndexType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MIN_INDEX) ) { return memberPersister.getIndexType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MAX_ELEMENT) ) { return memberPersister.getElementType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MIN_ELEMENT) ) { return memberPersister.getElementType(); } else { //return memberPersister.getPropertyType(propertyName); throw new QueryException("illegal syntax near collection: " + propertyName); } }
public Type toType(String propertyName) throws QueryException { if ( propertyName.equals(CollectionPropertyNames.COLLECTION_ELEMENTS) ) { return memberPersister.getElementType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_INDICES) ) { if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection before indices()"); return memberPersister.getIndexType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_SIZE) ) { return Hibernate.INTEGER; } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MAX_INDEX) ) { return memberPersister.getIndexType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MIN_INDEX) ) { return memberPersister.getIndexType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MAX_ELEMENT) ) { return memberPersister.getElementType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MIN_ELEMENT) ) { return memberPersister.getElementType(); } else { //return memberPersister.getPropertyType(propertyName); throw new QueryException("illegal syntax near collection: " + propertyName); } }
public Type toType(String propertyName) throws QueryException { if ( propertyName.equals(CollectionPropertyNames.COLLECTION_ELEMENTS) ) { return memberPersister.getElementType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_INDICES) ) { if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection before indices()"); return memberPersister.getIndexType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_SIZE) ) { return StandardBasicTypes.INTEGER; } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MAX_INDEX) ) { return memberPersister.getIndexType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MIN_INDEX) ) { return memberPersister.getIndexType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MAX_ELEMENT) ) { return memberPersister.getElementType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MIN_ELEMENT) ) { return memberPersister.getElementType(); } else { //return memberPersister.getPropertyType(propertyName); throw new QueryException("illegal syntax near collection: " + propertyName); } }
public Type toType(String propertyName) throws QueryException { if ( propertyName.equals(CollectionPropertyNames.COLLECTION_ELEMENTS) ) { return memberPersister.getElementType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_INDICES) ) { if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection before indices()"); return memberPersister.getIndexType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_SIZE) ) { return StandardBasicTypes.INTEGER; } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MAX_INDEX) ) { return memberPersister.getIndexType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MIN_INDEX) ) { return memberPersister.getIndexType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MAX_ELEMENT) ) { return memberPersister.getElementType(); } else if ( propertyName.equals(CollectionPropertyNames.COLLECTION_MIN_ELEMENT) ) { return memberPersister.getElementType(); } else { //return memberPersister.getPropertyType(propertyName); throw new QueryException("illegal syntax near collection: " + propertyName); } }
if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection in indices()"); return memberPersister.getIndexColumnNames(alias); if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection in maxIndex()"); String[] cols = memberPersister.getIndexColumnNames(alias); if ( cols.length!=1 ) throw new QueryException("composite collection index in maxIndex()"); if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection in minIndex()"); String[] cols = memberPersister.getIndexColumnNames(alias); if ( cols.length!=1 ) throw new QueryException("composite collection index in minIndex()");
if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection in indices()"); return memberPersister.getIndexColumnNames(alias); if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection in maxIndex()"); String[] cols = memberPersister.getIndexColumnNames(alias); if ( cols.length!=1 ) throw new QueryException("composite collection index in maxIndex()"); if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection in minIndex()"); String[] cols = memberPersister.getIndexColumnNames(alias); if ( cols.length!=1 ) throw new QueryException("composite collection index in minIndex()");
if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection in indices()"); return memberPersister.getIndexColumnNames(alias); if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection in maxIndex()"); String[] cols = memberPersister.getIndexColumnNames(alias); if ( cols.length!=1 ) throw new QueryException("composite collection index in maxIndex()"); if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection in minIndex()"); String[] cols = memberPersister.getIndexColumnNames(alias); if ( cols.length!=1 ) throw new QueryException("composite collection index in minIndex()");
if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection in indices()"); return memberPersister.getIndexColumnNames(alias); if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection in maxIndex()"); String[] cols = memberPersister.getIndexColumnNames(alias); if ( cols.length!=1 ) throw new QueryException("composite collection index in maxIndex()"); if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection in minIndex()"); String[] cols = memberPersister.getIndexColumnNames(alias); if ( cols.length!=1 ) throw new QueryException("composite collection index in minIndex()");
&& queryableCollection.hasIndex() && SPECIAL_MANY2MANY_TREATMENT_FUNCTION_NAMES.contains( propertyName ) ) { return new SpecialManyToManyCollectionPropertyMapping();
&& queryableCollection.hasIndex() && SPECIAL_MANY2MANY_TREATMENT_FUNCTION_NAMES.contains( propertyName ) ) { return new SpecialManyToManyCollectionPropertyMapping();
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); elem.elementType = collPersister.getElementType(); elem.isOneToMany = collPersister.isOneToMany(); elem.alias = collectionName; elem.joinSequence = joinSequence; collectionElements.addLast( elem ); setExpectingCollectionIndex(); q.addCollection( collectionName, collectionRole ); q.addFromJoinOnly( collectionName, fromJoins ); }
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); elem.elementType = collPersister.getElementType(); elem.isOneToMany = collPersister.isOneToMany(); elem.alias = collectionName; elem.joinSequence = joinSequence; collectionElements.addLast( elem ); setExpectingCollectionIndex(); q.addCollection( collectionName, collectionRole ); q.addFromJoinOnly( collectionName, fromJoins ); }
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); elem.elementType = collPersister.getElementType(); elem.isOneToMany = collPersister.isOneToMany(); elem.alias = collectionName; elem.joinSequence = joinSequence; collectionElements.addLast( elem ); setExpectingCollectionIndex(); q.addCollection( collectionName, collectionRole ); q.addFromJoinOnly( collectionName, fromJoins ); }
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); elem.elementType = collPersister.getElementType(); elem.isOneToMany = collPersister.isOneToMany(); elem.alias = collectionName; elem.joinSequence = joinSequence; collectionElements.addLast( elem ); setExpectingCollectionIndex(); q.addCollection( collectionName, collectionRole ); q.addFromJoinOnly( collectionName, fromJoins ); }