Posts by oitathi • 167 points
25 posts
-
1
votes0
answers41
viewsQ: How to mock a method that has varargs as arguments?
I would like to mock this method: @Override @Transactional(propagation = Propagation.REQUIRED, readOnly = true) public List<E> buscarTodos(String ... sorting) { Sort sort = null; if (sorting…
-
0
votes3
answers171
viewsA: How to filter a list of objects? How can I write this method better?
private List<Projeto> filtraResultado(List<Projeto> projetosAssinados, String[] filtros) { List<Projeto> result = new ArrayList<Projeto>(); boolean…
-
0
votes3
answers171
viewsQ: How to filter a list of objects? How can I write this method better?
I would like to write this method in a cleaner and more performing way. Someone has an idea? private List<Projeto> filtraResultado(List<Projeto> projetosAssinados, String[] filtros){…
-
0
votes0
answers77
viewsQ: Mockito with Nativequery
need to test a method that uses Native query. However on line Query q = em.createNativeQuery(strQuery, Projeto.class); No value is assigned to q and it is null. Can someone help me? It follows the…
-
0
votes3
answers2918
viewsA: pass input text value to an angle function
ran with ngModel and failed to name the tag <input [(ngModel)]="filtro" name ="filtro" class= "rounded mb-3" type="search" placeholder="search..." autofocus>
-
0
votes3
answers2918
viewsQ: pass input text value to an angle function
Could someone help me pass the content of an input text to a function at the angle? my html is: <form class= "form mt-4"> <mat-card> <mat-card-header> <mat-card-title>{{…
-
0
votes1
answer2425
viewsA: Cannot read Property 'data' of Undefined
the service was wrong! This is the one!: public buscaAtestados( filtro: string, page: number, ord:string, dir:string): Observable<Page> { return this.httpClient…
-
1
votes2
answers336
viewsA: Show Page from Springboot at angle 6 using Angular Material Data Table
I managed to resolve, as I am returning a Page from my Api, the observable had to be of the Page type .. The error was in my service. Follows corrected code: public buscaAtestados( filtro: string,…
-
0
votes1
answer2425
viewsQ: Cannot read Property 'data' of Undefined
I’m getting the following sponse: {"content":[{"id":"33","dsProjeto":"EXT-016370-00002","nomeProjeto":"Brazil IT…
-
0
votes2
answers336
viewsQ: Show Page from Springboot at angle 6 using Angular Material Data Table
Hello, I’m starting in angular and would like to show the result of a search that is coming from an api I built using springboot. my Sponse is coming like this: {,…} content: [{id: 33, dsProjeto:…
-
1
votes1
answer2178
viewsQ: Error creating a Restful Web Services with Spring Boot - Whitelabel Error Page -
I am trying to create a Restful Web Services with Spring Boot, however my page is showing the following error: Whitelabel Error Page This application has no explicit mapping for /error, so you are…
-
0
votes1
answer74
viewsQ: Doubt with Function in Java
I’m trying to figure out what happens after clicking a Ubmit button on one page, to do exactly the same thing on another. On the page I’m looking at and the code is written this: <button onclick=…
-
0
votes1
answer40
viewsQ: doubts with percentages logic
Hi, I have a question about a percentage problem... Ana earns R $ 5.000,00 and Julio earns R $ 9.0000,00. They have in common a debt of R $ 6.000,00 and want to pay this amount in proportion to the…
-
-1
votes2
answers335
viewsA: Union problem in mysql
It was missing to put null affiliate in the first select and give alias to each of the second select nulls! Thank you to those who helped me!
-
0
votes1
answer330
views -
0
votes2
answers335
viewsQ: Union problem in mysql
I am trying to perform a query and is giving the following error: Unknown column 'BRANCH' in 'field list' The consultation is as follows:: SELECT TICKET, DATAHORA, TIPO, ESTADO, CRITICIDADE, LOGIN,…
-
1
votes1
answer241
viewsQ: call a page by passing parameters in the url
I have a simple HTML file that is accessed by: https:111.111.111:8080/index.html/?login="me"&password="1234" The problem is that when trying to access it gives page non-existent. I put a page…
-
1
votes3
answers110
viewsQ: How to call the same method with different arguments but inherited from the same mother class?
I have two classes (ColunaDoGrafico and ColunaDoRelatorio) extending from Coluna. My Column class has the following structure: public class Coluna { protected String tipoFiltro; protected boolean…
-
0
votes1
answer78
viewsA: Why is Hibernate deleting before saveOrUpdate()?
well, instead of the set, I used a list and it did what I expected (the opposite of what is being suggested in Optimization Inserts Hibernate when there is relationship @Manytomany ). placed in the…
-
3
votes1
answer78
viewsQ: Why is Hibernate deleting before saveOrUpdate()?
I have a m:n relationship between Column and Element. The entity that owns the relationship is Column. but when I’m saving a map of Columns, the following scenario happens: 1) In the first…
-
1
votes1
answer890
viewsQ: Best way for a bean to call another bean passing itself as a parameter in JSF
I have a 1:n relationship, where a System can have multiple Loggers. I also have two Beans: one for System (Systemsbean that refers to page systems.xhtml) and another for Logger (Loggerbean that…
-
0
votes1
answer162
viewsQ: Object comes pro bean with all blank JSF fields
I have a list of Predio objects that is being iterated in my xthml Then, for each iteration, I create a panel and in each panel I display the name of each of the predicates in the list and a button…
-
0
votes0
answers73
viewsQ: Hibernate does not save oneToMany
I have a 1 -> n relationship between Connection and Reporting. The classes are as follows:: @Entity @Table(name = "conexao") public class Conexao { @Id @GeneratedValue(strategy =…
-
1
votes2
answers2038
views -
4
votes2
answers2038
views