Package trunk :: Package src :: Module model :: Class Element
[hide private]
[frames] | no frames]

Class Element

source code


Mapping class for the table «element».

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
Constructor for Element instances.
source code
 
_cascade_status(self)
Propagate its status to its parent, in a recursive manner.
source code
str
__repr__(self)
Returns a printable representation of this instance.
source code
str
__str__(self)
Coerces this instance to a string.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]
 
_children_added(cls, parent, child, initiator)
Listener to be executed when an element has to be added to a children collection.
source code
 
_children_removed(cls, parent, child, initiator)
Listener to be executed when an element has to be removed from a children collection.
source code
Query<Element>
query_tags(cls, session, tags={})
Overriden query method to apply tag-based custom filtering, on top of common equality filter.
source code
Class Variables [hide private]
  id = <sqlalchemy.ext.hybrid.hybrid_property object at 0x153ec50>
  children = <sqlalchemy.ext.hybrid.hybrid_property object at 0x...
  parent_id = <sqlalchemy.ext.hybrid.hybrid_property object at 0...
  parent = <sqlalchemy.ext.hybrid.hybrid_property object at 0x15...
  project_id = <sqlalchemy.ext.hybrid.hybrid_property object at ...
  project = <sqlalchemy.ext.hybrid.hybrid_property object at 0x1...
  status = <sqlalchemy.ext.hybrid.hybrid_property object at 0x15...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 

Constructor for Element instances. Ensures that the «forced_status» field is assigned first to cascade status properly.

Parameters:
  • args (tuple) - Optional arguments to the constructor
  • kwargs (dict) - Optional keyword arguments to the constructor
Overrides: object.__init__

_children_added(cls, parent, child, initiator)
Class Method

source code 

Listener to be executed when an element has to be added to a children collection. Check the added child status and update the parent's one.

Parameters:
  • parent (Element) - The Element that has a new child added
  • child (Element) - The Element being added as a child

_children_removed(cls, parent, child, initiator)
Class Method

source code 

Listener to be executed when an element has to be removed from a children collection. Check the removed child status and update the parent's one.

Parameters:
  • parent (Element) - The Element that has a child removed
  • child (Element) - The Element being removed as a child

query_tags(cls, session, tags={})
Class Method

source code 

Overriden query method to apply tag-based custom filtering, on top of common equality filter.

Parameters:
  • session (Session) - The database session in which to execute the query
  • tags (dict) - Tag names and values to apply as a filter
Returns: Query<Element>
A query selecting Element instances, filtered by tags

__repr__(self)
(Representation operator)

source code 

Returns a printable representation of this instance.

Returns: str
A descriptive string containing most of this instance fields
Overrides: object.__repr__

__str__(self)
(Informal representation operator)

source code 

Coerces this instance to a string.

Returns: str
The name field
Overrides: object.__str__

Class Variable Details [hide private]

children

Value:
<sqlalchemy.ext.hybrid.hybrid_property object at 0x153ec90>

parent_id

Value:
<sqlalchemy.ext.hybrid.hybrid_property object at 0x153ecd0>

parent

Value:
<sqlalchemy.ext.hybrid.hybrid_property object at 0x153ed10>

project_id

Value:
<sqlalchemy.ext.hybrid.hybrid_property object at 0x153ed50>

project

Value:
<sqlalchemy.ext.hybrid.hybrid_property object at 0x153ed90>

status

Value:
<sqlalchemy.ext.hybrid.hybrid_property object at 0x153edd0>