Get the object returned by the given Attribute.

@param <T> class the return value will be casted to
@param _attribute the object is wanted for
@return object for the select statement
@throws EFapsException on error
343021
@SuppressWarnings("unchecked")
    public <T> T getAttribute(final Attribute _attribute)
        throws EFapsException
    {
        return (T) getAttribute(_attribute.getName());
    }
1185389
public AbstractPrintQuery addAttribute(final String... _attrNames)
        throws EFapsException
    {
        final Type type = getMainType();
        if (type != null) {
            for (final String attrName : _attrNames) {
                final Attribute attr = type.getAttribute(attrName);
                if (attr == null) {
                    final AttributeSet set = AttributeSet.find(type.getName(), attrName);
                    if (set != null) {
                        addAttributeSet(set);
                    }
                } else {
                    addAttribute(attr);
                }
            }
        }
        return this;
    }
60724
@Override
    public synchronized Object getAttribute(Object name) {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINER)) {
            String s = name + appNameAndIdString;
            LoggingUtil.SESSION_LOGGER_CORE.entering(methodClassName, methodNames[GET_ATTRIBUTE], s);
        }
        Object o = _attributes.get(name);
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
            if (!SessionManagerConfig.isHideSessionValues()) {
                LoggingUtil.SESSION_LOGGER_CORE.exiting(methodClassName, methodNames[GET_ATTRIBUTE], o);
            } else {
                LoggingUtil.SESSION_LOGGER_CORE.exiting(methodClassName, methodNames[GET_ATTRIBUTE]);
            }
        }
        return o;
    }
1290304
public Properties getObjectAttributeValueAsProperties(final String _key)
        throws EFapsException
    {
        final Properties ret = new Properties();
        final String value = getValue(_key, ConfType.OBJATTR);
        if (value != null) {
            try {
                ret.load(new StringReader(value));
            } catch (final IOException e) {
                throw new EFapsException(SystemConfiguration.class, "getObjectAttributeValueAsProperties", e);
            }
        }
        return ret;
    }
1238500
def getAttribute(self, attr: str) -> _AttrValueType:
        
        if attr == 'class':
            if self.classList:
                return self.classList.toString()
            return None
        attr_node = self.getAttributeNode(attr)
        if attr_node is None:
            return None
        return attr_node.value
1001804
def get_attribute(self, obj, attribute):
        
        raw_return = self.send_command_return(obj, attribute, '?')
        if len(raw_return) > 2 and raw_return[0] == '"' and raw_return[-1] == '"':
            return raw_return[1:-1]
        return raw_return
978136
public Object getAttribute(String name) {
        if (!_iSess.isValid())
            throw new IllegalStateException();
        Object value = null;
        if (_iSess != null) {
            value = _iSess.getAttribute(name);
        }
        return value;
    }
469399
public <T> T getAttribute(String key, Class<T> clazz) {
        return (T) getAttribute(key);
    }
143380
public AbstractPrintQuery addAttributeSet(final AttributeSet _set)
        throws EFapsException
    {
        final String key = "linkfrom[" + _set.getName() + "#" + _set.getAttributeName() + "]";
        final OneSelect oneselect = new OneSelect(this, key);
        this.allSelects.add(oneselect);
        this.attr2OneSelect.put(_set.getAttributeName(), oneselect);
        oneselect.analyzeSelectStmt();
        for (final String setAttrName : _set.getSetAttributes()) {
            if (!setAttrName.equals(_set.getAttributeName())) {
                oneselect.getFromSelect().addOneSelect(new OneSelect(this, _set.getAttribute(setAttrName)));
            }
        }
        oneselect.getFromSelect().getMainOneSelect().setAttribute(_set.getAttribute(_set.getAttributeName()));
        return this;
    }
505236
private void readFromDBAttributes()
        throws EFapsException
    {
        Connection con = null;
        try {
            con = Context.getConnection();
            Statement stmt = null;
            try {
                stmt = con.createStatement();

                final StringBuilder cmd = new StringBuilder("select ");
                for (final AttrName attrName : Person.AttrName.values()) {
                    cmd.append(attrName.sqlColumn).append(",");
                }
                cmd.append("0 as DUMMY ").append("from V_USERPERSON ").append("where V_USERPERSON.ID=").append(getId());

                final ResultSet resultset = stmt.executeQuery(cmd.toString());
                if (resultset.next()) {
                    for (final AttrName attrName : Person.AttrName.values()) {
                        final String tmp = resultset.getString(attrName.sqlColumn);
                        setAttrValue(attrName, tmp == null ? null : tmp.trim());
                    }
                }
                resultset.close();
            } catch (final SQLException e) {
                Person.LOG.error("read attributes for person with SQL statement is not " + "possible", e);
                throw new EFapsException(Person.class, "readFromDBAttributes.SQLException", e, getName(), getId());
            } finally {
                try {
                    if (stmt != null) {
                        stmt.close();
                    }
                    con.commit();
                } catch (final SQLException e) {
                    Person.LOG.error("close of SQL statement is not possible", e);
                }
            }
        } finally {
            try {
                if (con != null && !con.isClosed()) {
                    con.close();
                }
            } catch (final SQLException e) {
                throw new CacheReloadException("could not read child type ids", e);
            }
        }
    }
908241
public static <T> T getRequestAttribute(ServletRequest req, String name, Class<T> cls, Set<GetOpts> opts, T defaultValue)
	{
		Object o;

		if(req == null)
			throw new NullPointerException("req cannot be null");
		if(name == null)
			throw new NullPointerException("name cannot be null");
		if(cls == null)
			throw new NullPointerException("cls cannot be null");
		if(opts == null)
			opts = EMPTY_OPTS;
		if((o = req.getAttribute(name))==null)
		{
			if(opts.contains(GetOpts.THROW_ON_MISSING))
				throw new IllegalStateException("Request attribute " + name + " is not present.");
			if(opts.contains(GetOpts.LOG_ON_MISSING))
				logger.warn("Request attribute " + name + " is not present.");
			return defaultValue;
		}
		if(!cls.isInstance(o))
		{
			if(opts.contains(GetOpts.THROW_ON_WRONG_TYPE))
				throw new IllegalStateException("Request attribute " + name + " was of type " + o.getClass().getName() + " instead of " + cls.getName());
			if(opts.contains(GetOpts.LOG_ON_MISSING))
				logger.warn("Request attribute " + name + " was of type " + o.getClass().getName() + " instead of " + cls.getName());
			return defaultValue;
		}
		return cls.cast(o);
	}
614409
public <T> T getDataAttr(String dPath, Class<T> clazz) {
        Lock lock = lockForRead();
        try {
            return DPathUtils.getValue(dataJson, dPath, clazz);
        } finally {
            lock.unlock();
        }
    }
1286402
public Attribute attribute(final String _alias)
        throws EFapsException
    {
        initialize(true);
        Attribute ret = null;
        final Optional<Select> selectOpt = this.selection.getSelects()
                        .stream()
                        .filter(select -> _alias.equals(select.getAlias()))
                        .findFirst();
        if (selectOpt.isPresent()) {
            ret = attribute(selectOpt.get());
        }
        return ret;
    }
644129
@SuppressWarnings("unchecked")
    public List<Instance> getInstances()
        throws EFapsException
    {
        final List<Instance> ret = new ArrayList<>();
        // no value select means, that the from select must be asked
        if (this.valueSelect == null) {
            ret.addAll(this.fromSelect.getMainOneSelect().getInstances());
        } else {
            // if an oid select was given the oid is evaluated
            if ("oid".equals(this.valueSelect.getValueType())) {
                for (final Object object : this.objectList) {
                    final Instance inst = Instance.get((String) this.valueSelect.getValue(object));
                    if (inst.isValid()) {
                        ret.add(inst);
                    }
                }
            } else {
                final List<Long> idTmp;
                if (this.valueSelect.getParentSelectPart() != null
                                && this.valueSelect.getParentSelectPart() instanceof LinkToSelectPart) {
                    idTmp = (List<Long>) this.valueSelect.getParentSelectPart().getObject();
                } else {
                    idTmp = this.idList;
                }
                for (final Long id : idTmp) {
                    if (id != null) {
                        ret.add(Instance.get(this.valueSelect.getAttribute().getParent(), String.valueOf(id)));
                    }
                }
            }
        }
        return ret;
    }
1129969
public Attribute attribute(final int _idx)
        throws EFapsException
    {
        initialize(true);
        Attribute ret = null;
        final int idx = _idx - 1;
        if (this.selection.getSelects().size() > idx) {
            final Select select = this.selection.getSelects().get(idx);
            ret = attribute(select);
        }
        return ret;
    }
1306902
public <T> T get(final CIAttribute _ciAttr)
        throws EFapsException
    {
        return get(Print.getDefaultAlias(_ciAttr));
    }
38803
@SuppressWarnings("unchecked")
    public <T> T getSelect(final SelectBuilder _selectBldr)
        throws EFapsException
    {
        final OneSelect oneselect = this.selectStmt2OneSelect.get(_selectBldr.toString());
        return oneselect == null ? null : (T) oneselect.getObject();
    }