@Override public boolean test( Composite item ) { try { Association<T> assoc = association.apply( item ); if( assoc == null ) { return false; } return assoc.get() != null; } catch( IllegalArgumentException e ) { return false; } }
@Override public boolean test( Composite item ) { try { Association<T> assoc = association.apply( item ); if( assoc == null ) { return true; } return assoc.get() == null; } catch( IllegalArgumentException e ) { return true; } }
@Override public boolean test( Composite item ) { try { Association<T> assoc = association.apply( item ); if( assoc == null ) { return false; } return assoc.get() != null; } catch( IllegalArgumentException e ) { return false; } }
@Override public boolean test( Composite item ) { try { Association<T> assoc = association.apply( item ); if( assoc == null ) { return true; } return assoc.get() == null; } catch( IllegalArgumentException e ) { return true; } }
@Override public ManyAssociation<T> apply( Composite entity ) { try { Object target = entity; if( traversedAssociation != null ) { target = traversedAssociation.apply( entity ).get(); } if( traversedManyAssociation != null ) { throw new IllegalArgumentException( "Cannot traverse ManyAssociations" ); } if( traversedNamedAssociation != null ) { throw new IllegalArgumentException( "Cannot traverse NamedAssociations" ); } CompositeInstance handler = (CompositeInstance) Proxy.getInvocationHandler( target ); return ( (AssociationStateHolder) handler.state() ).manyAssociationFor( accessor ); } catch( IllegalArgumentException e ) { throw e; } catch( Throwable e ) { throw new IllegalArgumentException( e ); } }
@Override public NamedAssociation<T> apply( Composite entity ) { try { Object target = entity; if( traversedAssociation != null ) { target = traversedAssociation.apply( entity ).get(); } if( traversedManyAssociation != null ) { throw new IllegalArgumentException( "Cannot traverse ManyAssociations" ); } if( traversedNamedAssociation != null ) { throw new IllegalArgumentException( "Cannot traverse NamedAssociations" ); } CompositeInstance handler = (CompositeInstance) Proxy.getInvocationHandler( target ); return ( (AssociationStateHolder) handler.state() ).namedAssociationFor( accessor ); } catch( IllegalArgumentException e ) { throw e; } catch( Throwable e ) { throw new IllegalArgumentException( e ); } }
@Override public NamedAssociation<T> apply( Composite entity ) { try { Object target = entity; if( traversedAssociation != null ) { target = traversedAssociation.apply( entity ).get(); } if( traversedManyAssociation != null ) { throw new IllegalArgumentException( "Cannot traverse ManyAssociations" ); } if( traversedNamedAssociation != null ) { throw new IllegalArgumentException( "Cannot traverse NamedAssociations" ); } CompositeInstance handler = (CompositeInstance) Proxy.getInvocationHandler( target ); return ( (AssociationStateHolder) handler.state() ).namedAssociationFor( accessor ); } catch( IllegalArgumentException e ) { throw e; } catch( Throwable e ) { throw new IllegalArgumentException( e ); } }
@Override public ManyAssociation<T> apply( Composite entity ) { try { Object target = entity; if( traversedAssociation != null ) { target = traversedAssociation.apply( entity ).get(); } if( traversedManyAssociation != null ) { throw new IllegalArgumentException( "Cannot traverse ManyAssociations" ); } if( traversedNamedAssociation != null ) { throw new IllegalArgumentException( "Cannot traverse NamedAssociations" ); } CompositeInstance handler = (CompositeInstance) Proxy.getInvocationHandler( target ); return ( (AssociationStateHolder) handler.state() ).manyAssociationFor( accessor ); } catch( IllegalArgumentException e ) { throw e; } catch( Throwable e ) { throw new IllegalArgumentException( e ); } }
if( traversedAssociation != null ) Association<?> association = traversedAssociation.apply( entity ); if( association == null )
if( traversedAssociation != null ) Association<?> association = traversedAssociation.apply( entity ); if( association == null )
Association<?> association = traversedAssociation.apply( entity ); if( association == null )
Association<?> association = traversedAssociation.apply( entity ); if( association == null )