基本的な質問があります。
私は関心の分離で DAO を作成してきました。各 DAO は、コンテキスト内の BusinessObject に集中します。私の質問は、別の DAO 内で 1 つの DAO メソッドを使用することです。それは間違っていると思いますが、十分なデータ サポートがありません。
これが状況です。
EmpDAO:
getEmp(empId)
getEmps(deptId)
getEmps(deptName)
以下の実装の問題は何ですか
getEmps(deptName):
// Assume this is cached and there is no question of two N/w calls and having any gain by joins
DeptDAO.getId(deptName)
getEmps(deptId)
EmpDAO 内で DeptDAO を使用すると、何が問題になる可能性がありますか? または、別のDAO内でDAO呼び出しを行うべきではない理由は何ですか。
よろしくアモッド