Load memorized attribute value and attribute properties from tangodb.
This loading is done by default at device init, should only be called when dynamic attribute is created outside {@link Init}

@param attributeName
@throws DevFailed
160098
public void loadAttributeConfigFromDb(final String attributeName) throws DevFailed {
        final AttributeImpl toConfigure = dynamicAttributes.get(attributeName.toLowerCase(Locale.ENGLISH));
        if (toConfigure != null) {
            toConfigure.lock();
            try {
                toConfigure.loadTangoDbConfig();
            }finally {
                toConfigure.unlock();
            }
        }
    }
144482
public static String getfullDeviceNameForAttribute(final String attributeName) throws DevFailed {
        checkNullOrEmptyString(attributeName);
        String result;
        if (attributeName.contains(DBASE_NO)) {
            result = attributeName.substring(0, attributeName.lastIndexOf(DEVICE_SEPARATOR));
        } else {
            final String[] fields = attributeName.split(DEVICE_SEPARATOR);
            if (fields.length == 1) {
                result = getfullDeviceNameForAttribute(ApiUtil.get_db_obj().get_attribute_from_alias(fields[0]));
            } else if (fields.length == 2) {
                result = ApiUtil.get_db_obj().get_device_from_alias(fields[0]);
            } else if (fields.length == 4) {
                result = fields[0] + DEVICE_SEPARATOR + fields[1] + DEVICE_SEPARATOR + fields[2];
            } else {
                throw DevFailedUtils.newDevFailed("TANGO_WRONG_DATA_ERROR", "cannot retrieve device name");
            }
        }
        return result;
    }
1272627
private AttributeValue[] buildAttributeValue(final String[] real_names) throws DevFailed {
	// Allocate memory for the AttributeValue structures
	AttributeValue[] back = new AttributeValue[0];
	// noinspection ErrorNotRethrown
	try {
	    back = new AttributeValue[real_names.length];
	    for (int i = 0; i < real_names.length; i++) {
		back[i] = new AttributeValue();
	    }
	} catch (final OutOfMemoryError ex) {
	    Except.throw_exception("API_MemoryAllocation", "Can't allocate memory in server",
		    "DeviceImpl.read_attributes");
	}

	// Build the sequence returned to caller for readable attributes and
	// check
	// that all the wanted attributes set value has been updated
	for (int i = 0; i < real_names.length; i++) {
	    final Attribute att = dev_attr.get_attr_by_name(real_names[i]);
	    if (att.get_value_flag()) {
		final AttrWriteType w_type = att.get_writable();
		if (w_type == AttrWriteType.READ || w_type == AttrWriteType.READ_WRITE
			|| w_type == AttrWriteType.READ_WITH_WRITE) {
		    if (w_type == AttrWriteType.READ_WRITE
			    || w_type == AttrWriteType.READ_WITH_WRITE) {
			dev_attr.add_write_value(att);
		    }

		    if (att.is_alarmed() == true
			    && att.get_quality().value() != AttrQuality._ATTR_INVALID) {
			att.check_alarm();
		    }
		}
		back[i].time = att.get_when();
		back[i].quality = att.get_quality();
		back[i].name = att.get_name();
		back[i].dim_x = att.get_x();
		back[i].dim_y = att.get_y();

		final Util tg = Util.instance();
		back[i].value = tg.get_orb().create_any();

		switch (att.get_data_type()) {
		case Tango_DEV_BOOLEAN:
		    DevVarBooleanArrayHelper.insert(back[i].value, att.get_boolean_value());
		    break;

		case Tango_DEV_SHORT:
		    DevVarShortArrayHelper.insert(back[i].value, att.get_short_value());
		    break;

		case Tango_DEV_USHORT:
		    DevVarUShortArrayHelper.insert(back[i].value, att.get_short_value());
		    break;

		case Tango_DEV_LONG:
		    DevVarLongArrayHelper.insert(back[i].value, att.get_long_value());
		    break;

		case Tango_DEV_ULONG:
		    DevVarULongArrayHelper.insert(back[i].value, att.get_long_value());
		    break;

		case Tango_DEV_LONG64:
		    DevVarLong64ArrayHelper.insert(back[i].value, att.get_long64_value());
		    break;

		case Tango_DEV_ULONG64:
		    DevVarULong64ArrayHelper.insert(back[i].value, att.get_long64_value());
		    break;

		case Tango_DEV_DOUBLE:
		    DevVarDoubleArrayHelper.insert(back[i].value, att.get_double_value());
		    break;

		case Tango_DEV_STRING:
		    DevVarStringArrayHelper.insert(back[i].value, att.get_string_value());
		    break;
		case Tango_DEV_STATE:
		    DevVarStateArrayHelper.insert(back[i].value, att.get_state_value());
		    break;

		/*
		 * //======================================================== //
		 * Not possible (DevEncoded type is not transfered inside an
		 * any)
		 * //========================================================
		 * case Tango_DEV_ENCODED :
		 * DevEncodedHelper.insert(back[i].value,att.get_enc_value());
		 * break;
		 */
		default:
		    Except.throw_exception("API_DatTypeNotSupported", "Attribute " + att.get_name()
			    + " data type not supported !", "Device_2Impl.read_attributes()");
		}
	    } else {
		Except.throw_exception("API_AttrValueNotSet", "Read value for attribute "
			+ att.get_name() + " has not been updated", "DeviceImpl.read_attributes");
	    }
	} // End of for ( ; ; )
	return back;
    }
643503
public void delete_device_attribute_property(Database database, String deviceName, DbAttribute[] attribute)
            throws DevFailed {
        for (DbAttribute att : attribute)
            delete_device_attribute_property(database, deviceName,
                    att.name, att.get_property_list());
    }

    //
	/* (non-Javadoc)
	 * @see fr.esrf.TangoApi.IDatabaseDAO#delete_device_attribute_property(java.lang.String, java.lang.String, java.lang.String[])
	 */
    //
    public void delete_device_attribute_property(Database database, String deviceName, String attname, String[] propnames)
            throws DevFailed {
        if (propnames.length==0)
            return;

        if (!database.isAccess_checked()) checkAccess(database);

        //	Build a String array before command
        String[] array = new String[2 + propnames.length];
        array[0] = deviceName;
        array[1] = attname;
        System.arraycopy(propnames, 0, array, 2, propnames.length);

        DeviceData argIn = new DeviceData();
        argIn.insert(array);
        command_inout(database, "DbDeleteDeviceAttributeProperty", argIn);
    }
1100974
public void put_class_attribute_property(Database database, String classname, DbAttribute[] attr)
            throws DevFailed {
        if (!database.isAccess_checked()) checkAccess(database);

        DeviceData argIn = new DeviceData();
        argIn.insert(ApiUtil.toStringArray(classname, attr, 2));
        command_inout(database, "DbPutClassAttributeProperty2", argIn);
    }
727437
public static String getfullDeviceNameForAttribute(final String attributeName) throws DevFailed {
        String result;
        final String[] fields = attributeName.split("/");
        final Database db = ApiUtil.get_db_obj();
        if (fields.length == 1) {
            result = db.get_attribute_from_alias(fields[0]);
        } else if (fields.length == 2) {
            result = db.get_device_from_alias(fields[0]);
        } else if (fields.length == 4) {
            result = fields[0] + "/" + fields[1] + "/" + fields[2];
        } else {
            throw DevFailedUtils.newDevFailed("TANGO_WRONG_DATA_ERROR", "cannot retrieve device name");
        }
        return result;
    }
312034
public String get_attribute_alias(Database database, String attname)
            throws DevFailed {
        if (!database.isAccess_checked()) checkAccess(database);

        DeviceData argIn = new DeviceData();
        argIn.insert(attname);
        DeviceData argOut = command_inout(database, "DbGetAttributeAlias", argIn);
        return argOut.extractString();
    }
7613
public static String getAttributeName(final String fullname) throws DevFailed {
        final String s = TangoUtil.getfullAttributeNameForAttribute(fullname);
        return s.substring(s.lastIndexOf('/') + 1);
    }
288971
public void delete_attribute_property(String attributeName, String propertyName) throws DevFailed {
        database.delete_class_attribute_property(className, attributeName, propertyName);
    }
701641
public void init(final Connection connection, final String devname, final String param,
	    	final int src) throws DevFailed {
		connection.devname = devname;
		connection.setDevice_is_dbase(false);
		if (src == FROM_IOR) {
	    	connection.ior = param;
	    	connection.url = new TangoUrl();
	    	connection.url.protocol = TANGO;
		} else {
	    	Except.throw_wrong_syntax_exception(
                    "TangoApi_INVALID_ARGS", "Invalid argument", "Connection.Connection()");
		}
    }
338142
public DeviceAttribute read_attribute(final DeviceProxy deviceProxy, final String attname)
	    throws DevFailed {
	final String[] names = ApiUtil.toStringArray(attname);
	final DeviceAttribute[] attval = read_attribute(deviceProxy, names);
	return attval[0];
    }
534318
public void delete_device_attribute_property(String devname, String attname, String[] propnames) throws DevFailed {
		databaseDAO.delete_device_attribute_property(this, devname, attname, propnames);
	}
291370
public void init(final Connection connection, final String devname, final String host,
	    	final String port) throws DevFailed {
		connection.url = new TangoUrl(buildUrlName(host, port, devname));
		connection.devname = connection.url.devname;
		connection.setDevice_is_dbase(false);

		// Check if connection is possible
		if (connection.url.protocol == TANGO) {
	    	connection.ior = get_exported_ior(connection);
		}
   	}
1291037
public void setAttributePropertyInDB(final String attributeName, final String propertyName, final String value)
            throws DevFailed {
        xlogger.entry(propertyName);

        // insert value in db only if input value is different and not a
        // default value
        // if (checkCurrentValue) {
        // final String presentValue = getAttributePropertyFromDB(attributeName, propertyName);
        // final boolean isADefaultValue = presentValue.isEmpty()
        // && (value.equalsIgnoreCase(AttributePropertiesImpl.NOT_SPECIFIED)
        // || value.equalsIgnoreCase(AttributePropertiesImpl.NO_DIPLAY_UNIT)
        // || value.equalsIgnoreCase(AttributePropertiesImpl.NO_UNIT) || value
        // .equalsIgnoreCase(AttributePropertiesImpl.NO_STD_UNIT));
        // if (!isADefaultValue && !presentValue.equals(value) && !value.isEmpty() && !value.equals("NaN")) {
        // LOGGER.debug("update in DB {}, property {}= {}", new Object[] { attributeName, propertyName, value });
        // final Map<String, String[]> propInsert = new HashMap<String, String[]>();
        // propInsert.put(propertyName, new String[] { value });
        // DatabaseFactory.getDatabase().setAttributeProperties(deviceName, attributeName, propInsert);
        // }
        // } else {
        logger.debug("update in DB {}, property {}= {}", new Object[] { attributeName, propertyName, value });
        final Map<String, String[]> propInsert = new HashMap<String, String[]>();
        propInsert.put(propertyName, new String[] { value });
        DatabaseFactory.getDatabase().setAttributeProperties(deviceName, attributeName, propInsert);
        // }
        xlogger.exit();
    }
257719
public void removeAttribute(final String attributeName) throws DevFailed {
        final AttributeImpl toRemove = dynamicAttributes.get(attributeName.toLowerCase(Locale.ENGLISH));
        if (toRemove == null)
            throw DevFailedUtils.newDevFailed("API_AttributeNotFound", "Attribute \'" + attributeName + "\' not found");
        if (toRemove.getBehavior() instanceof ForwardedAttribute) {
            final ForwardedAttribute att = (ForwardedAttribute) toRemove.getBehavior();
            final String lower = att.getRootName().toLowerCase(Locale.ENGLISH);
            forwardedAttributes.remove(lower);
        }
        deviceImpl.removeAttribute(toRemove);
        dynamicAttributes.remove(attributeName);
        deviceImpl.pushInterfaceChangeEvent(false);
    }
93600
public void setAttributeValue(final IDeviceAttributeDAO devatt)
	    throws DevFailed {

	attrval.name = devatt.getName();
	attrval.quality = devatt.getQuality();
	attrval.time = devatt.getTimeVal();
	attrval.r_dim = devatt.getReadAttributeDim();
	attrval.w_dim = devatt.getWriteAttributeDim();
	attrval.r_dim.dim_x = devatt.getReadAttributeDim().dim_x;
	attrval.r_dim.dim_y = devatt.getReadAttributeDim().dim_y;

	if (devatt.getWriteAttributeDim() != null) {
	    attrval.w_dim.dim_x = devatt.getWriteAttributeDim().dim_x;
	    attrval.w_dim.dim_y = devatt.getWriteAttributeDim().dim_y;
	} else {
	    attrval.w_dim = devatt.getReadAttributeDim();// write as read
	}

	attrval.err_list = null;
	// Get the value from Union object
	attrval.value = ApiUtil.get_orb().create_any();
	// GA
	// devatt.setValueAsAny(this);
	((DeviceAttributeDAODefaultImpl) devatt).setValueAsAny(this);
    }
1087823
public void delete_attribute_property(String attname, String propname) throws DevFailed {
        deviceProxyDAO.delete_attribute_property(this, attname, propname);
    }