@Override public final DataTagUpdate configureCacheObject(final T dataTag,final Properties properties) throws ConfigurationException, IllegalArgumentException, IllegalAccessException {
  DataTagCacheObject dataTagCacheObject=(DataTagCacheObject)dataTag;
  DataTagUpdate dataTagUpdate=setCommonProperties(dataTagCacheObject,properties);
  String tmpStr;
  if (equipmentFacade != null && !(dataTagCacheObject instanceof ControlTag)) {
    if ((tmpStr=properties.getProperty("equipmentId")) != null) {
      try {
        dataTagCacheObject.setEquipmentId(Long.valueOf(tmpStr));
        dataTagCacheObject.setProcessId(equipmentFacade.getProcessIdForAbstractEquipment(dataTagCacheObject.getEquipmentId()));
      }
 catch (      NumberFormatException e) {
        throw new ConfigurationException(ConfigurationException.INVALID_PARAMETER_VALUE,"NumberFormatException: " + "Unable to convert parameter \"equipmentId\" to Long: " + tmpStr);
      }
    }
 else     if ((tmpStr=properties.getProperty("subEquipmentId")) != null) {
      try {
        dataTagCacheObject.setSubEquipmentId(Long.valueOf(tmpStr));
        dataTagCacheObject.setProcessId(subEquipmentFacade.getProcessIdForAbstractEquipment(dataTagCacheObject.getSubEquipmentId()));
      }
 catch (      NumberFormatException e) {
        throw new ConfigurationException(ConfigurationException.INVALID_PARAMETER_VALUE,"NumberFormatException: " + "Unable to convert parameter \"subEquipmentId\" to Long: " + tmpStr);
      }
    }
  }
  if ((tmpStr=properties.getProperty("minValue")) != null) {
    if (tmpStr.equals("null")) {
      dataTagCacheObject.setMinValue(null);
      dataTagUpdate.setMinValue(null);
    }
 else {
      Comparable comparableMin=(Comparable)TypeConverter.cast(tmpStr,dataTagCacheObject.getDataType());
      dataTagCacheObject.setMinValue(comparableMin);
      dataTagUpdate.setMinValue((Number)comparableMin);
    }
  }
  if ((tmpStr=properties.getProperty("maxValue")) != null) {
    if (tmpStr.equals("null")) {
      dataTagCacheObject.setMaxValue(null);
      dataTagUpdate.setMaxValue(null);
    }
 else {
      Comparable comparableMax=(Comparable)TypeConverter.cast(tmpStr,dataTagCacheObject.getDataType());
      dataTagCacheObject.setMaxValue(comparableMax);
      dataTagUpdate.setMaxValue((Number)comparableMax);
    }
  }
  tmpStr=properties.getProperty("address");
  if (tmpStr != null) {
    DataTagAddress dataTagAddress=DataTagAddress.fromConfigXML(tmpStr);
    dataTagCacheObject.setAddress(dataTagAddress);
    setUpdateDataTagAddress(dataTagAddress,dataTagUpdate);
  }
  if (dataTag.getEquipmentId() != null)   dataTagUpdate.setEquipmentId(dataTag.getEquipmentId());
  return dataTagUpdate;
}

@ Override public final DataTagUpdate configureCacheObject ( final T dataTag , final Properties properties ) throws ConfigurationException , IllegalArgumentException , IllegalAccessException { DataTagCacheObject dataTagCacheObject = ( DataTagCacheObject ) dataTag ; DataTagUpdate dataTagUpdate = setCommonProperties ( dataTagCacheObject , properties ) ; String tmpStr ; if ( equipmentFacade != null && ! ( dataTagCacheObject instanceof ControlTag ) ) { if ( ( tmpStr = properties . getProperty ( "equipmentId" ) ) != null ) { try { dataTagCacheObject . setEquipmentId ( Long . valueOf ( tmpStr ) ) ; dataTagCacheObject . setProcessId ( equipmentFacade . getProcessIdForAbstractEquipment ( dataTagCacheObject . getEquipmentId ( ) ) ) ; } catch ( NumberFormatException e ) { throw new ConfigurationException ( ConfigurationException . INVALID_PARAMETER_VALUE , "NumberFormatException: " + "Unable to convert parameter \"equipmentId\" to Long: " + tmpStr ) ; } } else if ( ( tmpStr = properties . getProperty ( "subEquipmentId" ) ) != null ) { try { dataTagCacheObject . setSubEquipmentId ( Long . valueOf ( tmpStr ) ) ; dataTagCacheObject . setProcessId ( subEquipmentFacade . getProcessIdForAbstractEquipment ( dataTagCacheObject . getSubEquipmentId ( ) ) ) ; } catch ( NumberFormatException e ) { throw new ConfigurationException ( ConfigurationException . INVALID_PARAMETER_VALUE , "NumberFormatException: " + "Unable to convert parameter \"subEquipmentId\" to Long: " + tmpStr ) ; } } } if ( ( tmpStr = properties . getProperty ( "minValue" ) ) != null ) { if ( tmpStr . equals ( "null" ) ) { dataTagCacheObject . setMinValue ( null ) ; dataTagUpdate . setMinValue ( null ) ; } else { Comparable comparableMin = ( Comparable ) TypeConverter . cast ( tmpStr , dataTagCacheObject . getDataType ( ) ) ; dataTagCacheObject . setMinValue ( comparableMin ) ; dataTagUpdate . setMinValue ( ( Number ) comparableMin ) ; } } if ( ( tmpStr = properties . getProperty ( "maxValue" ) ) != null ) { if ( tmpStr . equals ( "null" ) ) { dataTagCacheObject . setMaxValue ( null ) ; dataTagUpdate . setMaxValue ( null ) ; } else { Comparable comparableMax = ( Comparable ) TypeConverter . cast ( tmpStr , dataTagCacheObject . getDataType ( ) ) ; dataTagCacheObject . setMaxValue ( comparableMax ) ; dataTagUpdate . setMaxValue ( ( Number ) comparableMax ) ; } } tmpStr = properties . getProperty ( "address" ) ; if ( tmpStr != null ) { DataTagAddress dataTagAddress = DataTagAddress . fromConfigXML ( tmpStr ) ; dataTagCacheObject . setAddress ( dataTagAddress ) ; setUpdateDataTagAddress ( dataTagAddress , dataTagUpdate ) ; } if ( dataTag . getEquipmentId ( ) != null ) dataTagUpdate . setEquipmentId ( dataTag . getEquipmentId ( ) ) ; return dataTagUpdate ; }
updates configuration fields of the cache object with those contained in the properties object . by " configuration fields " we are referring to fields open to reconfiguration during runtime . in particular , values and timestamps are not modified by this method : updates due to incoming data should be processed using the other update and invalidate methods . < p > this method is thread - safe ( it performs the required synchronization on the cache object residing in the cache . < p > this method should preferably be performed on an object outside the cache before being applied to the object residing in the cache , since changes cannot be rolled back if the validation fails . < p > the returned change object can be used to inform the data when an update is performed ( not used during datatag creation ) . throws configurationexception if the reconfigured cache object fails validation checks ( unchecked ) throws illegalargumentexception thrown when creating daq change event for hardwareaddress ( unchecked )
