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 -…

Sam
- 99
- 1
- 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…

pierre tautou
- 807
- 2
- 20
- 37
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…

Hamdy
- 430
- 1
- 6
- 19
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…

NiB
- 801
- 1
- 9
- 26
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…

Артем Руденко
- 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

T. Kryazh
- 25
- 1
- 10
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…

NingLee
- 1,477
- 2
- 17
- 26
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:

Alexiuscrow
- 776
- 2
- 15
- 34
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…

Dave
- 21,524
- 28
- 141
- 221
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…

Anita
- 2,352
- 2
- 19
- 30
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…

Raghu Chandra
- 1,102
- 1
- 9
- 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:

Garet Jax
- 1,091
- 3
- 17
- 37
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)…

Reynard
- 953
- 13
- 27
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…

user1687267
- 43
- 1
- 5