Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Modify or Extends Data class

 
dennis hu
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark and other guys:
In my implementation, I just modify the deprecated methods in Data class and add a little codes to verify the database file in his constructor.
I think the Data object is functional and effictively,I donot want to modify his main function, so create a new Remote Class have a reference refer to the Data object, I impletments the lock/unlock,findCriteria method in my remote oject.
Maybe means I had modified the Data class, but could somebody tell me its advantage and disadvantage??
Thanks!
 
jay denzel
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I did both, modified the Data class adding the searching functionality and extended it like you did for Remote connections and added my locking here. In my opinion this is a logical approach, because you have to distinguish local and remote connections. Local clients do not need any locking implementation, remote clients do. In my extended class I modified the lock/unlock signatures to support client identification. I guess Sun had no problem with this solution, I passed with 149.
Hope this helps...
jay
------
SCJP
SCJD
 
Jawad Kakar
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jay,
I did both, modified the Data class adding the searching functionality and extended it like you did for Remote connections and added my locking here

You mean in your RemoteDataAccess you have a reference refer to the Data object?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic