@ SuppressWarnings ( "unchecked" ) public < T > T getAttributeSet ( final String _setName ) throws EFapsException { final OneSelect oneselect = this . attr2OneSelect . get ( _setName ) ; Map < String , Object > ret = null ; if ( oneselect == null || oneselect . getFromSelect ( ) == null ) { AbstractPrintQuery . LOG . error ( "Could not get an AttributeSet for the name: '{}' in PrintQuery '{]'" , _setName , this ) ; } else if ( oneselect . getFromSelect ( ) . hasResult ( ) ) { ret = new HashMap <> ( ) ; // in an attributset the first one is fake boolean first = true ; for ( final OneSelect onsel : oneselect . getFromSelect ( ) . getAllSelects ( ) ) { if ( first ) { first = false ; } else { final ArrayList < Object > list = new ArrayList <> ( ) ; final Object object = onsel . getObject ( ) ; if ( object instanceof List < ? > ) { list . addAll ( ( List < ? > ) object ) ; } else { list . add ( object ) ; } ret . put ( onsel . getAttribute ( ) . getName ( ) , list ) ; } } } return ( T ) ret ; }
Get the object returned by the given name of an AttributeSet .