class ReadableUserPopulator extends AbstractDataPopulator<User, ReadableUser> {

  @Override
  public ReadableUser populate(User source, ReadableUser target, MerchantStore store,
      Language language) throws ConversionException {<FILL_FUNCTION_BODY>}

  @Override
  protected ReadableUser createTarget() {
    // TODO Auto-generated method stub
    return null;
  }

}

    Validate.notNull(source, "User cannot be null");

    if (target == null) {
      target = new ReadableUser();
    }

    target.setFirstName(source.getFirstName());
    target.setLastName(source.getLastName());
    target.setEmailAddress(source.getAdminEmail());
    target.setUserName(source.getAdminName());
    target.setActive(source.isActive());

    if (source.getLastAccess() != null) {
      target.setLastAccess(DateUtil.formatLongDate(source.getLastAccess()));
    }

    // set default language
    target.setDefaultLanguage(Constants.DEFAULT_LANGUAGE);

    if (source.getDefaultLanguage() != null)
      target.setDefaultLanguage(source.getDefaultLanguage().getCode());
    target.setMerchant(store.getCode());
    target.setId(source.getId());


    for (Group group : source.getGroups()) {

      ReadableGroup g = new ReadableGroup();
      g.setName(group.getGroupName());
      g.setId(group.getId().longValue());
      target.getGroups().add(g);
    }

    /**
     * dates DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm a z");
     * myObjectMapper.setDateFormat(df);
     */


    return target;
  
<methods>public non-sealed void <init>() ,public java.util.Locale getLocale() ,public com.salesmanager.shop.model.user.ReadableUser populate(com.salesmanager.core.model.user.User, com.salesmanager.core.model.merchant.MerchantStore, com.salesmanager.core.model.reference.language.Language) throws com.salesmanager.core.business.exception.ConversionException,public void setLocale(java.util.Locale) <variables>private java.util.Locale locale