Please note: this project is inactive since early 2006

3. Functionalities for Object Management

All python objects must inherit from the framework class CustomObject, to be thus connected to the framework's core. The CustomObject class defines all the necessary logic to make it possible to ensure the objects' persistency within the RDBMS, as well as numerous functionalities to help you with your own business logic. For those purposes, it works with a model, from which the classes are generally generated.

This chapter presents some important issues that you should not forget when coding and customizing your classes and logic-particularly important are the methods willRead and willChange. We will also look at other functionalities you can take advantage of, among which: validation of the referential constraints and custom validation logic.

Note that, you may start working directly with the generated classes for your model-adding, modifying, and getting data (as explained in chapter 4)-and letting the framework do the above-mentioned tasks transparently. The information here is provided to allow you to better understand how the framework performs these tasks, and to thus make it easier to add to, or modify, the framework's default behaviour to better suit your application needs, e.g. to add custom validation logic.

Note: Only a small sampling of the methods and functionalities of the CustomObject class, and other supporting classes, are mentioned here. For a complete picture you will need to look at the source doc strings, for CustomObject itself, as well as the doc strings for the interfaces it implements, namely RelationshipManipulation, KeyValueCoding (these two interfaces are exposed in details in chapter 8) and DatabaseObject.

Comments are welcome: Sebastien Bigaret / Modeling Home Page
Hosted Logo