code: public Member memberByUserName(String userName) throws SDKException {
          IAssetType memberAssetType = instance.getMetaModel().getAssetType(
                  "Member");
          IAttributeDefinition nameDef = memberAssetType
                  .getAttributeDefinition("Username");
          Query query = new Query(memberAssetType);
          FilterTerm usernameTerm = new FilterTerm(nameDef);
  
          usernameTerm.equal(userName);
          query.setFilter(usernameTerm);
          query.getOrderBy().majorSort(nameDef, OrderBy.Order.Ascending);
  
          QueryResult result;
          try {
              result = instance.getServices().retrieve(query);
          } catch (V1Exception e) {
              throw new SDKException(e);
          }
  
          if (result.getAssets().length == 0) {
              return null;
          }
          Asset asset = result.getAssets()[0];
          return new Member(new AssetID(asset.getOid().getToken()), instance);
      }
docs: Retrieves the first Member with the given user name.
  
  @param userName The user name the user or member uses to login to the
  VersionOne system.
  @return The first Member with the given user name, or null if none found.
  @throws SDKException if there is a problem executing the query