Posts by Pena Pintada • 4,678 points
123 posts
-
3
votes2
answers783
viewsQ: Do I need to do unit testing of the system entities?
I am working on a project and participating in a team , we were given the task of doing a series of tests with a system,testes de integração continua, testes unitários .... The point is that all…
-
1
votes2
answers233
viewsQ: How to make this consultation with JPA?
I would like two solutions to this question, one using a normal typedquery and the other using the criteria due to its great versatility for code. Here is my query: TypedQuery<Pessoa> query =…
-
0
votes1
answer293
viewsQ: How to create the Docker file from a Maven java SE program?
I actually wrote a Java SE Maven application using netbeans and made a CRUD for some entities that are scanned in the database through JPA. I was wondering if it is possible to run a textual…
-
0
votes2
answers703
viewsA: How to return the entity number of a table using JPA and the COUNT function?
In fact the type of return is not Integer and yes Long Here is the query: String consulta = "SELECT COUNT(e) FROM Empregado e"; TypedQuery<Long> query = em.createQuery(consulta, Long.class);…
-
1
votes2
answers703
viewsQ: How to return the entity number of a table using JPA and the COUNT function?
I am using the Eclipselink implementation and cannot solve the following query that must be wrong: Query query = em.createQuery("SELECT e , COUNT(*) FROM Empregado e"); Integer resultado = (Integer)…
-
1
votes1
answer1269
viewsQ: What is the Lombok?
What is the Lombok and how I could use it in a java class? What are the advantages and disadvantages of handling in a java application?
-
1
votes2
answers1283
viewsQ: Java socket issues, how to send and receive messages simultaneously between client and server?
I am working with java sockets and I was able to come across the following problem, writing the server class sent a message to the client to read, so far everything, ok!! But when I try to send a…
-
1
votes1
answer1315
viewsQ: How to make a Jframe return an instance of a given object?
I have a JFrame called Jframecadastre person which has only two fields name and surname, as shown in the image : Jframecadastre person: public class JFrameCadastroPessoa extends javax.swing.JFrame {…
-
2
votes1
answer94
viewsQ: Object problems using java sockets
I’m trying to pass the person object that was instantiated on the server to the client. But I’m not getting it. Below are the classes I used: Server public class ServidorTCPBasico { public static…
-
3
votes1
answer183
viewsQ: How to bring the content of a postgis query to a JSP page?
I have postgis with a database that I downloaded from ibge and I need to make a javaweb application that reads the name of a municipality and brings back the data in svg format and displays the…
-
3
votes1
answer238
viewsQ: How to turn this query into a JPQL?
I have the following query in the postgres database: select * from trabalha_projeto tp inner join Empregado e on e.matricula = tp.empregado how it turns it into a JPQL query? I’m having a hard time…
-
1
votes1
answer212
viewsQ: What would be equivalent to these two persistence.xml properties in Hibernate?
I have these two properties in eclipselink : <property name="eclipselink.logging.level.sql" value="FINE"/> <property name="eclipselink.logging.parameters" value="true"/> but I’d like to…
-
1
votes1
answer1267
viewsQ: How to deploy a web application manually in wildfly9?
I have already implanted a web application manually in Omcat, I know it is not a complete container,but now I would like to manually deploy in wildfly9 . I would like to manually implode the web…
-
2
votes1
answer630
viewsQ: How to restrict the values of a date in a field of a java form?
I have a form built with Swing (Java) that has some fields, among them there is one that is the Date of Birth (a String that receives the value of a date and has a formatted field ##/##/####.) which…
-
3
votes1
answer2066
viewsQ: How to format field for RG with issuing organ?
I have the following java class: public class TesteRG { public static void main(String[] args) { String RG = "24.77.195 ssp/pb"; Pattern pattern =…
-
5
votes2
answers2039
viewsQ: What is a hook method?
I am studying some design standards and came across this method, however, its concept was not clear to me. What the method does and how it relates to the Template Method? I’d like an example in…
-
1
votes2
answers320
viewsQ: Can I update the GIT version without losing my repositories?
My git has version 1.9.5 and the current version is 2.7.0 I can install the new version without losing my data? Because I have a series of repositories with this old version!! What should I do?…
-
1
votes1
answer4982
viewsQ: How to call the bootstrap module on the html page in a Node project?
I’m using the Node and lowered the dependence on bootstrap, but I don’t know how,call it on the index.html page, to use the bootstrap.min.css file, what should I do? I have the following directory…
-
4
votes2
answers1693
viewsQ: Why can’t I open the Mongodb interface on port : 28017?
I installed Mongo in the C drive and did some data creation tests and persisted,then consulted and there they were perfectly listed at the prompt. So far so good! I open the browser and type…
-
0
votes1
answer179
viewsQ: What HTTP error code should I use?
The project has a login page with two email fields one and another that is your password! I have a Javaweb application and in the deployment descriptor I have some declared error pages, which are…
-
1
votes1
answer1248
viewsQ: JPA(2.1) dependency on POM.xml file
I did a normal Javase project with JPA for the persistence part, and it worked, the project consists only of an entity that is persisted in the bank and nothing else. I used the following libraries:…
-
6
votes1
answer103
viewsQ: How to create an application from a Maven file?
I was working with EJB and dealing with four simple Maven projects, a web project ,a desktop project (JSE Swing), a project (JSE) that had only the interface and ultimately a web project (which I…
-
2
votes1
answer343
viewsQ: Issues in netbeans with connection to Postgres
I have a bank called BANCO_DE_TESTES in Postgres that has some random tables. In netbeans when I try to use the Master Sample Form/Detail to use JPA to create a simple crud it doesn’t work saying…
-
0
votes1
answer300
viewsQ: What is the endpoint interface in EJB?
I am studying EJB(Enterprise Java Beans) and would like to know, within the context of distributed applications, what is the role of the endpoint interface. What is the endpoint interface? Where and…
-
6
votes3
answers10207
viewsQ: What is the JBOSS?
I’m reading a book about distributed applications and he occasionally references Jboss. I would like to know what it consists of and its usefulness?
-
2
votes1
answer63
viewsQ: What is the difference between Sessions Beans and Message Drivebeans?
There are two components responsible for business logic in the EJB architecture, the Session Beans and Message Drivebeans. I would like to know the difference of both and some example of their use.…
-
23
votes2
answers2818
viewsQ: What is "Inversion of Dependency Principle" (DIP)?
I’m getting to know the beginning now SOLID: S Single Responsabilty Principle The Open/Closed L Liskov Substitution Principle I Interface Segregation D Dependency Inversion Principle However I could…
-
7
votes2
answers1363
viewsQ: What is the relationship between JPA and ORM?
I wanted to know the relationship between JPA and ORM because I was in doubt, if both ,.
-
3
votes3
answers1231
viewsQ: How does the Oracle Express Edition database work?
I would like an explanation as to the operation of the database Express Edition made available by Oracle for students, because by the terminal I created a table and made an insertion and everything…
-
51
votes3
answers26529
viewsQ: What is the difference between a class and an object?
I was reading a book on object orientation and these two entities are translated differently. What is the difference between the two?
-
14
votes1
answer5215
viewsQ: What is JNDI technology?
I am starting studies on corporate applications, and according to my teacher I will need this java technology and I would like to know what exactly is the JNDI.If possible wanted an example of its…
-
8
votes1
answer253
viewsQ: How can I record information with Arduino?
We are developing a reading system to check parameters of electrical pulses that are measured directly from the electrical network of a household, and for this to happen we need to read and archive…
arduinoasked Pena Pintada 4,678 -
5
votes1
answer347
viewsQ: What is CDI technology?
I am developing a web application and a university colleague who is a few periods beyond what I am currently studying said that using CDI would have a better performance, however, until now had not…
-
20
votes3
answers14671
viewsQ: What is the difference between Statement and Preparedstatement?
When I paid for the database chair, we worked with the bank alone, with no connection to an application that interacted externally with the DBMS. Only then was presented the JDBC(Java Database…
-
5
votes3
answers490
viewsA: How is a Framework developed?
The framework development process. There are some documented methodologies for developing a framework. Most of them, however, admit the fact that the goal is to identify abstractions with a…
-
12
votes3
answers490
viewsQ: How is a Framework developed?
I’ve used a few frameworks they really streamlined the development of my project, helped me, I didn’t have to waste time building the common part of my problem that other people had already…
-
4
votes1
answer1544
viewsQ: How to use the Servlet context Listener to start a Servlet so when the application is loaded?
I have the following declared Servlet on web.xml and would like it to be initialized before any of the other application Serrvlets: <servlet>…
-
7
votes1
answer1440
viewsQ: What is Spring MVC?
I am developing a web java project and am using the MVC (Model-view-controller),which is a standard software architecture (Pattern design) and know that its function is to separate the…
-
12
votes1
answer631
viewsQ: What is SASS technology?
Nowadays dynamism in producing styles for a page or set of pages is essential for the developer. And CSS sometimes becomes somewhat complex with complicated, repetitive, and math-heavy selectors. A…
-
23
votes1
answer975
viewsQ: What is an SVG?
Nowadays, we talk about image quality and always linked to this type of statement every now and again, this mysterious acronym appears. It seems to be SVG something really amazing, they say that…
-
2
votes2
answers1109
viewsA: How to change the opacity of a part of the image?
Maybe this code without the use of javascript can help you. To map the image you can use any image editor to get the coordinates. This code uses only HTML and CSS.I didn’t put the opacity effect.…
-
12
votes1
answer789
viewsQ: What is SOAP technology?
I’ve been following a project (a high school news site) where multiple languages (PHP to build the site where the news is posted and android, Ios, c#, where they will be accessed by the site…
-
10
votes1
answer10730
viewsQ: What is the difference between sendRedirect and requestDispatcher.forward?
What is the fundamental difference between the use of methods response.sendRedirect("Alguma pagina"); and RequestDispatcher despachar = request.getRequestDispatcher("/Alguma pagina");…
-
3
votes1
answer1301
viewsQ: How to center the two inscribed squares into the largest square with CSS?
I would like to leave the three squares of the code below, centered symmetrically in relation to the center of the largest square that has the black background. .box{ height: 100px; width: 100px;…
-
1
votes2
answers3238
viewsA: Formatting text in a Jtextpane
The reply of the friend Gui_biem is very good!! But I’ll leave mine too. Assuming both classes are in the same package: import javax.swing.JTextPane; import javax.swing.text.BadLocationException;…
javaanswered Pena Pintada 4,678 -
4
votes3
answers637
viewsA: Is it correct to state which interface solves the multiple inheritance problem in Java?
Yes, the interface can solve this problem, but not alone. In addition to the interface, we need the use of extra classes, abstract and concrete, arbitrarily delegation manual to solve the problem.…
-
0
votes1
answer910
viewsA: How to connect a link to an object? Servlet
Here is the code built it is very simple,has two JSP pages and a Servlet, here I use the standard DAO , we have the class User representing our "user" object, the class UserDAO that bridges the gap…
-
0
votes3
answers1132
viewsA: Problem with vector in C
Your answer is not wrong you can continue programming!! Below is your code I just entered some instructions to print the index so you can follow the number of typed elements!! Your solution works…
-
2
votes1
answer101
viewsA: How can I develop this layout?
The Nav in this simple example is in the middle and above, but you can edit the code and leave it the way you want it! For example, you can do the aside down turn your nav on the left side, just…
-
3
votes1
answer2417
viewsQ: How to insert an encrypted field into a table in Postgresql?
I wanted to know how to insert an encrypted field into a table in the database. To illustrate my doubt let’s assume that I have the following java class: package pessoa; public class Pessoa {…