Catechism of the Catholic Church
2578 The prayer of the People of God flourishes in the shadow of God's dwelling place, first the ark of the covenant and later the Temple. At first the leaders of the people - the shepherds and the prophets - teach them to pray. The infant Samuel must have learned from his mother Hannah how "to stand before the LORD" and from the priest Eli how to listen to his word: "Speak, LORD, for your servant is listening." 26 Later, he will also know the cost and consequence of intercession: "Moreover, as for me, far be it from me that I should sin against the LORD by ceasing to pray for you; and I will instruct you in the good and the right way." 27
2579 David is par excellence the king "after God's own heart," the shepherd who prays for his people and prays in their name. His submission to the will of God, his praise, and his repentance, will be a model for the prayer of the people. His prayer, the prayer of God's Anointed, is a faithful adherence to the divine promise and expresses a loving and joyful trust in God, the only King and Lord. 28 In the Psalms David, inspired by the Holy Spirit, is the first prophet of Jewish and Christian prayer. The prayer of Christ, the true Messiah and Son of David, will reveal and fulfill the meaning of this prayer.
2580 The Temple of Jerusalem, the house of prayer that David wanted to build, will be the work of his son, Solomon. The prayer at the dedication of the Temple relies on God's promise and covenant, on the active presence of his name among his People, recalling his mighty deeds at the Exodus. 29 The king lifts his hands toward heaven and begs the Lord, on his own behalf, on behalf of the entire people, and of the generations yet to come, for the forgiveness of their sins and for their daily needs, so that the nations may know that He is the only God and that the heart of his people may belong wholly and entirely to him.
English Translation of the Cathechism of the Catholic Church for the United States of America © 1997, United States Catholic Conference, Inc.