public Menu getTypeMenu()
        throws EFapsException
    {
        Menu ret = null;
        if (this.typeMenu == null) {
            final QueryBuilder queryBldr = new QueryBuilder(CIAdminUserInterface.LinkIsTypeTreeFor);
            queryBldr.addWhereAttrEqValue(CIAdminUserInterface.LinkIsTypeTreeFor.To, getId());
            final MultiPrintQuery multi = queryBldr.getPrint();
            multi.addAttribute(CIAdminUserInterface.LinkIsTypeTreeFor.From);
            multi.executeWithoutAccessCheck();
            if (multi.next()) {
                final Long menuId = multi.<Long>getAttribute(CIAdminUserInterface.LinkIsTypeTreeFor.From);
                ret = Menu.get(menuId);
                if (ret != null) {
                    this.typeMenu = ret.getId();
                    ret.setTypeMenu(true);
                } else {
                    this.typeMenu = Long.valueOf(0);
                }
            } else {
                this.typeMenu = Long.valueOf(0);
            }
            setDirty();
        }
        if (this.typeMenu == 0 && getParentType() != null) {
            ret = getParentType().getTypeMenu();
        } else {
            ret = Menu.get(this.typeMenu);
        }
        return ret;
    }
public Menu getTypeMenu ( ) throws EFapsException { Menu ret = null ; if ( this . typeMenu == null ) { final QueryBuilder queryBldr = new QueryBuilder ( CIAdminUserInterface . LinkIsTypeTreeFor ) ; queryBldr . addWhereAttrEqValue ( CIAdminUserInterface . LinkIsTypeTreeFor . To , getId ( ) ) ; final MultiPrintQuery multi = queryBldr . getPrint ( ) ; multi . addAttribute ( CIAdminUserInterface . LinkIsTypeTreeFor . From ) ; multi . executeWithoutAccessCheck ( ) ; if ( multi . next ( ) ) { final Long menuId = multi . < Long > getAttribute ( CIAdminUserInterface . LinkIsTypeTreeFor . From ) ; ret = Menu . get ( menuId ) ; if ( ret != null ) { this . typeMenu = ret . getId ( ) ; ret . setTypeMenu ( true ) ; } else { this . typeMenu = Long . valueOf ( 0 ) ; } } else { this . typeMenu = Long . valueOf ( 0 ) ; } setDirty ( ) ; } if ( this . typeMenu == 0 && getParentType ( ) != null ) { ret = getParentType ( ) . getTypeMenu ( ) ; } else { ret = Menu . get ( this . typeMenu ) ; } return ret ; }
@return the TypeMenu for this type
@throws EFapsException on errot