Thanks for reply...
But is that any limitation that I can only add private method to Data.java? if I add extra public method (e.g. getNumberOfRec()) for Data.pub, then I only can instantate Data object as below:
Data db = new Data(dbpath);
instead of
DBMain db = new Data(dbpath);
Is that necessary to instantate db object as DBMain?
The public method I plan to implement include retrieve record version (using timestamp) by adaptor class:
So if
Class Adaptor(){
DBMain db = new Data(dbpath);
public int updateRec(Subcontractor obj){
String objVersion = obj.getVersion();
int recNo = obj.getRecNo();
String recVersionInDb = db.getRecVersion(recNo);
if(objVersion.equalIgnoreCase(recVersionInDb)){
....
}
}
I not able call db.getRecVersion(recNo) if db is DBMain object. I can only call that method if:
Data db = new Data(dbPath);
Back to my original question:
Any one pass
SCJD by instantate db in adaptor class:
Data db = new Data(dbPath);
Or every one just do like:
DBMain db = new Data(dbPath);
Please help... :roll: