aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes How to get  record number? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "How to get  record number?" Watch "How to get  record number?" New topic
Author

How to get record number?

Ray Cheeny
Ranch Hand

Joined: Aug 21, 2002
Posts: 74
Hi,
In my network design,I have a method dobook(DataInfo data,RemoteInterface remote) in my client.But how can I get the record number?
Could I invoke the DataInfo.getRecordNumber() in the client?I'm not sure wether the client has the
DataInfo.class?
Ying Ren
Ranch Hand

Joined: May 24, 2002
Posts: 35
I am not sure what you are asking. But I know both client and server will have datainfo class. So don't worry about that.
YING REN
Ray Cheeny
Ranch Hand

Joined: Aug 21, 2002
Posts: 74
hi,
I am confused about the visibility of DataInfo and FieldInfo class. they should belong to suncertify.db, and invisible to Client( in network mode). but they are required by spec. to return to the Client.
I see somebody do that with a vector.
Is that right?
How about you?
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451

I am confused about the visibility of DataInfo and FieldInfo class. they should belong to suncertify.db, and invisible to Client( in network mode).

Why should they be toatally invisible to the client? They are utility classes and, as I see it, fair game to use as you see fit.
Michael Morris


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
George Lawniczak
Greenhorn

Joined: Aug 12, 2002
Posts: 27
I too felt that DataInfo and Data should be invisible to the client. My rationale is what if the database is swapped out? Although I certainly could see where the assignment doesn't require it. I am just not comfortable with having a client rely on the internal workings of the database. So basically I created a kind of "JDBC-light" protocol to handle my database access.
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451

I too felt that DataInfo and Data should be invisible to the client.

If you use a Facade on the client that knows of DataInfo and FieldInfo but no other classes in the client have such knowledge, why is that a problem? Somewhere, at some point, some class is going to have to deal with translating those classes into something meaningful. If the the database is changed out, you change one class and bingo, back in business. No matter where the translation occurs, some class or classes will require adjustment if databases are changed.
Michael Morris
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get record number?