code: public AttributeQuery getAttributeQuery(final String _attributeName)
      {
          if (this.query == null) {
              try {
                  final String attribute = getAttr4Select(_attributeName);
                  this.query = new AttributeQuery(this.typeUUID, attribute.isEmpty() ? _attributeName : attribute)
                                      .setCompanyDependent(isCompanyDependent());
                  prepareQuery();
              } catch (final EFapsException e) {
                  QueryBuilder.LOG.error("Could not open AttributeQuery for uuid: {}", this.typeUUID);
              }
          }
          return (AttributeQuery) this.query;
      }
docs: Method to get an Attribute Query.
  @param _attributeName name of the attribute the value is wanted for,
  if null the id attribute will be used automatically
  @return Attribute Query