예제 #1
1
  /**
   * Gets the name.
   *
   * @return the name
   */
  public String getName() {
    StringBuilder name = new StringBuilder();

    if (!StringUtil.isNullOrEmpty(title)) {
      name.append(title);
    }

    if (!StringUtil.isNullOrEmpty(firstname)) {
      if (name.length() > 0) {
        name.append(" ");
      }

      name.append(firstname);
    }

    if (!StringUtil.isNullOrEmpty(lastname)) {
      if (name.length() > 0) {
        name.append(" ");
      }

      name.append(lastname);
    }

    return name.toString();
  }
예제 #2
0
    /**
     * Gets the name.
     *
     * @return the name
     */
    public String getName() {

      return StringUtil.titleCase(name());
    }