Questions tagged [genericdao]
48 questions
0
votes
1 answer
Hibernate Generic DAO - Testing whether the SQL generated is correct
I have a DAO infrastructure as follows:
StoreDao, CouponDao, PersonDao.
All these extend from a GenericDao which has the bulk of the functionality(using Java Generics).
kind of explained here -…
![](../../users/profiles/875681.webp)
Sam
- 99
- 2
- 7
0
votes
1 answer
children extended from parent DAO
I have a problem. I have a parent DAO:
public abstract class ParentDAO {
@PersistenceContext
private EntityManager entityManager;
public EntityManager getEntityManager() {
return entityManager;
}
public void…
![](../../users/profiles/656934.webp)
pierre tautou
- 777
- 2
- 19
- 36
0
votes
1 answer
Field required a bean of type that could not be found on Generic JPA DAO architecture
I am trying to define an architecture for my project on spring boot
What I have do is to create a generic Repository that extends from JpaRepository
public interface BaseRepository extends JpaRepository {
}
After…
![](../../users/profiles/3413286.webp)
Hamdy
- 398
- 1
- 2
- 13
0
votes
2 answers
Generic DAO, Spring, Hibernate
I want to understand how can i implement the generic methods like add, edit, delete and search on my database, i have already made the connection (hibernate) and works fine
I do have this method, that works
Class: GenericDAO
public T save(final…
![](../../users/profiles/8039108.webp)
NiB
- 527
- 1
- 6
- 21
0
votes
0 answers
GenericDao extends multiple entities
Im using GenericDao with few entities and i want to make an a single interface and its implementation with this entities. I have 2 Dao's interface and its implementation that extends GenericDao and i want to combine them into one interface and its…
![](../../users/profiles/6077235.webp)
Артем Руденко
- 71
- 7
0
votes
2 answers
Autowiring generic types with constructor [Spring 4.2.5]
I'm new to Spring and trying to implement Generic DAO like in this article http://www.ibm.com/developerworks/library/j-genericdao/ . I have couple of entities - ConcreteEntity1 and ConcreteEntity2. Also, I have classes
public interface GenericDao
![](../../users/profiles/6213346.webp)
T. Kryazh
- 25
- 1
- 9
0
votes
0 answers
DAO design and implement practice
For example, I have many tables, such as people car house and so forth, I want to know a good practice for the general DAO design.
In this case, people have cars and houses. car and house have it own id, maybe an auto_increment int value. and they…
![](../../users/profiles/2485503.webp)
NingLee
- 1,309
- 1
- 13
- 24
0
votes
1 answer
How can I use Seach and Filter classes from Google GenericDAO for seaching not mapped class objects?
I have Bridge class:
public class Bridge extends Attribute{
String name;
//getters and setters
}
this class used for mapping.
Bridge.hbm.xml:
![](../../users/profiles/4751926.webp)
Alexiuscrow
- 717
- 13
- 29
0
votes
1 answer
Generic DAO in Spring Web Development
How can I set these codes in the DAO Layer to be GENERIC in order for me to avoid code redundancy and to efficiently use a simple set of codes in multiple circumstances using Spring web development?
ItemInfoDao.xml
0
votes
2 answers
Up to date, JPA compliant GenericDAO Implementation
I read this article:
http://www.ibm.com/developerworks/java/library/j-genericdao.html
several times and believe I understand what it is saying. However, it is 4 years old and I have a JPA compliant Java application to contend with. In addition, I…
![](../../users/profiles/218028.webp)
HDave
- 20,105
- 26
- 133
- 216
0
votes
2 answers
Generic DAO search method
I have a scenario in which there are two entity classes. Their structures are like
Class A{
Long id;
// some fields
}
Class B{
Long id;
Long associtedA;
// some field
}
The field associtedA in entity B refers to A.id
The relation between them is…
![](../../users/profiles/3321784.webp)
Anita
- 2,092
- 2
- 14
- 29
0
votes
0 answers
How to add user login check in GenericDao.java in Ofbiz
I am Trying to achieve single DB and multiple organization (not Multi tenancy) in ofbiz, how do i get user login Id till GenericDAO and append it to the query.
Please Suggest if you have any other ideas except multi tenancy!
Thanks
EDIT:
if…
![](../../users/profiles/2663136.webp)
Raghu Chandra
- 1,052
- 1
- 8
- 14
0
votes
0 answers
Google genericdao framework performing unnecessary selects with Maven, Spring and Hibernate
I am using Hibernate 4.2.11 Final, Spring 3.2.4 and Google Genericdao 1.2.0:
My SpringConfig.xml is:
![](../../users/profiles/3365886.webp)
Garet Jax
- 831
- 1
- 11
- 22
0
votes
2 answers
NoSuchMethodError while using Generic DAO
I'm trying to use GenericDAO in a project :
public class GenericDao {
ApplicationContext ctx =
new AnnotationConfigApplicationContext(SpringMongoConfig.class);
MongoOperations mongoOperation = (MongoOperations)…
![](../../users/profiles/2438329.webp)
Reynard
- 479
- 7
- 21
0
votes
2 answers
Access DAO in REST call TOMCAT
I want to access data through my dao when using REST call. My dao works well with the webapp. But when I use the webservices I created, I have a null pointer exception.
Here is my code :
@Path("/hello")
public class HelloWorldResource…
![](../../users/profiles/1687267.webp)
user1687267
- 43
- 1
- 5