jeudi 27 août 2015

Design pattern validation in subclass or superclass

I have following structure.

DynamoDBDao{

public get(String hashKey,String rangeKey){
 //validation rule
}

}

T1DynamoDBDao extends DynamoDBDao{
public get(String name,String surname){
 // same validation rule
 super.get(name,surname);
}
}

Does it make sense to duplicate validation rule in T1DynamoDBDao?

Aucun commentaire:

Enregistrer un commentaire