private static boolean readObjectFromDB(final Class<?> _componentType,
                                            final Type _type,
                                            final CIAttribute _ciAttr,
                                            final Object _value)
        throws CacheReloadException
    {
        boolean ret = false;
        try {
            final QueryBuilder queryBldr = new QueryBuilder(_type);
            queryBldr.addWhereAttrEqValue(_ciAttr, _value.toString());
            final InstanceQuery query = queryBldr.getQuery();
            query.setIncludeChildTypes(false);

            final List<Instance> instances = query.execute();
            final MultiPrintQuery multi = new MultiPrintQuery(instances);
            multi.addAttribute(CIAdmin.Abstract.Name,
                            CIAdmin.Abstract.UUID);
            multi.executeWithoutAccessCheck();
            if (multi.next()) {
                final long id = multi.getCurrentInstance().getId();
                final String name = multi.<String>getAttribute(CIAdmin.Abstract.Name);
                final String uuid = multi.<String>getAttribute(CIAdmin.Abstract.UUID);
                final Constructor<?> uiObjConst = _componentType.getConstructor(Long.class, String.class,
                                String.class);
                final AbstractUserInterfaceObject uiObje = (AbstractUserInterfaceObject) uiObjConst.newInstance(id,
                                uuid, name);
                AbstractUserInterfaceObject.cacheUIObject(uiObje);
                uiObje.readFromDB();
                // might have changed therefore store it again
                AbstractUserInterfaceObject.cacheUIObject(uiObje);
                ret = true;
            }
        } catch (final NoSuchMethodException e) {
            throw new CacheReloadException("NoSuchMethodException", e);
        } catch (final EFapsException e) {
            throw new CacheReloadException("EFapsException", e);
        } catch (final IllegalArgumentException e) {
            throw new CacheReloadException("IllegalArgumentException", e);
        } catch (final InstantiationException e) {
            throw new CacheReloadException("InstantiationException", e);
        } catch (final IllegalAccessException e) {
            throw new CacheReloadException("IllegalAccessException", e);
        } catch (final InvocationTargetException e) {
            throw new CacheReloadException("InvocationTargetException", e);
        }
        return ret;
    }
private static boolean readObjectFromDB ( final Class < ? > _componentType , final Type _type , final CIAttribute _ciAttr , final Object _value ) throws CacheReloadException { boolean ret = false ; try { final QueryBuilder queryBldr = new QueryBuilder ( _type ) ; queryBldr . addWhereAttrEqValue ( _ciAttr , _value . toString ( ) ) ; final InstanceQuery query = queryBldr . getQuery ( ) ; query . setIncludeChildTypes ( false ) ; final List < Instance > instances = query . execute ( ) ; final MultiPrintQuery multi = new MultiPrintQuery ( instances ) ; multi . addAttribute ( CIAdmin . Abstract . Name , CIAdmin . Abstract . UUID ) ; multi . executeWithoutAccessCheck ( ) ; if ( multi . next ( ) ) { final long id = multi . getCurrentInstance ( ) . getId ( ) ; final String name = multi . < String > getAttribute ( CIAdmin . Abstract . Name ) ; final String uuid = multi . < String > getAttribute ( CIAdmin . Abstract . UUID ) ; final Constructor < ? > uiObjConst = _componentType . getConstructor ( Long . class , String . class , String . class ) ; final AbstractUserInterfaceObject uiObje = ( AbstractUserInterfaceObject ) uiObjConst . newInstance ( id , uuid , name ) ; AbstractUserInterfaceObject . cacheUIObject ( uiObje ) ; uiObje . readFromDB ( ) ; AbstractUserInterfaceObject . cacheUIObject ( uiObje ) ; ret = true ; } } catch ( final NoSuchMethodException e ) { throw new CacheReloadException ( "NoSuchMethodException" , e ) ; } catch ( final EFapsException e ) { throw new CacheReloadException ( "EFapsException" , e ) ; } catch ( final IllegalArgumentException e ) { throw new CacheReloadException ( "IllegalArgumentException" , e ) ; } catch ( final InstantiationException e ) { throw new CacheReloadException ( "InstantiationException" , e ) ; } catch ( final IllegalAccessException e ) { throw new CacheReloadException ( "IllegalAccessException" , e ) ; } catch ( final InvocationTargetException e ) { throw new CacheReloadException ( "InvocationTargetException" , e ) ; } return ret ; }
@param _componentType  c lass of UIObject to be retrieved
@param _type             DataModel TYpe of UIObject to be retrieved
@param _ciAttr           Attribute used for filtered
@param _value            value to filtered
@return true if successful
@throws CacheReloadException on error