aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Can I define a record like...please coming in Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Can I define a record like...please coming in" Watch "Can I define a record like...please coming in" New topic
Author

Can I define a record like...please coming in

Strong Z.Q. Jiang
Greenhorn

Joined: Dec 25, 2005
Posts: 3
Hi,everyone:
Can I define a record like:{recNo,deleted,name,location,size,smoking,rate,date,owner}?
Some reasons:
1.I can cache all db file's records information(include recNo and deleted) into memory for performance
2.Methods using recNo(update or deleted etc.) or deleted(e.g:create a record reusing a deleted entry) will be easy implemented and have good efficiency
What I am worried about is:
The following methods:
public void update(int recNo, String[] data, long lockCookie)
public String[] read(int recNo)
public int[] find(String[] criteria);
public int create(String[] data)
which have relation with record(String array) will have to use my record definition ,is it permitable?

I really appreciate any help!
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11279
    
  59

Hi Strong,

Yes, you can create your own classes for use within a cache or for use in transferring data, or for use in the table - or anywhere that it makes sense for you.

You cannot change the existing interface though - but there are ways around that .

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can I define a record like...please coming in
 
Similar Threads
RNFE in update /delete method
NX: Questions about deleted records
Trouble understanding the Data.java logic
B&S Version 2.3.3 locking
URLyBird: Just started, have a few questions