Posts by Weslley Barbosa • 640 points
40 posts
-
0
votes1
answer54
viewsA: How to add registration to the list without harming existing data
Well, this is a very common organizational problem in design. An initial version of the database is created, but for some reason it was necessary to change the structure or even expand and add new…
-
0
votes2
answers492
viewsA: How to save a list using Hibernate?
I believe the list is being saved because it is empty, if you fill in the objects you can link to the list, tbm it is good to add the class property to the list, so that the system prevents you from…
-
17
votes3
answers1024
viewsQ: When and how to use instanceof and typeof operator in Javascript
When and how to use operator instanceof and typeof in Javascript? In a post do Stack EN I see the usability of instanceof. However, in another post Stack EN says that it is not necessary to use any…
-
0
votes2
answers1202
viewsA: Java Runtime could not be Located in Visual Studio Code
Missing to configure environment variables. You can see how to configure tutorial on this link https://stackoverflow.com/a/26640589/4395789…
-
0
votes2
answers689
viewsA: Send List + Parameter to Controller
If you are using spring you can use these syntax @RequestMapping(value = "lista-receitas",method = RequestMethod.POST,consumes = {MediaType.APPLICATION_JSON_UTF8_VALUE}) or…
-
0
votes1
answer103
viewsA: Add Jsonobject to List<Discipline>
I made that little mistake in your chorus view.setText(disciplinaList.toString()); You called the wrong variable in Textview the correct would be public View getView(int position, View convertView,…
-
0
votes1
answer110
viewsA: Limit @Onetomany List
I found this answer that should suit your need in stackoverflow-en @OneToMany(mappedBy="local", cascade=CascadeType.ALL) @OrderBy("dataContagem DESC") @Fetch(FetchMode.SELECT) @Size(min=1, max=10)…
-
0
votes1
answer155
viewsA: DTO with List using Jpacriteria
I believe the list is missing root.fetch("intervaloDeHoras",JoinType.LEFT);
-
0
votes3
answers131
viewsA: Multiple query values with JPA/Sprint and Rest
My proposal and make a good treatment to use an Exceptionhandler @RestController @ControllerAdvice class Controller { @GetMapping(value = "list") public List<Object>…
-
5
votes3
answers9654
viewsA: How to give permission to other users to upload content to my project on Github
Go to the repository, click on Setting > Collaborator> type user username, click Add Collaborator
-
0
votes1
answer92
viewsA: java.lang.Illegalargumentexception when creating a Snackbar
I noticed that you call the Snack inside the onCreateView, however, at this time there is no View to anchor the Snack at ufsj.apps.moodle.moodle_index_fragments.CoursesFragment.onCreateView…
-
0
votes2
answers822
viewsA: Make a consultation with Ibernate criteria with Spring
@Transactional(readOnly = true) public List<Proposta> filtrar(String CPF) { CriteriaBuilder builder = manager.getCriteriaBuilder(); CriteriaQuery<Proposta> query =…
-
2
votes1
answer257
viewsA: Persistence in JPA Cascade
Probably because Course is null @OneToOne(cascade= {{CascadeType.DETACH}) @JoinColumn(name = "id_course") private Course course; Fill it before saving for (Module m : course.getModules()) {…
-
0
votes1
answer24
viewsA: Where on the list with recyclerview
Inside your Adapter you can make a way like this public int findBy(Int cod){ foreach(Entidade e: oEntidades){ if(e.getCodigo().equals(cod)) return oEntidades.indexOf(e); } return -1; }…
-
0
votes1
answer208
viewsA: JPA+HIBERNATE error
You need to understand list loading by JPA, you might have a better idea at this link You need to add the fetch for the list to be fully loaded @OneToMany(mappedBy = "usuario",cascade =…
-
3
votes1
answer746
viewsA: Consulting in a list (IN) - Predicate and Specification - JPA Criteriabuilder
Long[] tipos = URL.decodeLongList(categorias); if (tipos!=null) { predicates.add(root.join("categorias").get("id").in(tipos)); }
-
0
votes2
answers292
viewsA: Modelling Inheritance Bank with JPA
Implementing inheritance in jpa @Entity @Inheritance(strategy = InheritanceType.JOINED) public class Condomino { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @Column private…
jpa-2.0answered Weslley Barbosa 640 -
0
votes2
answers653
viewsA: How the.setOnClickListener(view -> method() item works)
Structured Viewholder class /** * A classe ViewHolder internamente guarda a view */ public class LineHolder extends RecyclerView.ViewHolder { TextView title; Button moreButton,deleteButton; /** *…
-
0
votes0
answers205
viewsQ: How to run database call with JPA parameter
How do I call a stored procedure from the bank I have the following procedure stored in the database, and I wish to execute your call by passing the parameter projId, using JPA to pick up the…
-
3
votes2
answers2495
viewsA: Firebase Cloud Messaging (FCM) - Push Notification (Java)
Using the library Retrofit2 to submit Request in java, I have implemented the following classes and methods class NotificationService { private FirebaseCall firebaseCall; public…
-
1
votes2
answers919
viewsA: JSON Infiito when using GET @Manytomany
Add reference back in @Entity @Table(name = "items") public class Item implements Serializable { /** * */ @JsonBackReference("items") @ManyToMany(fetch = FetchType.EAGER, mappedBy = "items" )…
-
0
votes1
answer42
viewsA: Listview is showing nothing
Try using this method for getView @Override public View getView(int position, View view, ViewGroup parent) { view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_respostas, parent,…
-
0
votes1
answer206
viewsA: Datepicker date return problems
SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy");//variavel na classe Calendar calendar; //variavel na classe ///////////////////// @Override public void onDateSet(DatePicker datePicker, int…
-
0
votes2
answers145
viewsA: How to run request again after having permission accepted on android?
boolean isAutorizado(){ return ActivityCompat.checkSelfPermission(this, Manifest.permission.CALL_PHONE) == PackageManager.PERMISSION_GRANTED; } private void doCall(){ if (isAutorizado()){ //fazer…
-
0
votes3
answers842
viewsA: Save state when returning to an Activity
Make msg finishing with dialog and more feasible than making a new Activity, follows code public class AgradecimentoDialog extends DialogFragment { @Override public void onCreate(Bundle…
-
0
votes2
answers84
viewsA: Data sent from one Activity to another arrives null
As you are using this way to add the data to Intent, using the client name will be easier to recover String cli = adapter.getItemIdAtPosition(posicao);//Pega o nome do cliente da lista, pois vc…
-
0
votes2
answers629
viewsA: Firebase Cloud Messaging does not send sound in notification
In creating the notification you must call Alarm private void showNotificacaoTeste(String body) { //Uri do som do alarm Uri alarmSound =…
-
1
votes1
answer127
viewsA: How to fix a Bug with loading a Fragment within another Fragment?
The Factions go up as Bean, to avoid being created a new instance you can do this, should help in memory control. Insert into the Fragment @Override public void onCreate(@Nullable Bundle…
-
0
votes2
answers1711
viewsA: Required field, fill in before saving
/* * fazer essas variaveis na propria classe da activity */ EditText nome = (EditText) findViewById(R.id.cadastro_nome); EditText email = (EditText) findViewById(R.id.cadastro_email); EditText senha…
-
0
votes2
answers162
viewsA: I wanted to add more than one permission in the springSecurity roles
You can arrange the folders and add access in this way <intercept-url pattern="/View/Secured/user/**" access="hasRole('ROLE_ADMIN') or hasRole('ROLE_COMMON')" /> the…
-
0
votes2
answers105
viewsA: Background Edittext Alpha (transparency)
I tested it here, and the transparence seems to work properly like this <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="10dp"//coloquei padding…
-
0
votes3
answers1657
viewsA: Convert string to blob and save to bank
Handling Base64 vc need to pay attention to small details, in the web vc define page break among other things, depending on use, on android is not necessary to do this, so you can indicate in the…
-
0
votes1
answer1390
viewsA: How to upload multiple images using spring boot
The following example I took from this source: https://hellokoding.com/uploading-multiple-files-example-with-spring-boot/ @RequestMapping(value = "/fileuploud", method = RequestMethod.POST) public…
-
1
votes1
answer33
viewsA: Fragment not being loaded inside Framelayout
I believe your mistake is to have placed the height of the include as match_parent I think if you change to wrap_content will solve <include layout="@layout/app_bar_main"…
-
1
votes1
answer78
viewsA: Error generating a JSON object
The logic is incorrect, because you are creating a user object, and adding it together to the head, and the head has no value, just do so obj.put("nome", "Fulano"); obj.put("sobrenome", "de Tal");…
-
0
votes1
answer111
viewsA: Hibernate Problem 4.3 with Glassfish 3.1
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: User planf571_root already has more than 'max_user_connections' active connections It says that the User you are using, is at the limit of…
-
0
votes2
answers342
viewsA: Problem with @form Primefaces - JSF
You are ordering to update the entire form, first you must add an id to the Form and to the Datatable <h:form id="form">... <p:dataTable id="id_tabela" ...> ... and call update only on…
-
0
votes1
answer68
viewsA: type Enum field can be used for comparison?
You can do a method within the Enum class itself by asking it this way public boolean isCancelado(){ return this.descricao.equals("Cancelado"); } And then just make the call on the page <tag…
-
1
votes0
answers224
viewsQ: Mark text with Javascript
I would like to create a text tag on an HTML page made by Javascript. I made a method that I can get the initial and final points of a selection made by the user and save them on Android, but I have…
-
2
votes3
answers3512
viewsA: How to decrease the quality of an image on android?
According to the google itself, it is advisable to perform the processing of the images, so that your application does not exceed the memory. // Obter as dimensões do componente na tela File file =…