2872. A lien is a charge imposed in some mode other than by a transfer in trust upon specific property by which it is made security for the performance of an act.

2873. Liens are either general or special.

2874. A general lien is one which the holder thereof is entitled to enforce as a security for the performance of all the obligations, or all of a particular class of obligations, which exist in his favor against the owner of the property.

2875. A special lien is one which the holder thereof can enforce only as security for the performance of a particular act or obligation, and of such obligations as may be incidental thereto.

2876. Where the holder of a special lien is compelled to satisfy a prior lien for his own protection, he may enforce payment of the amount so paid by him, as a part of the claim for which his own lien exists.

2877. Contracts of mortgage, pledge, bottomry, or respondentia are subject to all of the provisions of this chapter.