He Delighted in Me 
He brought me forth also into a large place; he delivered me, because he delighted in me. The LORD rewarded me according to my righteousness; according to the cleanness of my hands hath he recompensed me. 
(Psalms 18:19-20)
What significant words, hidden away in a psalm and brought to the fore by the Holy Spirit. 
It's no wonder that David featured so in the stories and prophesies of the Bible, that he, like Abraham, was so beloved of God. 
So all the generations from Abraham to David are fourteen generations; and from David until the carrying away into Babylon are fourteen generations; and from the carrying away into Babylon unto Christ are fourteen generations. 
(Matthew 1:17)
In the first passage above, David was not boasting about how good he was, but how good God was. 

Throughout the Bible, the righteousness of David is mentioned: 
In that day shall the LORD defend the inhabitants of Jerusalem; and he that is feeble among them at that day shall be as David; and the house of David shall be as God, as the angel of the LORD before them. And it shall come to pass in that day, that I will seek to destroy all the nations that come against Jerusalem. And I will pour upon the house of David, and upon the inhabitants of Jerusalem, the spirit of grace and of supplications: and they shall look upon me whom they have pierced, and they shall mourn for him, as one mourneth for his only son, and shall be in bitterness for him, as one that is in bitterness for his firstborn. 
(Zechariah 12:8-10)
In that day there shall be a fountain opened to the house of David and to the inhabitants of Jerusalem for sin and for uncleanness. 
(Zechariah 13:1)
Jesus Christ Himself is mentioned time and again as of the house of David according to the flesh - what man can have more honour than that. 
If we read the history of David the shepherd boy and later king of Israel, we see that God is honoured without fail in all his doings. 

For example, when facing the giant Goliath, what did he say? 
"The bigger you are the further you'll fall"? 
Then said David to the Philistine, Thou comest to me with a sword, and with a spear, and with a shield: but I come to thee in the name of the LORD of hosts, the God of the armies of Israel, whom thou hast defied. This day will the LORD deliver thee into mine hand; and I will smite thee, and take thine head from thee; and I will give the carcases of the host of the Philistines this day unto the fowls of the air, and to the wild beasts of the earth; that all the earth may know that there is a God in Israel. 
(1 Samuel 17:45-46)
Now David was hardly perfect, he was human just as you and I, in fact he was a seducer and a murderer by proxy and when confronted by Nathan the prophet he realised that although he was all powerful in Israel and could do as he liked, when he came before his God he repented of his actions, asking for forgiveness of his Creator: 
** To the chief Musician, A Psalm of David, when Nathan the prophet came unto him, after he had gone in to Bathsheba **. 
Have mercy upon me, O God, according to thy lovingkindness: according unto the multitude of thy tender mercies blot out my transgressions. Wash me throughly from mine iniquity, and cleanse me from my sin. For I acknowledge my transgressions: and my sin is ever before me. Against thee, thee only, have I sinned, and done this evil in thy sight: that thou mightest be justified when thou speakest, and be clear when thou judgest. Behold, I was shapen in iniquity; and in sin did my mother conceive me. Behold, thou desirest truth in the inward parts: and in the hidden part thou shalt make me to know wisdom. Purge me with hyssop, and I shall be clean: wash me, and I shall be whiter than snow. Make me to hear joy and gladness; that the bones which thou hast broken may rejoice. Hide thy face from my sins, and blot out all mine iniquities. Create in me a clean heart, O God; and renew a right spirit within me. Cast me not away from thy presence; and take not thy holy spirit from me. Restore unto me the joy of thy salvation; and uphold me with thy free spirit. Then will I teach transgressors thy ways; and sinners shall be converted unto thee. Deliver me from bloodguiltiness, O God, thou God of my salvation: and my tongue shall sing aloud of thy righteousness. O Lord, open thou my lips; and my mouth shall shew forth thy praise. For thou desirest not sacrifice; else would I give it: thou delightest not in burnt offering. The sacrifices of God are a broken spirit: a broken and a contrite heart, O God, thou wilt not despise. Do good in thy good pleasure unto Zion: build thou the walls of Jerusalem. Then shalt thou be pleased with the sacrifices of righteousness, with burnt offering and whole burnt offering: then shall they offer bullocks upon thine altar. 
(Psalms 51:1-19)
He also asked for the life of his unborn child that Bathsheba was carrying to be spared. 
However, the law of the Old Covenant was "An eye for an eye, and a tooth for a tooth", so God took away David's son in repayment for the death of Bathsheba's husband, Uriah the Hittite. 
Despite his sins and faults, God delighted in David and honoured him beyond measure. 

** To the chief Musician, A Psalm of David, the servant of the LORD, who spake unto the LORD the words of this song in the day that the LORD delivered him from the hand of all his enemies, and from the hand of Saul: And he said, **
I will love thee, O LORD, my strength. The LORD is my rock, and my fortress, and my deliverer; my God, my strength, in whom I will trust; my buckler, and the horn of my salvation, and my high tower. I will call upon the LORD, who is worthy to be praised: so shall I be saved from mine enemies. The sorrows of death compassed me, and the floods of ungodly men made me afraid. The sorrows of hell compassed me about: the snares of death prevented me. In my distress I called upon the LORD, and cried unto my God: he heard my voice out of his temple, and my cry came before him, even into his ears. Then the earth shook and trembled; the foundations also of the hills moved and were shaken, because he was wroth. There went up a smoke out of his nostrils, and fire out of his mouth devoured: coals were kindled by it. He bowed the heavens also, and came down: and darkness was under his feet. And he rode upon a cherub, and did fly: yea, he did fly upon the wings of the wind. He made darkness his secret place; his pavilion round about him were dark waters and thick clouds of the skies. At the brightness that was before him his thick clouds passed, hail stones and coals of fire. The LORD also thundered in the heavens, and the Highest gave his voice; hail stones and coals of fire. Yea, he sent out his arrows, and scattered them; and he shot out lightnings, and discomfited them. Then the channels of waters were seen, and the foundations of the world were discovered at thy rebuke, O LORD, at the blast of the breath of thy nostrils. He sent from above, he took me, he drew me out of many waters. He delivered me from my strong enemy, and from them which hated me: for they were too strong for me. They prevented me in the day of my calamity: but the LORD was my stay. He brought me forth also into a large place; he delivered me, because he delighted in me. The LORD rewarded me according to my righteousness; according to the cleanness of my hands hath he recompensed me. For I have kept the ways of the LORD, and have not wickedly departed from my God. For all his judgments were before me, and I did not put away his statutes from me. I was also upright before him, and I kept myself from mine iniquity. Therefore hath the LORD recompensed me according to my righteousness, according to the cleanness of my hands in his eyesight. 
(Psalms 18:1-24)
Oh why can't we be like David!
We also are made in God's image and have the potential, like Adam, of walking and talking with God in the new Jerusalem one day. God shall delight in us, in being our God and we shall delight in worshipping Him and being one of His people. 
May we learn from David's thoughts and actions so that God may delight in each one of us.