Refactored capability type and namespace dao's

Change-Id: I384d71a9b9067ebb752156f7f8de9dee03b53e9a