Posts by Andre • 258 points
29 posts
-
0
votes0
answers13
viewsQ: How to set a postgres function parameter using Native query?
Good afternoon! I created a Native query that uses a postgres function date_part(text, timestamp). My code: String sql = "SELECT " + "(SELECT coalesce(count(*), 0) FROM public.cliente) AS…
-
0
votes0
answers25
viewsQ: ng2-char: How to show the percentage inside the graph?
I’m using ng2-Chart to generate the graphics. The problem I wanted to put the percentage or even the values inside the graph, but I couldn’t do that. In [options] step a plugin I saw the people on…
-
0
votes1
answer117
viewsQ: Use composite key as PK or not?
I have two tables: 1- Contracted Service 2- Payment Contracted Service 1 service may have N payments. I modeled the Contracted Service Payment class as follows: CREATE TABLE…
-
0
votes1
answer70
viewsA: DUVIDA - Replacing texts with Javascript
Dude, I don’t really know what your code is but why don’t you do it like this: replaceText('mensagens', 'done_all'); function replaceText(selector, newText) { var elems =…
-
0
votes3
answers339
viewsA: Spring Boot does not recognize the controller when a request with parameters is sent
@GetMapping(value = "/{clientId}/authorize") public ResponseEntity<String> authorizeGet( @RequestParam(value = "scope", defaultValue = "public_profile") String scope) { //…
-
1
votes1
answer1505
viewsQ: HV000030: No Validator could be found for Constraint 'javax.validation.constraints.Email' validating type 'java.lang.String'
I’m in a class AdministradorDTO and added some validators to it I found a tutorial on the Internet and I followed the same way in my case it gives this error in the email, before it gave in String…
-
0
votes1
answer75
viewsA: How to persist objects in a table if I don’t already have the foreign key?
I was able to solve it by removing Cascadetype.ALL, because Cascadetype.PERSIST was causing this... @Entity @Table(schema = "pesquisa", name = "sre_equipamento") public class Equipamento implements…
-
0
votes1
answer75
viewsQ: How to persist objects in a table if I don’t already have the foreign key?
I have a class of Equipment that has a Scheduling list. They are mapped like this: @Entity @Table(schema = "pesquisa", name = "sre_equipamento") public class Equipamento implements Serializable {…
-
2
votes2
answers1211
viewsQ: How to Create a Reusable Component in Angular
I am with a system where all modules have a standardized record listing screen with pagination. I adapted a pagination code I found on the Internet to make pagination on demand. However, instead of…
-
0
votes1
answer112
viewsA: JXL generate excel spreadsheet with decimal value in the Brazilian standard
I managed to fix it. I will post the solution in case someone finds the same problem: NumberFormat decimalNo = new NumberFormat("#,##0.00"); WritableCellFormat numberFormat = new…
-
0
votes1
answer112
viewsQ: JXL generate excel spreadsheet with decimal value in the Brazilian standard
I am using Java and Jsf on my system and there is a screen where you have the option to generate an excel spreadsheet. Worksheet generation is ok. The problem I’m encountering is in columns that…
-
0
votes2
answers308
viewsA: Is it possible to filter a p:datatable when the filterBy attribute is a list of obejtos?
I decided by way of a "gambearra". In the Email class I reset the toString method. That’s how it was: @Override public String toString() { return this.email; } And then in the filterBy excerpt I…
-
0
votes2
answers308
viewsQ: Is it possible to filter a p:datatable when the filterBy attribute is a list of obejtos?
I’m using the P:datatable component of Primefaces and I’m having trouble with the filter. I have a list of Email Sectors and within that list I have another list with the aliases of each email.…
-
0
votes0
answers34
viewsQ: Cursor with Postgresql
I have here a table of proceedings that activates a Trigger when a new procedure is recorded. In my case, when someone generates a process for a request that has been returned the system must…
-
1
votes1
answer73
viewsQ: Mount SQL with options
I am using Postgresql in an extension system and I have here two tables. One that stores the extensions and another that stores the permission to link these extensions. This second table is…
-
1
votes0
answers135
viewsQ: Is it possible to encrypt the connection password to the database that is inside a Java application?
I have an application in Java and using the Postgresql database. To connect to the database I use this method: public static Connection getConnection() throws Exception { try {…
-
0
votes1
answer630
viewsA: Permission to change only one table column in Postgresql
I got it here, guys! The syntax was like this GRANT UPDATE(visitas) on produtos to user_website; That is to say GRANT UPDATE(coluna) on tabela to nome_usuario;…
-
0
votes1
answer630
viewsQ: Permission to change only one table column in Postgresql
good night! I’m using Postgresql and in it I have a table called Products. When the user visits a product through the site I give an UPDATE in this table to increase the column visits. The problem…
-
3
votes2
answers140
viewsQ: Instantiate an object throughout the life cycle of the Java application
I have an application here in Java that uses the Amazon SDK to send images to a Bucket S3. To do this I use threads, basically it is modeled as follows: The class Main has a thread list and each…
-
2
votes1
answer102
viewsQ: Autocomplete locking the database
I am developing an application in PHP and Jquery with the Codeigniter 3 framework. I am using Postgre and I have a database with more than 1 million registered records. I made an autocomplete that…
-
0
votes1
answer51
viewsQ: Selection of SQL related records
I have two tables, one that calls grupo where groups created for access to an application are stored. For example, if you have in the group CADASTRO_ADMIN, you will have full permission; now, if you…
-
2
votes0
answers385
viewsQ: Is there a JSF style PHP famework?
I am a Java programmer and I use JSF in the projects of the company where I work. I am developing a personal project and I chose the PHP language even to learn a little more. The problem is that I…
-
0
votes1
answer47
viewsQ: Is it possible to run an external page on the client and get the JSON result using PHP?
good afternoon! The following is, I have a URL of a forum on the Internet that when accessing it it returns in JSON format the last posts viewed by a certain user. As it is external do not know how…
-
1
votes1
answer453
viewsA: First faces pick chosen value in autocomplete
Personal thanks to all for the help, I found the problem. I had to change this code: <f:ajax event="itemSelect" render="selectOneMenuChaveContrato" execute="@this"/> For that: <p:ajax…
-
1
votes1
answer453
viewsQ: First faces pick chosen value in autocomplete
I’m working with the AutoComplete of primefaces and I have a problem. For example, the user enters a word in the combo OSW and then the dropdown lists all contracts with the term as supplier OSW. So…
-
1
votes0
answers160
viewsQ: Table in Ireporter does not appear in the application
Gentlemen good afternoon! I’m in a bush with no dog and I can’t find any more solutions to my problem, look: In my Ireport form I use the Table component. I created a dataset that is responsible for…
-
0
votes1
answer474
viewsQ: Java Framework for Ecommerce-style Website
good night! I would like the opinion of those who are active on which is the most suitable framework for developing a site in the E-commerce style using java. I was thinking about JSF 2 + Primefaces…
-
3
votes1
answer919
viewsQ: Modeling Categories and Subcategories
I am modeling a database related to e-commerce and I have a question in the modeling of the tables of categories and subcategories of products. At first I created two tables one of Categoria and…
-
2
votes1
answer39
viewsQ: Helps storage in XML file
good afternoon! I’m developing a system for product registration. However, I am thinking of creating an XML file to store the general characteristics of the products (the other information will be…