Part of lp.code.browser.decorations View In Hierarchy
This avoids repeated db queries.
| Method | __init__ | Undocumented |
| Method | displayname | Override the default model property. |
| Method | bzr_identity | Cache the result of the bzr identity. |
| Method | is_series_branch | A simple property to see if there are any series links. |
| Method | associatedProductSeries | Override the IBranch.associatedProductSeries. |
| Method | associatedSuiteSourcePackages | Override the IBranch.associatedSuiteSourcePackages. |
| Method | associated_product_series | Cache the realized product series links. |
| Method | suite_source_packages | Cache the realized suite source package links. |
| Method | upgrade_pending | Cache the result as the property hits the database. |
| Method | subscriptions | Cache the realized branch subscription objects. |
| Method | hasSubscription | Override the default branch implementation. |
| Method | latest_revisions | Cache the query result. |
Inherited from BzrIdentityMixin:
| Method | shortened_path | See IBranch. |
| Method | getBranchIdentities | See IBranch. |
| Method | getBranchLinks | See IBranch. |
If left to the underlying model, it would call the bzr_identity on the underlying branch rather than the cached bzr_identity on the decorated branch. And that would cause two database queries.
The property is defined in the bzrIdentityMixin class. This uses the associatedProductSeries and associatedSuiteSourcePackages methods.