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