code: public <T> BinaryValue getRiakKey(T obj)
      {
          // TODO: charset
          BinaryValue key = null;
          if (riakKeyGetter != null)
          {
              if (riakKeyGetter.getReturnType().isArray())
              {
                  Object o = getMethodValue(riakKeyGetter, obj);
                  if (o != null)
                  {
                      key = BinaryValue.create((byte[]) o);
                  }
              }
              else
              {
                  Object o = getMethodValue(riakKeyGetter, obj);
                  if (o != null)
                  {
                      key = BinaryValue.create((String) o);
                  }
              }
          }
          else if (riakKeyField != null)
          {
              if (riakKeyField.getType().equals(String.class))
              {
                  Object o = getFieldValue(riakKeyField, obj);
                  if (o != null)
                  {
                      key = BinaryValue.create((String) o);
                  }
              }
              else
              {
                  Object o = getFieldValue(riakKeyField, obj);
                  if (o != null)
                  {
                      key = BinaryValue.create((byte[]) o);
                  }
              }
          }
  
          return key;
      }
docs: Returns the key.
  <p>
  The @RiakKey annotation allows for any type to be used. this method will
  call the object's toString() method to return a String.
  </p>
  
  @param <T> the type of the domain object
  @param obj the domain object
  @return the String representation of the key