(1) Except as provided in sections
363,
506 (c),
522,
544,
545,
547, and
548 of this title, if the debtor and an entity entered into a security agreement before the commencement of the case and if the security interest created by such security agreement extends to property of the debtor acquired before the commencement of the case and to proceeds, products, offspring, or profits of such property, then such security interest extends to such proceeds, products, offspring, or profits acquired by the estate after the commencement of the case to the extent provided by such security agreement and by applicable nonbankruptcy law, except to any extent that the court, after notice and a hearing and based on the equities of the case, orders otherwise.
(2) Except as provided in sections
363,
506 (c),
522,
544,
545,
547, and
548 of this title, and notwithstanding section
546 (b) of this title, if the debtor and an entity entered into a security agreement before the commencement of the case and if the security interest created by such security agreement extends to property of the debtor acquired before the commencement of the case and to amounts paid as rents of such property or the fees, charges, accounts, or other payments for the use or occupancy of rooms and other public facilities in hotels, motels, or other lodging properties, then such security interest extends to such rents and such fees, charges, accounts, or other payments acquired by the estate after the commencement of the case to the extent provided in such security agreement, except to any extent that the court, after notice and a hearing and based on the equities of the case, orders otherwise.