Posts by Elyel Rubens da Rosa • 517 points
18 posts
-
0
votes2
answers240
viewsA: JDBC, query returns false but saved in database
This is because the method execute class PreparedStatement returns true if the first result is an object of type ResultSet and false if the first result is a contador de update or no result. By…
-
2
votes1
answer659
viewsQ: Show only hours in the Primefaces Legend component
How to display to the user the option to select only hours and minutes in the component <p:calendar> of Primefaces I have two fields with start and end times to select, but even putting the…
-
5
votes3
answers1598
viewsQ: Hibernate vs Eclipselink
Both persistence frameworks implement JPA. 1 - There is a difference between the two? 2 - Which is the best in performance? 3 - As the two implement the same specification, after developing a…
-
2
votes1
answer365
viewsQ: What is Optimistic JPA Locking Field
What is and what is the "Optimistic Locking Field" of JPA? I noticed that there is this option for Eclipse Link and Hibernate and this function is enabled when annotating a version attribute within…
-
1
votes1
answer106
viewsA: Filter email reading from a date
I was able to solve the problem used javax.mail.search.SearchTerm and replacing inbox.getMessages() for inbox.search(dataInicio) as code below. try { email.conectar(); javax.mail.Store store =…
-
1
votes1
answer106
viewsQ: Filter email reading from a date
I have the following piece of code that performs the reading of emails from the inbox. try { email.conectar(); javax.mail.Store store = email.getArquivoEmail(); Folder inbox =…
-
0
votes3
answers1411
viewsA: Compare an integer typed with each Enum value
I suggest you change your enum, you are using the class reference to change a variable final what is not correct, use the thisfor this. Add methods to your enum to facilitate their work. I suggest…
-
2
votes1
answer2032
viewsA: How to create style condition in Jaspersoft Studio?
1. Create a new style 2. Select the new style created, and change its name as shown below 3. Right-click on the new style created and then click on create new conditional style as follows in the…
-
0
votes1
answer666
viewsQ: Problem starting java program with windows
Important explanations: I have an application created in JAVA; An "EXE" executable was created using Launch4j; I have the need to run this application after windows startup. FIRST ATTEMPT A shortcut…
-
1
votes1
answer522
viewsA: How to use the TIMER class in a method with Math.max and Math.min
You can use TimerTask and Timerof java.util Follow an example: import java.util.TimerTask; public class ExemploTimer extends TimerTask { private int numeroExecucao = 0; @Override public void run() {…
-
5
votes2
answers2263
viewsA: Modeling for comprehensive entity registration
I believe the way to make it as generic as possible is to keep Pessoa Física and Juridical Person, so that both are People, but the best way to do this is to start drawing as you can see in the…
-
1
votes2
answers4563
viewsA: How to create an executable in java + Mysql database?
First you need to package your project including all its dependencies, recommend that you research a little more about ANT and Big jar. For the netbeans HERE has an example of how to compile your…
-
0
votes1
answer406
viewsA: method that checks if there is any record in my database
Your method acknowledgementsDao.selectAckTemporary2() returns an object Acknowledgementstemporary when you find a result and null when not found, so this method can not be used alone inside the if,…
javaanswered Elyel Rubens da Rosa 517 -
1
votes1
answer627
viewsA: How to get current month with getDisplayName
Running the above example, I did not get any error, returned the correct month. Before executing the code, check that the date of the system on which the JVM is running is correct. import…
-
2
votes3
answers1771
viewsA: Code comments when working in a group
Well, I am totally against comments in codes, but as you yourself reported has always moved the gambiarra and consequently to gambiarra there is no convention. Comments too much as in the last…
-
1
votes1
answer211
viewsA: Why can’t I instantiate an object by clicking my button?
Daniela, I ran your code to test and realized that you have problems when authenticating. 1 - Check if the email actually has is "[email protected]" because I believe it should be…
-
7
votes2
answers344
viewsA: Split column into multiple tables
I suggest using this way: So you can get full control of the movies by genre, how many action films you own, how many action films and comedy you have, using just one JOIN.…
-
2
votes2
answers2692
viewsA: Change project dependency folder (lib)
I believe you are looking to do something like "Big Jar", packaging all dependencies within a single file. jar For this you must use the "Ant". In Netbeans, open the build.xml file and leave the…