Recently, I wrote a piece on how the Reformed view typological interpretation as a consequence of the literal sense of Scripture and how the literal sense naturally leads to a mediate, figurative sense. Below we see Calvin doing this in Psalm 45.
Hitherto, I have explained the text in the literal sense. But it is necessary that I should now proceed to illustrate somewhat more largely the comparison of Solomon with Christ, which I have only cursorily noticed. It would be quite sufficient for the pious and humble simply to state what is obvious, from the usual tenor of Scripture, that the posterity of David typically represented Christ to the ancient people of God; but as the Jews and other ungodly men refuse to submit cordially to the force of truth, it is of importance to show briefly from the context itself, the principal reasons from which it appears that some of the things here spoken are not applicable fully and perfectly to Solomon. As I intimated at the outset, the design of the prophet who composed this psalm was to confirm the hearts of the faithful, and to guard them against the terror and alarm with which the melancholy change that happened soon after might fill their minds. An everlasting duration, it might be said, had been promised to this kingdom, and it fell into decay after the death of one man. To this objection, therefore, the prophet replies, that although Rehoboam, who was the first successor of that glorious and powerful king, had his sovereignty reduced within narrow limits, so that a great part of the people were cut off and placed beyond the bounds of his dominion, yet that was no reason why the faith of the Church should fail; for in the kingdom of Solomon God had exhibited a type or figure of that everlasting kingdom which was still to be looked for and expected. In the first place, the name of king is ascribed to Solomon, simply by way of eminence, to teach us, that what is here said is not spoken of any common or ordinary king, but of that illustrious sovereign, whose throne God had promised should endure as long as the sun and moon continued to shine in the heavens, (Psalm 72:5.) David certainly was king, and so were those who succeeded Solomon. It is necessary then to observe, that there is in this term some special significance, as if the Holy Spirit had selected this one man from all others, to distinguish him by the highest mark of sovereignty. Besides, how inconsistent would it be to commend very highly warlike valor in Solomon, who was a man of a meek and quiet disposition, and who having ascended the throne when the kingdom enjoyed tranquillity and peace, devoted himself only to the cultivation of those things that are suitable to a time of peace, and never distinguished himself by any action in battle? But, above all, no clearer testimony could be adduced of the application of this psalm to Christ, than what is here said of the eternal duration of the kingdom. There can be no doubt, that allusion is here made to the holy oracle of which I have already made mention, That as long as the sun and moon shall endure in the heavens the throne of David shall endure. Even the Jews themselves are constrained to refer this to the Messiah. Accordingly, although the prophet commenced his discourse concerning the son of David, there can be no doubt, that, guided by the Holy Spirit to a higher strain, he comprehended the kingdom of the true and everlasting Messiah. Besides, there is the name ‘lhym, Elohim, which it is proper to notice. It is no doubt also applied both to angels and men, but it cannot be applied to a mere man without qualification. And, therefore, the divine majesty of Christ, beyond all question, is expressly denoted here. 
I now proceed to notice the several parts, which however I shall only refer to briefly in passing. We have said that while this song is called a love song, or wedding song, stilldivine instruction is made to hold the most prominent place in it, lest our imaginations should lead us to regard it as referring to some lascivious and carnal amours. We know also, that in the same sense Christ is called “the perfection of beauty;” not that there was any striking display of it in his countenance, as some men grossly imagine, but because he was distinguished by the possession of singular gifts and graces, in which he far excelled all others. Nor is it an unusual style of speaking, that what is spiritual in Christ should be described under the form of earthly figures. The kingdom of Christ, it is said, shall be opulent; and in addition to this it is said, that it shall attain to a state of great glory, such as we see where there is great prosperity and vast power. In this description there is included also abundance of pleasures. Now, there is nothing of all this that applies literally to the kingdom of Christ, which is separated from the pomps of this world. But as it was the design of the prophets to adapt their instruction to the capacity of God’s ancient people, so in describing the kingdom of Christ, and the worship of God which ought to be observed in it, they employ figures taken from the ceremonies of the Law.
If we bear in mind this mode of statement, in accordance with which such descriptions are made, there will no longer be any obscurity in this passage. It is also deserving of our notice, that, after the Psalmist has commended this heavenly king for his eloquence, he also describes him as armed with his sword. As, on the one hand, he governs by the influence of persuasion, those who willingly submit to his authority, and manifest docility of disposition; so, on the other hand, as there have been in all ages, and will continue to be, many who are rebellious and disobedient, it is necessary that the unbelieving should be made to feel in their own destruction that Christ has not come unarmed. While, therefore, he, is alluring us with meekness and kindness to himself, let us promptly and submissively yield to his authority, lest he should fall upon us, armed as he is with his sword and with deadly arrows. It is said, indeed, with much propriety, that grace is poured into his lips; for the Gospel, in its very nature, breathes the odour of life: but if we are stubborn and rebellious, this grace will become a ground of terror, and Christ himself will convert the very doctrine of his salvation into a sword and arrows against us. From this also there arises no small consolation to us, that the multitude and insolence of the adversaries of Christ may not discourage us. We know well with what arrogance the Papists reject Jesus Christ, whom, nevertheless, they boast to be their King; we know also with what profane contempt the greater part of the world deride him, and how frowardly the Turks and Jews reproach him. In the midst of such disorder, let us remember this prophecy, That Christ has no want of a sword and arrows to overthrow and destroy his enemies.
Here I will again briefly repeat what I have noticed above, namely, that however much the Jews endeavor by their cavillings to pervert the sense of this verse, Thy throne, O God! is for ever and ever, yet it is sufficient of itself to establish the eternal divinity of Christ: for when the name ‘lhym, Elohim is ascribed either to angels or men, some other mark is at the same time usually added, to distinguish between them and the only true God; but here it is applied to Christ, simply and without any qualification. It is of importance, however, to notice, that Christ is here spoken of as he is “God manifested in the flesh,” — (1 Timothy 3:16.)
He is also called God, as he is the Word, begotten of the Father before all worlds; but he is here set forth in the character of Mediator, and on this account also mention is made of him a little after, as being subject to God. And, indeed, if you limit to his divine nature what is here said of the everlasting duration of his kingdom, we shall be deprived of the inestimable benefit which redounds to us from this doctrine, when we learn that, as he is the head of the Church, the author and protector of our welfare, he reigns not merely for a time, but possesses an endless sovereignty; for from this we derive our greatest confidence both in life and in death. From the following verse also it clearly appears, that Christ is here exhibited to us in the character of Mediator; for he is said to have been anointed of God, yea, even above his fellows, (Isaiah 42:1; Hebrews 2:17.) This, however, cannot apply to the eternal Word of God, but to Christ in the flesh, and in this character he is both the servant of God and our brother.