private void get_dev_system_resource() throws DevFailed {

	//
	// Try to retrieve resources for device black box depth and device
	// description
	//

	if (Util._UseDb) {
	    try {
		final String[] prop_names = { "blackbox_depth", "description", "poll_ring_depth",
			"polled_cmd", "polled_attr", "non_auto_polled_cmd", "non_auto_polled_attr",
			"poll_old_factor" };

		// Call db server
		final DbDatum[] res_value = db_dev.get_property(prop_names);

		int i = 0;
		if (res_value[i].is_empty() == false) {
		    blackbox_depth = res_value[i].extractLong();
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    desc = res_value[i].extractString();
		}
		i++;

		if (res_value[i].is_empty() == false) {
		    set_poll_ring_depth(res_value[i].extractLong());
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    set_polled_cmd(res_value[i].extractStringArray());
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    set_polled_attr(res_value[i].extractStringArray());
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    set_non_auto_polled_cmd(res_value[i].extractStringArray());
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    set_non_auto_polled_attr(res_value[i].extractStringArray());
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    set_poll_old_factor(res_value[i].extractLong());
		} else {
		    set_poll_old_factor(Tango_DEFAULT_POLL_OLD_FACTOR);
		}
	    } catch (final DevFailed e) {
		final StringBuffer o = new StringBuffer(
			"Database error while trying to retrieve device properties for device ");
		o.append(device_name);

		Except.throw_exception("API_DatabaseAccess", o.toString(),
			"DeviceImpl.get_dev_system_resource");
	    } catch (final BAD_OPERATION ex) {
		final StringBuffer o = new StringBuffer(
			"Database error while trying to retrieve device properties for device ");
		o.append(device_name);

		Except.throw_exception("API_DatabaseAccess", o.toString(),
			"DeviceImpl.get_dev_system_resource");
	    }
	}
    }
private void get_dev_system_resource ( ) throws DevFailed { if ( Util . _UseDb ) { try { final String [ ] prop_names = { "blackbox_depth" , "description" , "poll_ring_depth" , "polled_cmd" , "polled_attr" , "non_auto_polled_cmd" , "non_auto_polled_attr" , "poll_old_factor" } ; final DbDatum [ ] res_value = db_dev . get_property ( prop_names ) ; int i = 0 ; if ( res_value [ i ] . is_empty ( ) == false ) { blackbox_depth = res_value [ i ] . extractLong ( ) ; } i ++ ; if ( res_value [ i ] . is_empty ( ) == false ) { desc = res_value [ i ] . extractString ( ) ; } i ++ ; if ( res_value [ i ] . is_empty ( ) == false ) { set_poll_ring_depth ( res_value [ i ] . extractLong ( ) ) ; } i ++ ; if ( res_value [ i ] . is_empty ( ) == false ) { set_polled_cmd ( res_value [ i ] . extractStringArray ( ) ) ; } i ++ ; if ( res_value [ i ] . is_empty ( ) == false ) { set_polled_attr ( res_value [ i ] . extractStringArray ( ) ) ; } i ++ ; if ( res_value [ i ] . is_empty ( ) == false ) { set_non_auto_polled_cmd ( res_value [ i ] . extractStringArray ( ) ) ; } i ++ ; if ( res_value [ i ] . is_empty ( ) == false ) { set_non_auto_polled_attr ( res_value [ i ] . extractStringArray ( ) ) ; } i ++ ; if ( res_value [ i ] . is_empty ( ) == false ) { set_poll_old_factor ( res_value [ i ] . extractLong ( ) ) ; } else { set_poll_old_factor ( Tango_DEFAULT_POLL_OLD_FACTOR ) ; } } catch ( final DevFailed e ) { final StringBuffer o = new StringBuffer ( "Database error while trying to retrieve device properties for device " ) ; o . append ( device_name ) ; Except . throw_exception ( "API_DatabaseAccess" , o . toString ( ) , "DeviceImpl.get_dev_system_resource" ) ; } catch ( final BAD_OPERATION ex ) { final StringBuffer o = new StringBuffer ( "Database error while trying to retrieve device properties for device " ) ; o . append ( device_name ) ; Except . throw_exception ( "API_DatabaseAccess" , o . toString ( ) , "DeviceImpl.get_dev_system_resource" ) ; } } }
-----------------------------------------------------------------------------