Package chandlerdb :: Package item :: Module c :: Class CItem
[frames | no frames]

Type CItem

object --+
         |
        CItem

Known Subclasses:
Item

C Item type
Method Summary
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __repr__(x)
x.__repr__() <==> repr(x)
  getAttributeAspect(...)
Return the value for an attribute aspect.
  getDirty(...)
Return the dirty flags currently set on this item.
  isDeleted(...)
Tell whether this item is deleted.
  isDeleting(...)
Tell whether this item is in the process of being deleted.
  isDirty(...)
Tell whether this item was changed and needs to be committed.
  isNew(...)
Tell whether this item is new.
  isPinned(...)
Tell whether this item is pinned.
  isSchema(...)
  isStale(...)
Tell whether this item pointer is out of date.
  setDirty(...)
Inherited from object: __delattr__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__, __str__

Instance Variable Summary
  itsKind: Return or set this item's kind.
  itsName: Return this item's name.
  itsParent: Return this item's parent.
  itsPath: Return the path to this item relative to its repository.
  itsRoot: Return this item's repository root.
  itsUUID: Return the Universally Unique ID for this item.
  itsVersion: itsVersion property
  itsView: Return this item's repository view.

Class Variable Summary
int ADIRTY = 8192                                                                  
int CDIRTY = 512                                                                   
int CMERGED = 524288                                                                
int CONTAINER = 4096                                                                  
int COPYEXPORT = 1048576                                                               
int CORESCHEMA = 2048                                                                  
int DELETED = 1                                                                     
int DELETING = 4                                                                     
int DIRTY = 1794                                                                  
int FDIRTY = 16                                                                    
int IMPORTING = 2097152                                                               
int MERGED = 983040                                                                
int MUTATING = 4194304                                                               
int NDIRTY = 256                                                                   
int NEW = 64                                                                    
int NMERGED = 262144                                                                
int NODIRTY = 32768                                                                 
int PINNED = 16384                                                                 
int RAW = 8                                                                     
int RDIRTY = 1024                                                                  
int RMERGED = 131072                                                                
int SAVEMASK = 16227                                                                 
int SCHEMA = 32                                                                    
int STALE = 128                                                                   
int VDIRTY = 2                                                                     
int VMERGED = 65536                                                                 
int VRDIRTY = 1026                                                                  

Method Details

__init__(...)
(Constructor)

x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides:
__builtin__.object.__init__

__new__(T, S, ...)

T.__new__(S, ...) -> a new object with type S, a subtype of T
Returns:
a new object with type S, a subtype of T
Overrides:
__builtin__.object.__new__

__repr__(x)
(Representation operator)

x.__repr__() <==> repr(x)
Returns:
repr(x)
Overrides:
__builtin__.object.__repr__

getAttributeAspect(...)

Return the value for an attribute aspect.

An attribute aspect is one of an attribute's many attributes described in the list below. All aspects are optional.
  • required: True if the attribute is required to have a value, False otherwise, the default. This aspects takes a boolean value.
  • persisted: True, the default, if the attribute's value is persisted when the owning item is saved; False otherwise. This aspect takes a boolean value.
  • cardinality: single, the default if the attribute is to have one single value, list or dict, if the attribute is to have a list or dictionary of values. This aspect takes a string value.
  • type: a reference to the type item describing the type(s) of value(s) this attribute can store. By default, if this aspect is not set, an attribute can store value(s) of any type. This aspect takes an item of kind Type as value.
  • defaultValue: the value to return when there is no value set for this attribute. This default value is owned by the schema attribute item and is read-only when it is a collection or a Lob. Other mutable types, such as Structs, should be used with care as mutating a defaultValue causes it to appear changed by all items returning it. By default, an attribute has no default value. See initialValue, inheritFrom and redirectTo below. This aspect takes any type of value.
  • initialValue: similar to defaultValue but the initial value is set as the value of the attribute the first time it is returned. A copy of the initial value is set when it is a collection. This aspect takes any type of value.
  • inheritFrom: one or several attribute names chained together by periods naming attributes to recursively inherit a value from. When several names are used, all but the last name are expected to name attributes containing a reference to the next item to inherit from by applying the next name. This aspect takes a string value.
  • redirectTo: one or several attribute names chained together by periods naming attributes to recursively obtain a value or aspect value from or set a value to. When several names are used, all but the last name are expected to name attributes containing a reference to the next item to redirect to by applying the next name. This aspect takes a string value.
  • otherName: for bi-directional reference attributes, this aspect names the attribute used to attach the other endpoint on the other item, ie the referenced item. This is the aspect that determines whether the attribute stored bi-directional references to items. This aspect takes a string value.
  • copyPolicy: when an item is copied this policy defines what happens to items that are referenced by this attribute. Possible copyPolicy values are:
    • remove, the default. The reference is not copied.
    • copy, the reference is copied.
    • cascade, the referenced item is copied recursively and a reference to this copy is set.
    This aspect takes a string value.
  • deletePolicy: when an item is deleted this policy defines what happens to items that are referenced by this attribute. Possible deletePolicy values are:
    • remove, the default.
    • cascade, which causes the referenced item(s) to get deleted as well. See countPolicy below.
    This aspect takes a string value.
  • countPolicy: when an attribute's deletePolicy is cascade this aspect can be used to modify the delete behaviour to only delete the referenced item if its reference count is 0. The reference count of an item is defined by the total number of references it holds in attributes where the countPolicy is set to count. By default, an attribute's countPolicy is none. This aspect takes a string value.

If the attribute's redirectTo aspect is set, this method is redirected just like getAttributeValue.

If the attribute is not defined for the item's kind, a subclass of AttributeError is raised.
Returns:
a value

getDirty(...)

Return the dirty flags currently set on this item.
Returns:
an integer

isDeleted(...)

Tell whether this item is deleted.
Returns:
True or False

isDeleting(...)

Tell whether this item is in the process of being deleted.
Returns:
True or False

isDirty(...)

Tell whether this item was changed and needs to be committed.
Returns:
True or False

isNew(...)

Tell whether this item is new.

A new item is defined as an item that was never committed to the repository.
Returns:
True or False

isPinned(...)

Tell whether this item is pinned.

A pinned item is not freed from memory or marked stale, until it is un-pinned or deleted.
Returns:
True or False

isStale(...)

Tell whether this item pointer is out of date.

A stale item pointer is defined as an item pointer that is no longer valid. When an item is unloaded, the item pointer is marked stale. The item pointer can be refreshed by reloading the item via the find method, passing it the item's uuid obtained via the itsUUID property.

Stale items are encountered when item pointers are kept across transaction boundaries. It is recommended to keep the item's uuid instead.
Returns:
True or False

Instance Variable Details

itsKind

Return or set this item's kind.

When setting an item's kind, only the values for attributes common to both current and new kind are retained. After the new kind is set, its attributes' optional initial values are set for attributes for which there is no value on the item. Setting an item's kind to None clears all its values.
Value:
<attribute 'itsKind' of 'chandlerdb.item.c.CItem' objects>             

itsName

Return this item's name.

The item name is used to lookup an item in its parent container and construct the item's path in the repository. An item may be renamed by setting this property.

The name of an item must be unique among all its siblings.
Value:
<attribute 'itsName' of 'chandlerdb.item.c.CItem' objects>             

itsParent

Return this item's parent.

An item may be moved by setting this property.
Value:
<attribute 'itsParent' of 'chandlerdb.item.c.CItem' objects>           

itsPath

Return the path to this item relative to its repository.

A path is a / separated sequence of item names.
Value:
<attribute 'itsPath' of 'chandlerdb.item.c.CItem' objects>             

itsRoot

Return this item's repository root.

A repository root is a direct child of the repository. All single-slash rooted paths are expressed relative to this root when used with this item.
Value:
<attribute 'itsRoot' of 'chandlerdb.item.c.CItem' objects>             

itsUUID

Return the Universally Unique ID for this item.

The UUID for an item is generated when the item is first created and never changes. This UUID is valid for the life of the item.

The UUID is a 128 bit number intended to be unique in the entire universe and is implemented as specified in the IETF's UUID draft spec.
Value:
<attribute 'itsUUID' of 'chandlerdb.item.c.CItem' objects>             

itsVersion

itsVersion property
Value:
<attribute 'itsVersion' of 'chandlerdb.item.c.CItem' objects>          

itsView

Return this item's repository view.

The item's repository view is defined as the item's root's parent.
Value:
<attribute 'itsView' of 'chandlerdb.item.c.CItem' objects>             

Class Variable Details

ADIRTY

Type:
int
Value:
8192                                                                  

CDIRTY

Type:
int
Value:
512                                                                   

CMERGED

Type:
int
Value:
524288                                                                

CONTAINER

Type:
int
Value:
4096                                                                  

COPYEXPORT

Type:
int
Value:
1048576                                                               

CORESCHEMA

Type:
int
Value:
2048                                                                  

DELETED

Type:
int
Value:
1                                                                     

DELETING

Type:
int
Value:
4                                                                     

DIRTY

Type:
int
Value:
1794                                                                  

FDIRTY

Type:
int
Value:
16                                                                    

IMPORTING

Type:
int
Value:
2097152                                                               

MERGED

Type:
int
Value:
983040                                                                

MUTATING

Type:
int
Value:
4194304                                                               

NDIRTY

Type:
int
Value:
256                                                                   

NEW

Type:
int
Value:
64                                                                    

NMERGED

Type:
int
Value:
262144                                                                

NODIRTY

Type:
int
Value:
32768                                                                 

PINNED

Type:
int
Value:
16384                                                                 

RAW

Type:
int
Value:
8                                                                     

RDIRTY

Type:
int
Value:
1024                                                                  

RMERGED

Type:
int
Value:
131072                                                                

SAVEMASK

Type:
int
Value:
16227                                                                 

SCHEMA

Type:
int
Value:
32                                                                    

STALE

Type:
int
Value:
128                                                                   

VDIRTY

Type:
int
Value:
2                                                                     

VMERGED

Type:
int
Value:
65536                                                                 

VRDIRTY

Type:
int
Value:
1026                                                                  

Generated by Epydoc 2.1 on Mon Dec 19 13:33:28 2005 http://epydoc.sf.net