The owner of any lien on land or improvements who shall pay to any materialman or mechanic the contract price for materials furnished or labor done shall be subrogated to the lien of said materialman or mechanic on said land or improvements and shall have the right to consolidate all such claims in one statement to be filed as provided in this division. The length of time for the filing of said claim shall be measured by the greatest length of time for the filing of any class of claims paid by the holder of such lien.