DataInterface getConnection()
LocalDataAccess extends Data implements DataInterface
Incase of ClientFactory class i have a method getConnection(String mode), Because if the mode is remoteClient then i do a Naming.lookUp() and return the DataInterface to the caller where it will be typecasted as RemoteDataAccess.
Here in the LocalDataImpl class iam just instanciating the Data's object in the constructor. And using it to invoke the method's of the Data class. Is it ok.
this has one or two method like modifyRec(RecNo,seat) which is not there in the Data class which will be usefull for me in case of modifying the record
If i go for facade pattern then i think i cant use Factory pattern(iam not sure).
" Veni, vidi, vici "<br />" I came, I saw, I conquered "
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|