private void updateBitacora(Ficha bean) { String user = KernellSecurity.instance().getCurrentUserName(); Date time = new Date(); String ip = KernellSecurity.getIPAdress(); String mac = KernellSecurity.getMacAdress(); if (bean.getId() == null) { bean.getAddresLog().setCreatedIp(ip); bean.getAddresLog().setCreatedMac(mac); bean.setCreateUser(user); bean.setCreacion(time); } bean.getAddresLog().setUpdatedIp(ip); bean.getAddresLog().setUpdatedMac(mac); bean.setUpdateUser(user); bean.setModificado(time); }