@Test public void copy() { final PFUserDO src = createUser("kai", "Kai", "Reinhard", "k.reinhard@acme.com", "Micromata", "Developer"); PFUserDO dest = createUser("kai", "Kai", "Reinhard", "k.reinhard@acme.com", "Micromata", "Developer"); assertFalse(PFUserDOConverter.copyUserFields(src, dest)); assertUser(src, "kai", "Kai", "Reinhard", "k.reinhard@acme.com", "Micromata", "Developer"); assertUser(dest, "kai", "Kai", "Reinhard", "k.reinhard@acme.com", "Micromata", "Developer"); dest = new PFUserDO(); assertTrue(PFUserDOConverter.copyUserFields(src, dest)); assertUser(src, "kai", "Kai", "Reinhard", "k.reinhard@acme.com", "Micromata", "Developer"); assertUser(dest, "kai", "Kai", "Reinhard", "k.reinhard@acme.com", "Micromata", "Developer"); assertTrue(PFUserDOConverter.copyUserFields(src, createUser("", "Kai", "Reinhard", "k.reinhard@acme.com", "Micromata", "Developer"))); assertTrue(PFUserDOConverter.copyUserFields(src, createUser("kai", "", "Reinhard", "k.reinhard@acme.com", "Micromata", "Developer"))); assertTrue(PFUserDOConverter.copyUserFields(src, createUser("kai", "Kai", "", "k.reinhard@acme.com", "Micromata", "Developer"))); assertTrue( PFUserDOConverter.copyUserFields(src, createUser("kai", "Kai", "Reinhard", "", "Micromata", "Developer"))); assertTrue(PFUserDOConverter.copyUserFields(src, createUser("kai", "Kai", "Reinhard", "k.reinhard@acme.com", "", "Developer"))); assertTrue(PFUserDOConverter.copyUserFields(src, createUser("kai", "Kai", "Reinhard", "k.reinhard@acme.com", "Micromata", ""))); }
public static boolean copyUserFields(final PFUserDO src, final PFUserDO dest) { final boolean modified = BeanHelper.copyProperties(src, dest, true, "username", "firstname", "lastname", "email", "description", "organization", "deactivated", "restrictedUser"); return modified; }
PFUserDOConverter { public static boolean copyUserFields(final PFUserDO src, final PFUserDO dest) { final boolean modified = BeanHelper.copyProperties(src, dest, true, "username", "firstname", "lastname", "email", "description", "organization", "deactivated", "restrictedUser"); return modified; } }
PFUserDOConverter { public static boolean copyUserFields(final PFUserDO src, final PFUserDO dest) { final boolean modified = BeanHelper.copyProperties(src, dest, true, "username", "firstname", "lastname", "email", "description", "organization", "deactivated", "restrictedUser"); return modified; }  }
PFUserDOConverter { public static boolean copyUserFields(final PFUserDO src, final PFUserDO dest) { final boolean modified = BeanHelper.copyProperties(src, dest, true, "username", "firstname", "lastname", "email", "description", "organization", "deactivated", "restrictedUser"); return modified; }  static Integer getId(final LdapUser user); PFUserDO convert(final LdapUser ldapUser); LdapUser convert(final PFUserDO user); static boolean isPosixAccountValuesEmpty(final LdapUser ldapUser); static boolean isSambaAccountValuesEmpty(final LdapUser ldapUser); void setLdapValues(final LdapUser ldapUser, final String ldapValuesAsXml); static LdapUserValues readLdapUserValues(final String ldapValuesAsXml); String getLdapValuesAsXml(final LdapUser ldapUser); static String getLdapValuesAsXml(final LdapUserValues values); static String buildEmployeeNumber(final PFUserDO user); static boolean copyUserFields(final PFUserDO src, final PFUserDO dest); boolean copyUserFields(final LdapUser src, final LdapUser dest); }
PFUserDOConverter { public static boolean copyUserFields(final PFUserDO src, final PFUserDO dest) { final boolean modified = BeanHelper.copyProperties(src, dest, true, "username", "firstname", "lastname", "email", "description", "organization", "deactivated", "restrictedUser"); return modified; }  static Integer getId(final LdapUser user); PFUserDO convert(final LdapUser ldapUser); LdapUser convert(final PFUserDO user); static boolean isPosixAccountValuesEmpty(final LdapUser ldapUser); static boolean isSambaAccountValuesEmpty(final LdapUser ldapUser); void setLdapValues(final LdapUser ldapUser, final String ldapValuesAsXml); static LdapUserValues readLdapUserValues(final String ldapValuesAsXml); String getLdapValuesAsXml(final LdapUser ldapUser); static String getLdapValuesAsXml(final LdapUserValues values); static String buildEmployeeNumber(final PFUserDO user); static boolean copyUserFields(final PFUserDO src, final PFUserDO dest); boolean copyUserFields(final LdapUser src, final LdapUser dest);  }