// Path: src/main/java/com/poseidon/builder/ContaViewBuilder.java
// public class ContaViewBuilder {
// 
//     private ContaView myObject;
// 
//     public ContaViewBuilder(){
//         myObject= new ContaView();
//     }
// 
//     public ContaView build(){
//         return myObject;
//     }
// 
//     public ContaViewBuilder convertUsersThroughContaView(Users users){
//         myObject.setPassword(users.getPassword());
//         myObject.setUsername(users.getUsername());
//         return this;
//     }
// 
//     public ContaViewBuilder withAuthority(String authority){
//         myObject.setRole(authority);
//         return this;
//     }
// 
// 
// 
// 
// 
// }
// 
// Path: src/main/java/com/poseidon/dao/AuthoritiesRepository.java
// public interface AuthoritiesRepository extends CrudRepository<Authorities, Long>{
// 	
// 	  public Authorities findByUsername(String username);
// 	  
// }
// 
// Path: src/main/java/com/poseidon/dao/UserRepository.java
// public interface UserRepository  extends CrudRepository<Users, Long> {
// 	
//     public Users findByUsername(String username);
//     
// }
// 
// Path: src/main/java/com/poseidon/enums/CRUDViewEnum.java
// public enum CRUDViewEnum {
// 
//     IS_SAVE("isSave"),
//     IS_DELETE("isDelete"),
//     IS_UPDATE("isUpdate"),
//     IS_SEARCH("isSearch");
// 
// 
// 
//     private String operation;
// 
//     CRUDViewEnum(String operation) {
//     this.operation=operation;
//     }
// 
//     public String getOperation() {
//         return operation;
//     }
// }


import com.google.common.collect.Lists;
import com.poseidon.annotation.NotNullArgs;
import com.poseidon.annotation.ViewName;
import com.poseidon.builder.ContaViewBuilder;
import com.poseidon.dao.AuthoritiesRepository;
import com.poseidon.dao.UserRepository;
import com.poseidon.enums.CRUDViewEnum;
import com.poseidon.model.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import java.util.List;
import java.util.logging.Logger;
package com.poseidon.controller;



@Controller
@RequestMapping("/admin")
public class ContaController extends ControllerBase {

    public static final String ROLE_PREFIX = "ROLE_";

    public static final String CONTAS_CLASS_NAME = "contas";
    public static final String CONTA_VIEW_NAME = "Conta";
    public static final String REDIRECT_ADMIN_CONTA = "redirect:/admin/conta";

    @Autowired
    AuthoritiesRepository authoritiesRepository;

    @Autowired
// Path: src/main/java/com/poseidon/builder/ContaViewBuilder.java
// public class ContaViewBuilder {
// 
//     private ContaView myObject;
// 
//     public ContaViewBuilder(){
//         myObject= new ContaView();
//     }
// 
//     public ContaView build(){
//         return myObject;
//     }
// 
//     public ContaViewBuilder convertUsersThroughContaView(Users users){
//         myObject.setPassword(users.getPassword());
//         myObject.setUsername(users.getUsername());
//         return this;
//     }
// 
//     public ContaViewBuilder withAuthority(String authority){
//         myObject.setRole(authority);
//         return this;
//     }
// 
// 
// 
// 
// 
// }
// 
// Path: src/main/java/com/poseidon/dao/AuthoritiesRepository.java
// public interface AuthoritiesRepository extends CrudRepository<Authorities, Long>{
// 	
// 	  public Authorities findByUsername(String username);
// 	  
// }
// 
// Path: src/main/java/com/poseidon/dao/UserRepository.java
// public interface UserRepository  extends CrudRepository<Users, Long> {
// 	
//     public Users findByUsername(String username);
//     
// }
// 
// Path: src/main/java/com/poseidon/enums/CRUDViewEnum.java
// public enum CRUDViewEnum {
// 
//     IS_SAVE("isSave"),
//     IS_DELETE("isDelete"),
//     IS_UPDATE("isUpdate"),
//     IS_SEARCH("isSearch");
// 
// 
// 
//     private String operation;
// 
//     CRUDViewEnum(String operation) {
//     this.operation=operation;
//     }
// 
//     public String getOperation() {
//         return operation;
//     }
// }


// Path: src/main/java/com/poseidon/controller/ContaController.java
import com.google.common.collect.Lists;
import com.poseidon.annotation.NotNullArgs;
import com.poseidon.annotation.ViewName;
import com.poseidon.builder.ContaViewBuilder;
import com.poseidon.dao.AuthoritiesRepository;
import com.poseidon.dao.UserRepository;
import com.poseidon.enums.CRUDViewEnum;
import com.poseidon.model.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import java.util.List;
import java.util.logging.Logger;

package com.poseidon.controller;



@Controller
@RequestMapping("/admin")
public class ContaController extends ControllerBase {

    public static final String ROLE_PREFIX = "ROLE_";

    public static final String CONTAS_CLASS_NAME = "contas";
    public static final String CONTA_VIEW_NAME = "Conta";
    public static final String REDIRECT_ADMIN_CONTA = "redirect:/admin/conta";

    @Autowired
    AuthoritiesRepository authoritiesRepository;

    @Autowired
    UserRepository userRepository;