Package twisted :: Package enterprise :: Module xmlreflector :: Class XMLReflector |
[frames | no frames]

## Class XMLReflector

    Reflector --+
                |
               XMLReflector

Reflector for twisted.enterprise that uses XML files.

WARNING: this is an experimental piece of code. this reflector does not function completely yet! it is also very very slow.

Method Summary
| `__init__(self, baseDir, rowClasses)`
| ``_populate`(self)` load schema data
| `_rowLoader(self, tableName, parentRow, data, whereClause, forceChildren)`
| ``deleteRow`(self, rowObject)` delete the row for this object from the database.
| ``insertRow`(self, rowObject)` insert a new row for this object instance.
| ``loadObjectsFrom`(self, tableName, parentRow, data, whereClause, forceChildren)` The whereClause for XML loading is [(columnName, operation, value)] list of tuples
| `makeFilenameFor(self, rowObject)`
| ``updateRow`(self, rowObject)` update this rowObject to the database.
Inherited from Reflector
| ``__getstate__`(self)`
| ``__setstate__`(self, state)`
| ``addToCache`(self, rowObject)` NOTE: Should this be recursive?! requires better container knowledge...
| ``addToParent`(self, parentRow, rows, tableName)` util method used by reflectors.
| ``buildWhereClause`(self, relationship, row)` util method used by reflectors.
| ``findInCache`(self, rowClass, kw)`
| ``getTableInfo`(self, rowObject)` Get a TableInfo record about a particular instance.
| ``populateSchemaFor`(self, tableInfo)` This is called once for each registered rowClass to add it and its foreign key relationships for that rowClass to the schema.
| ``removeFromCache`(self, rowObject)` NOTE: should this be recursive!??

Class Variable Summary
`str` | `extension` = `'.xml'`
Inherited from Reflector
`int` | `populated` = 0

Method Details

### _populate(self) load schema data Overrides: `twisted.enterprise.reflector.Reflector._populate`

### deleteRow(self, rowObject) delete the row for this object from the database. Overrides: `twisted.enterprise.reflector.Reflector.deleteRow`

### insertRow(self, rowObject) insert a new row for this object instance. do not include the "container" attribute. Overrides: `twisted.enterprise.reflector.Reflector.insertRow`

### loadObjectsFrom(self, tableName, parentRow=None, data=None, whereClause=None, forceChildren=1) The whereClause for XML loading is [(columnName, operation, value)] list of tuples Overrides: `twisted.enterprise.reflector.Reflector.loadObjectsFrom`

### updateRow(self, rowObject) update this rowObject to the database. Overrides: `twisted.enterprise.reflector.Reflector.updateRow`

Class Variable Details

    ### extension Type: `str` Value:
        '.xml'

Generated by Epydoc 2.0 on Sat Oct 25 00:55:12 2003 | http://epydoc.sf.net