Advanced Customization > Services and Infrastructure Customization > System Generation > Modeling Business Objects
  
Modeling Business Objects
* 
Code examples in this chapter have been reformatted for presentation purposes and, therefore, may contain line number, hidden editing characters (such as tabs and end-of-line characters) and extraneous spaces. If you cut and paste code from this manual, check for these characters and remove them before attempting to use the example in your application.
Overview of Windchill Persistence
The Windchill persistence architecture maps Java classes and fields to database rows and columns (schema). Modeling, the manner in which schema is described, consists of annotating the class declarations of Java source files with PTC “GenAs” annotations that include annotation members for describing properties, associations, and other meta-data.
Java annotation processors are invoked during javac compilation and are responsible for generating fields, accessors, RMI and PDS externalization APIs, and other methods (such as equals() and hashCode()). SQL scripts representing the database schema (tables, columns, and indexes) are generated separately post-compilation.
The Java compiler not only generates and compiles the necessary artifacts to implement the model as declared by the annotations, it also produces information required at runtime to introspect on the model. It registers classes (modelRegistry.properties), associations (associationRegistry.properties), and their hierarchy (descendentRegistry.properties) and produces ClassInfo files which are utilized by runtime introspection.
Jython
Jython is a Java implementation of the popular Python programming language. Jython is used in this chapter to provide working code that demonstrates the examples in “real world” scenarios. Jython’s dynamic nature makes it particularly attractive (over Java programs) because its interpreter facilitates interaction and exploration that simply is not possible with compiled code and a debugger. Additionally, while Jython is a Python implementation (on top of Java), the syntax is readily familiar to Java programmers and instantly translatable.
Jython can be obtained from http://jython.org.
* 
The examples using Jython assume a Windchill CLASSPATH, which is readily available if run from inside a Windchill shell (which can be started by invoking <load point>/Windchill/bin shell).