dao

Hibernate DAO method parameters

Which one do you prefer and why? Reservation[] find(User user, Show show) Reservation[] find(long userId, long showId) Thanks ...

MS ACCESS 2007 VBA : DAO recordset....how can I view all the "fields" in the returned collection

so if i do a SQL statement like so: sql = "SELECT * FROM tblMain" set rs = currentdb.openrecordset(sql) what method can i use to view every "field name" in this collection i have just created. i am getting some very strange error stating that the item is not found in this collection. i know the field exists in the table, i have...

Form error event not firing on DAO error

I have a save button on a form that does this (simplified): If Not Me.Dirty Then GoTo Exit_ DoCmd.RunCommand acCmdSaveRecord Exit_: Exit Sub Err_: ' ... handle runtime error ... Resume Exit_ This form has its Error event handled in a custom class FormDataError. Private WithEvents frm_ As Access.Form ... Public Sub frm...

table data gateway and data access object architectural difference

Hi, Can someone describe the main difference between table data gateway (TDG) and data access object (DAO) ? TDG can operate with all row for that table but so and DAO (DAO can save, delete the specified object, but also can do operations on entire table) Regards ...

How to programmatically get transaction manager in a thread ?

I have a wicket page , which contains two Spring-managed beans , one is DAO , another is Service Object : public class MergeAccountsPage extends WebPage { @SpringBean private MergeEmailDao mergeEmailDao; @SpringBean private MergingService mergingService; } The MergingService's implementation's methods are mostly annotated wit...

DAO: db.OpenRecordSet("Table1", dbOpenTable, 0, dbPessimistic) - what does the third argument do?

Using DAO out of VB6: db.OpenRecordSet("Table1", dbOpenTable, 0, dbPessimistic) If the third argument is set to 0, as in the above, what is its effect? 0 is not a listed value for this argument in the documentation. EDIT: What sort of recordset will be opened if 0 is given as the third argument? ...

Trying to create a DAO recordset from an array

I'm using VB6 and trying to create a DAO recordset from an array of data. I want something like this but I've hit all kinds of problems Dim rst As DAO.Recordset Dim tdf As New DAO.TableDef Dim fld As New DAO.Field rst.Fields.Append tdf.CreateField(arrayHeader(0), adInteger, 5) rst.OpenRecordset rst.AddNew Array(arrayHeader(0), arrayHe...

ORM/DAO/DataMapper/ActiveRecord/TableGateway differences?

Can you, please, explain me the differences between the following database representatives, say, in PHP.: ORM DAO DataMapper ActiveRecord TableGateway Any examples would be appreciated. ...

Using a model as a frontend for a dao

Say I use a simple frontend for information passed on by a DAO that uses JDBC (without ORM). In other words, the class would have no attributes to speak of. Would this considered as a valid approach? What issues could it potentially cause and how could a class be designed to avoid them? ...

Spring DAO, Portlet, concurrency

Hi there, I'm facing a strange problem: I've using spring to manage my dao layer in my portlet app. Now something weird happens, if two users with different languages accessing the same table nearly parallel. Example: User A (language 4) access table X, a few seconds after this User B (language 5) access table X. Now: User A gets langu...

Access 2007 upgrade DAO references conflict

I am updating an Access 97 DB w/ VBA code to Access 2007. The VBA code uses DAO objects that Access 2007 references when I converted the db files (first from 97 to 2002, then to 2007). My problem specifically is with the two references: "Microsoft DAO 3.6 Object Library" and "Microsoft Office 12.0 Access database engine Object Library...

Java web application DAO writing authenticated UserID and IP Address to DB

I'd like to write to my Oracle DB the user ID and IP address of the logged in user (web app) whenever I perform SQL UPDATEs and INSERTs. Such as public static int updateUser(STKUser user, STKUser loggedIn) throws DAOException { Connection connection = null; connection = DB.getConnFromCache(); PreparedStatement ps = null; String ...

Filter through model or dao?

How should one go about filtering a series of domain objects according to user-defined criteria? Should the filtering methods be in the model or should they be in the DAO? ...

Dao methods, manipulating single/multiple objects and closing resources

The usual advice is to close JDBC ressources once they're no longer needed. This could be done in a catch and finally. However, what if a DAO method only manipulates one domain object and an operation requires several of these to be retrieved/created in one go? Would getting a statement and then closing it repeatedly be an issue in terms...

hibernate dao design question

Im looking to create a generic DAO to handle CRUD in my hibernate app. My entities have most associations as LAZY fetching. But I find in order to have hibernate be efficient as possible with the SELECTs I have to create multiple methods on my DAOs. Here's what I mean: Entity A has two associations. Sometimes I want to retrieve this...

Need help tweaking my Java EE MVC approach

Below is an action class - I guess similar to what STRUTS uses - which is called from my servlet controller (btw, I am not using STRUTS). I am hung up on a few things. 1) Should I be passing a CommitmentItem BO/DTO/Javabean (whatever it is called) to my CommitmentItemForm instead of the request object inorder to stay MVC compliant?? c...

Tools to automatically generate Daos.

I'm not interested in Spring/JPA etc. I like straight up JDBC/ODBC. I was wondering what are the good (actually production ready) tools to enable taking a database schema and generating objects/daos that fetch/update them? I am intersted in Java and C++. I am interested in ramping up more on C++ in order to get away from all of this Spr...

Exposing DAO as web service

Hello, Can anyone point me in the direction of documentation for exposing a DAO as an external web service? Currently, in my application we follow a DAO -> Service -> UI layered architecture. Everything is internal to the app, our DAOs access the DB through Spring JDBC and the services are visible only to the web application. We now ...

Why do DAOs have separate create and update methods?

I'm looking at a couple of designs for DAO interfaces. One has a single update() method, while the other has separate create() and update() methods. Assuming that it's possible to do something along the lines of 'insert otherwise update', what's the benefit of a separate create() method? Is there something to do with concurrency lurking...

What happens to dereferenced hibernate (JPA) entities?

In a project i am working on, we have an EJB backend where various clients connect remotely (i.e. Web layer, web services layer, etc). The clients are on another machine and can be in another data center, so the front end and backend are never in the same app server. The backend is layered as follows: SLSB <-> Service Layer Objects <-...