Arena
1.0
A content management system
|
A row of data retrieved from a data source. More...
Public Member Functions | |
def | __init__ |
Construct a new instance of the class. More... | |
def | init |
Initializer. | |
def | flush |
Flush any changes made to the data row back to the data source. More... | |
def | fetch |
Fetch the data row from the data source. More... | |
def | insert |
Insert the data row into the data source. More... | |
def | delete |
Delete the data row from the data source. | |
def | toString |
Construct a string representation of the data row. More... | |
def | isDirty |
Determine whether or not changes have been made to the data row since it was initially loaded from the data source. More... | |
def | changes |
Retrieve the list of changed fields. More... | |
def | Source |
Retrieve a reference to the data source used by the data row. More... | |
def | __getitem__ |
Get value of the specified field from the data row. More... | |
def | __setitem__ |
Set the value of the specified field. More... | |
def | __delitem__ |
Delete the specified field. More... | |
def | keys |
Retrieve the keys (field names) in the data row. More... | |
Public Member Functions inherited from Library.Base.Events.ALoggingEventfulObject | |
def | __init__ |
Constructor. More... | |
def | init |
Initializer. | |
def | error |
Generate an error event. More... | |
def | log |
Log the specified item. More... | |
def | Log |
Retrieve the log used by the class. | |
Public Member Functions inherited from Library.Base.Events.AnEventfulObject | |
def | __init__ |
Constructor. More... | |
def | init |
Initializer. | |
def | __del__ |
Destructor. | |
def | parseParams |
Parse the specified parameters, looking for named events and setting event handlers as appropriate. More... | |
def | generate |
Generate the named event. | |
def | update |
Update the events generated by the object. | |
def | error |
Generate an error event. More... | |
def | toString |
Construct a string representation of the object. More... | |
def | on |
Set the handler for the specified event. More... | |
def | onMultiple |
Set handlers for multiple events. More... | |
def | handlerFor |
Retrieve the handler for the specified event. More... | |
def | generates |
Determine whether or not the object generates the named event. More... | |
def | __getitem__ |
Retrieve the value of the named property. | |
def | __setitem__ |
Set the value of the named property. | |
Public Member Functions inherited from Library.Base.Classwork.AnObject | |
def | init |
Initialize a new object instance. More... | |
def | __init__ |
Construct and initialize a new instance of AnObject. More... | |
def | __del__ |
Destroy the object instance. More... | |
def | displayName |
Construct a "pretty" display name for the class instance, based on the name of its class. More... | |
def | implements |
Determine whether the class instance is related to the specified class. More... | |
def | toString |
Return a string representation of the class, suitable for output to a console or text-based device. More... | |
def | __str__ |
Return a string representation of the class. More... | |
def | classname |
Return the name of the class from which the instance was created. More... | |
def | name |
Return the name of the class. More... | |
Public Member Functions inherited from Library.String.Utilities.IsPrintable | |
def | toString |
Return a string representation of the class conveniently. More... | |
def | __str__ |
Return a string representation of the class. More... | |
def | printTo |
Print a string representation of the class to the specified stream. More... | |
A row of data retrieved from a data source.
This class is designed to represent a single record from a data source. It records changes that are made to its fields, so that updates can be made by calling ADataRow.flush().
def Library.DataSource.DataRows.ADataRow.__init__ | ( | Self, | |
fieldsValues = None , |
|||
params | |||
) |
Construct a new instance of the class.
If fields and values are specified in fieldsValues
, they are stored for later use by the data row.
The constructor expects that params
will contain the following items:
DataSource
– A reference to an instance of ADataSource, from which the data for the row is retrieved.category
– The name of the category (or table) from which the record was retrieved def Library.DataSource.DataRows.ADataRow.__delitem__ | ( | Self, | |
key | |||
) |
Delete the specified field.
This routine is provided for convenience, so that access to the fields and values of the data row can be programmed as though the row was a dictionary object.
This method generates the deleteItem
event.
def Library.DataSource.DataRows.ADataRow.__getitem__ | ( | Self, | |
key | |||
) |
Get value of the specified field from the data row.
This routine is provided for convenience, so that access to the fields and values of the data row can be programmed as though the row was a dictionary object. This method accepts either a string key or an integer index into the data row (with index zero representing the first field).
This method generates the getItem
event.
def Library.DataSource.DataRows.ADataRow.__setitem__ | ( | Self, | |
key, | |||
value | |||
) |
Set the value of the specified field.
This routine is provided for convenience, so that access to the fields and values of the data row can be programmed as though the row was a dictionary object. This method accepts either a string key or an integer index into the data row (with the first field at index 0).
This method generates the setItem
event.
def Library.DataSource.DataRows.ADataRow.changes | ( | Self | ) |
Retrieve the list of changed fields.
def Library.DataSource.DataRows.ADataRow.fetch | ( | Self, | |
params | |||
) |
Fetch the data row from the data source.
def Library.DataSource.DataRows.ADataRow.flush | ( | Self, | |
criteria | |||
) |
Flush any changes made to the data row back to the data source.
This routine should be implemented by descendants of ADataRow.
This method generates the flush
event.
def Library.DataSource.DataRows.ADataRow.insert | ( | Self | ) |
Insert the data row into the data source.
def Library.DataSource.DataRows.ADataRow.isDirty | ( | Self | ) |
Determine whether or not changes have been made to the data row since it was initially loaded from the data source.
def Library.DataSource.DataRows.ADataRow.keys | ( | Self | ) |
Retrieve the keys (field names) in the data row.
This routine is provided for convenience, so that access to the fields and values of the data row can be programmed as though the row was a dictionary object.
def Library.DataSource.DataRows.ADataRow.Source | ( | Self | ) |
Retrieve a reference to the data source used by the data row.
def Library.DataSource.DataRows.ADataRow.toString | ( | Self | ) |
Construct a string representation of the data row.
This representation is formatted as a list of the field names and field values in the data row. The list is delimited using the string specified by ADataRow.pairsDelimiter and the field names are separated from the field values using the string specified by ADataRow.keyDelimiter.