The word "house" is a metonym for the people who live in the house. Alternate translation: "David's family" (See: [[rc://en/ta/man/jit/figs-metonymy]])
The hand is a synecdoche for the person. Possible meanings are 1) "May Yahweh use David's enemies to punish David if David breaks this promise" or 2) "May Yahweh destroy the enemies of David." (See: [[rc://en/ta/man/jit/figs-synecdoche]])