}
if (this.isSimpleMotorBeanGUI) {
double position = 0;
TangoKey attrKey = generateAttributeKey(this.deviceBundle
.getString("UserMotorBean.attribut.position"));
TangoDAOFactory DAOFactory = new TangoDAOFactory();
AbstractDAO<Number> attrDAO = DAOFactory.createNumberDAO(attrKey);
if (attrDAO != null && attrDAO.getData() != null) {
position = attrDAO.getData().doubleValue();
}
double distance = Math.abs(this.targetValue - position);
if (distance > 0.00001) {
if (this.increment == 0) {
position = this.targetValue;
}
else if (this.targetValue != position) {
if (distance > this.increment) {
position += this.increment * Math.signum(this.targetValue - position);
}
else {
position = this.targetValue;
}
}
}
this.attr.insert(position);
}
else {
double position = 0;
TangoKey positionKey = generateAttributeKey(this.deviceBundle
.getString("UserMotorBean.attribut.position"));
TangoDAOFactory daoFactory = new TangoDAOFactory();
AbstractDAO<Number> positionDAO = daoFactory.createNumberDAO(positionKey);