@Override public Object invoke( Object o, final Method method, Object[] objects ) throws Throwable { if( method.equals( Property.class.getMethod( "get" ) ) ) { Type propertyType = GenericPropertyInfo.propertyTypeOf( property.accessor() ); if( propertyType.getClass().equals( Class.class ) ) { return Proxy.newProxyInstance( method.getDeclaringClass().getClassLoader(), array( (Class<?>) propertyType, PropertyReference.class ), new TemplateHandler<T>( property, null, null, null ) ); } } return null; } }
@Override public Object invoke( Object o, final Method method, Object[] objects ) throws Throwable { if( method.equals( Property.class.getMethod( "get" ) ) ) { Type propertyType = GenericPropertyInfo.propertyTypeOf( property.accessor() ); if( propertyType.getClass().equals( Class.class ) ) { return Proxy.newProxyInstance( method.getDeclaringClass().getClassLoader(), array( (Class<?>) propertyType, PropertyReference.class ), new TemplateHandler<T>( property, null, null, null ) ); } } return null; } }
QualifiedName qName = QualifiedName.fromAccessor( ref.accessor() ); QNameInfo info = this._state.qNameInfos().get().get( qName ); qNames[ idx ] = info; .getFrom() .getTableReferences().iterator().next(), JoinType.LEFT_OUTER ); Class<?> declaringType = ( (Member) ref.accessor() ).getDeclaringClass(); String colName; Integer tableIdx;
= QualifiedName.fromAccessor( predicate.property().accessor() ); String columnName; Object value;
String propName = ((Member)orderBySegment.property().accessor()).getName() + "_for_sort"; String order = orderBySegment.order() == OrderBy.Order.ASCENDING ? "asc" : "desc"; list.add( "sort", propName + " " + order );
@Override public void processWhereClause( QuerySpecificationBuilder builder, BooleanBuilder afterWhere, JoinType joinStyle, Integer firstTableIndex, Integer lastTableIndex ) { if( !this.negationActive ) { ColumnsFactory c = this.vendor.getColumnsFactory(); BooleanFactory b = this.vendor.getBooleanFactory(); QNameInfo info = this.state .qNameInfos() .get() .get( QualifiedName.fromAccessor( this.propFunction.accessor() ) ); String colName; if( info.getCollectionDepth() > 0 ) { colName = DBNames.ALL_QNAMES_TABLE_PK_COLUMN_NAME; } else { colName = DBNames.QNAME_TABLE_VALUE_COLUMN_NAME; } // Last table column might be null because of left joins builder.getWhere().reset( b.isNull( c.colName( TABLE_NAME_PREFIX + lastTableIndex, colName ) ) ); } } }
QualifiedName.fromAccessor( predicate.collectionProperty().accessor() ), value, predicate, false, lastTableIndex, new ModifiableInt( lastTableIndex ), DBNames.QNAME_TABLE_VALUE_COLUMN_NAME,
public Triple addTriple( final PropertyFunction<?> propertyFunction, boolean optional ) { String subject = "?entity"; if( propertyFunction.traversedAssociation() != null ) { subject = addTripleAssociation( propertyFunction.traversedAssociation(), false ).value; } else if( propertyFunction.traversedProperty() != null ) { subject = addTriple( propertyFunction.traversedProperty(), false ).value; } QualifiedName qualifiedName = QualifiedName.fromAccessor( propertyFunction.accessor() ); String prefix = addNamespace( qualifiedName.toNamespace() ); return addTriple( subject, prefix + ":" + qualifiedName.name(), optional ); }
public Triple addTriple( final PropertyFunction<?> propertyFunction, boolean optional ) { String subject = "?entity"; if( propertyFunction.traversedAssociation() != null ) { subject = addTripleAssociation( propertyFunction.traversedAssociation(), false ).value; } else if( propertyFunction.traversedProperty() != null ) { subject = addTriple( propertyFunction.traversedProperty(), false ).value; } QualifiedName qualifiedName = QualifiedName.fromAccessor( propertyFunction.accessor() ); String prefix = addNamespace( qualifiedName.toNamespace() ); return addTriple( subject, prefix + ":" + qualifiedName.name(), optional ); }
l.s( DBNames.QNAME_TABLE_COLLECTION_PATH_TOP_LEVEL_NAME + ".*{1,}" ) ) ); modifyFromClauseAndWhereClauseToGetValue( QualifiedName.fromAccessor( predicate.collectionProperty().accessor() ), value, predicate, false, lastTableIndex, new ModifiableInt( lastTableIndex ),
qNameStack.add( QualifiedName.fromAccessor( reference.accessor() ) ); refStack.add( reference ); if( reference.traversedProperty() == null