private AccessibleObject getAccessor() { return this._traversedAsso == null ? this._traversedManyAsso.accessor() : this._traversedAsso.accessor(); }
@Override public Object invoke( Object o, final Method method, Object[] objects ) throws Throwable { if( method.equals( Association.class.getMethod( "get" ) ) ) { Type associationType = GenericAssociationInfo.associationTypeOf( association.accessor() ); if( associationType.getClass().equals( Class.class ) ) { return Proxy.newProxyInstance( method.getDeclaringClass().getClassLoader(), array( (Class) associationType, PropertyReference.class ), new TemplateHandler<T>( null, association, null, null ) ); } } return null; } }
@Override public Object invoke( Object o, final Method method, Object[] objects ) throws Throwable { if( method.equals( Association.class.getMethod( "get" ) ) ) { Type associationType = GenericAssociationInfo.associationTypeOf( association.accessor() ); if( associationType.getClass().equals( Class.class ) ) { return Proxy.newProxyInstance( method.getDeclaringClass().getClassLoader(), array( (Class) associationType, PropertyReference.class ), new TemplateHandler<T>( null, association, null, null ) ); } } return null; } }
public Triple addTripleAssociation( AssociationFunction<?> associationReference, boolean optional ) { String subject = "?entity"; if( associationReference.traversedAssociation() != null ) { subject = addTripleAssociation( associationReference.traversedAssociation(), false ).value; } QualifiedName qualifiedName = QualifiedName.fromAccessor( associationReference.accessor() ); String prefix = addNamespace( qualifiedName.toNamespace() ); return addTriple( subject, prefix + ":" + qualifiedName.name(), optional ); }
public Triple addTripleAssociation( AssociationFunction<?> associationReference, boolean optional ) { String subject = "?entity"; if( associationReference.traversedAssociation() != null ) { subject = addTripleAssociation( associationReference.traversedAssociation(), false ).value; } QualifiedName qualifiedName = QualifiedName.fromAccessor( associationReference.accessor() ); String prefix = addNamespace( qualifiedName.toNamespace() ); return addTriple( subject, prefix + ":" + qualifiedName.name(), optional ); }