Posts by luanlucas • 86 points
5 posts
-
1
votes1
answer273
viewsA: Equals and Hashcode
In theory you would not need to overwrite these methods for contains to work. By default, the contains() will call the equals() of the object passed by parameter which in turn will use the…
-
0
votes2
answers104
viewsA: JPA - Java does not insert data into the database
Try replacing the @Injectof your EntityManager for @PersistenceContext. Depending on how you set up your persist.xml (or another name for the JPA implementation configuration file) it is necessary…
-
1
votes1
answer88
viewsA: add to JAVA text file
Hello. The object FileWriter has a constructor of two arguments being FileWriter(File file, boolean append) where: Constructs a Filewriter Object Given a File Object. If the Second argument is true,…
-
1
votes1
answer104
viewsA: Prime faces,play data from a datatable for a dialog
Opa. Here’s a good example: https://www.primefaces.org/showcase/ui/data/datatable/selection.xhtml, Just take a look at the code you will understand, it’s very simple. Briefly, I noticed that you do…
-
1
votes2
answers70
viewsA: Problems comparing objects coming from a list
I don’t know what your getNome_servico() returns but I guess it’s not a collection. Anyway, your method verificaServico() is returning a List, this way you should iterate (go through) this list and…