• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Extending the Data class

 
J. R. Titko
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has there been any problem adding an interface to the Data class for this project? I want to create a common interface between the Data class and the Data Client so that I can use them in a factory. I have seen several people post that they used a factory, so I'm assuming that this is what the factory has been typically used for, but wanted to get a better feel for the situation before I went down a wrong path.
J.R.
 
Gennady Shapiro
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Such super interface is a great idea.
The only question is which class should implement it.
Since I extended Data to SearchableData( implements criteriaFind()) this subclass of Data implements DataIF (not Data itseft).
API enforcing is a very valid point, not many people raise this question though.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic