Questions tagged as 'java'

1
answer

How to store change date / time in DB using Hibernate Envers?

I need to keep a log of all transactions of an entity with Hibernate Envers. I configured persistence.xml as follows: <!-- Configurações do Envers --> <property name="hibernate.ejb.event.post-insert" value="org.hiberna...
asked by 08.04.2014 / 14:52
1
answer

Doubt with JavaEE sessions

Is it possible to get a list of open sessions ? Not the amount (sessionlistener), but the sessions themselves so I can find values in their attributes.     
asked by 28.11.2014 / 20:45
1
answer

Adding Items Programmatically

I have a certain part of an application in which there is a random questionnaire. Generated by the user. The question is: I do not have access to the amount of questions or what the questions are promptly asked. So I have to get it all dynamical...
asked by 11.02.2014 / 15:38
1
answer

Login with Java levels MySQL

I am doing a login system, but I am in doubt as to how I can leave it with levels / types (admin, user, client). IMPORTANT: I'm making a method that uses Taglib - "C: if" to make a Switch Case. The idea is to make a redir for the admin a...
asked by 13.02.2014 / 19:17
1
answer

JDBCTemplate RowMapper for Nested POJOs

Let's say I have the following Pojos public class Pedidos{ private Strig codigo; private String nomePedido; private List<Dados> dadosPedido; //getters e setters} } E public class Dados { private String nome; private...
asked by 27.02.2014 / 19:48
1
answer

Pages of JPA queries

I am changing the code of a query because it will return a lot of data when the database is well populated. I'm paging the query. The problem is that when they implemented it, they did the following: You get a string, and you make all possibl...
asked by 03.02.2014 / 12:25
5
answers

Map does not load with error

I'm starting to develop on Android, but I came across a problem to generate a simple map, I've already seen and reviewed the Google Developer documentation and other internet tutorials that show how easy it is to do such an application. My code:...
asked by 06.02.2014 / 13:51
1
answer

Clear Target in JSF + JPA + Richfaces Projects

How can I clean Targets generated from the project when we deploy deploy to JBoss?     
asked by 05.02.2014 / 18:26
3
answers

Java shows "Type safety: Unchecked cast from Object to HashMap"

I'm creating a class that through which works similar to XPath. The function works perfectly, the problem is that in this part of the line (HashMap<String, Object>) test.get("test-map"); , the "eclipse" shows the following warning...
asked by 30.01.2014 / 17:44
1
answer

How not to serialize some attributes in RESTful calls with Jersey and Jackson

I'm using the Jersey library in conjunction with the Jackson library to use REST-type web services. In calls, I usually use the following code that transforms a given entity into a JSON to be sent in the request body. Map<String, Object>...
asked by 31.01.2014 / 17:49