Example usage for org.springframework.beans BeanUtils copyProperties

List of usage examples for org.springframework.beans BeanUtils copyProperties

Introduction

In this page you can find the example usage for org.springframework.beans BeanUtils copyProperties.

Prototype

public static void copyProperties(Object source, Object target) throws BeansException 

Source Link

Document

Copy the property values of the given source bean into the target bean.

Usage

From source file:org.wallride.support.AuthorizedUser.java

public AuthorizedUser(User user) {
    BeanUtils.copyProperties(user, this);

    List<GrantedAuthority> authorities = new ArrayList<>(user.getRoles().size());
    for (Role role : user.getRoles()) {
        authorities.add(new SimpleGrantedAuthority("ROLE_" + role.name()));
    }/*from  w  w  w.  jav a  2  s.co m*/
    this.authorities = authorities;
}

From source file:org.nekorp.workflow.desktop.servicio.bridge.EvidenciaBridge.java

@Override
public void unload(EvidenciaVB origen, Evidencia destino) {
    BeanUtils.copyProperties(origen, destino);
}

From source file:org.wallride.web.controller.admin.user.UserEditForm.java

public static UserEditForm fromDomainObject(User user) {
    UserEditForm form = new UserEditForm();
    BeanUtils.copyProperties(user, form);
    return form;
}

From source file:me.tfeng.toolbox.dust.JsEngineConfig.java

public void copy(JsEngineConfig config) {
    BeanUtils.copyProperties(config, this);
}

From source file:org.nekorp.workflow.desktop.servicio.bridge.TelefonoModelBridge.java

@Override
public void unload(TelefonoVB origen, Telefono destino) {
    BeanUtils.copyProperties(origen, destino);
}

From source file:org.covito.kit.web.springmvc.controller.BaseController.java

public void copyProperties(Object source, Object target) {
    BeanUtils.copyProperties(source, target);
}

From source file:de.ingrid.interfaces.csw.admin.command.RequestDefinitionCommandObject.java

public RequestDefinitionCommandObject(RequestDefinition rd) {
    super();
    BeanUtils.copyProperties(rd, this);
}

From source file:com.seachangesimulations.platform.mvc.formbeans.developer.DevDefinePluginFormBean.java

/**
 * Copy in parameters (avoiding need for InitBinding or white/black listing)
 * /*from   w w w .j  av a2  s  . c  om*/
 * @param plugin
 */
public DevDefinePluginFormBean(Plugin plugin) {

    // Plugin is source, this is target.
    BeanUtils.copyProperties(plugin, this);

}

From source file:org.wallride.web.controller.admin.category.CategoryCreateForm.java

public static CategoryCreateForm fromDomainObject(Category category) {
    CategoryCreateForm form = new CategoryCreateForm();
    BeanUtils.copyProperties(category, form);
    return form;// w ww  .jav  a 2  s.  c  o  m
}

From source file:technology.tikal.ventas.model.pedido.ofy.PedidoOfy.java

@Override
public void update(Pedido source) {
    BeanUtils.copyProperties(source, this);
}