Package br.com.kuntzer.rodrigo.cursoviasoft.entity

Examples of br.com.kuntzer.rodrigo.cursoviasoft.entity.Empresa


  public UserDetails loadUserByUsernameAndCompany(String username, String company) {
    if(StringUtils.isNotEmpty(company) && NumberUtils.isNumber(company)){
      Long idempresa = Long.valueOf(company);
      Usuario usuario = usuarioRepository.obterUsuarioPorUsernameAndEmpresa(username, idempresa);
      if(usuario != null){
        Empresa empresa = empresaRepository.obterPorId(idempresa);
        return new UsuarioUserDetails(usuario, empresa);
      }
    }
    throw new UsernameNotFoundException("login.user.notfound");
  }
View Full Code Here


    return empresaService.obterTodasEmpresas();
  }
 
  public void initForm(){
    if(this.id == null){
      this.entity = new Empresa();
    }else{
      this.entity = empresaService.obterEmpresaPorId(id);
    }
  }
View Full Code Here

TOP

Related Classes of br.com.kuntzer.rodrigo.cursoviasoft.entity.Empresa

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.