Annotation of Examples/EnterpriseObjects/UniqueKey/UniqueKey_oracle/README.rtf, revision 1.1.1.1

1.1       root        1: {\rtf0\ansi{\fonttbl\f2\fswiss Helvetica;\f1\fmodern Ohlfs;}
                      2: \paperw11680
                      3: \paperh11780
                      4: \margl120
                      5: \margr120
                      6: {\colortbl;\red0\green0\blue0;}
                      7: \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f2\b\i0\ulnone\fs36\fc0\cf0 UniqueKey Example
                      8: \b0\fs24 \
                      9: by Steve Herrick, NeXT EOF Team\
                     10: \
                     11: 
                     12: \b\fs28 Overview
                     13: \f1\b0\fs20 \
                     14: 
                     15: \f2\fs24 \
                     16: This example shows how to reserve a block of unique keys to support object insertion into an entity.  The main window contains a master/detail relationship which supports update, insert, and delete.  Adding employees requires the generation of a unique key for the new object.  The UniqueKey class was written a resource to hand out the nextKey for each entity name.  Instances of UniqueKey share a separate database channel to insure access for reserving new blocks of keys.\
                     17: \
                     18: In this example, the master entity contains employee names and the detail displays equipment assigned to that employee.  Each employee has a unique integer EmpId.\
                     19: \
                     20: \
                     21: 
                     22: \b\fs28\fc1\cf1 Program Organization\
                     23: 
                     24: \b0\fs24 \
                     25: 
                     26: \b Explanation of the nib file
                     27: \b0 \
                     28: The File's Owner in the .nib file has been set to EOApplication.  This was done by setting the File's Owner class in the inspector.  EOApplication is necessary to implement autorelease pools under 3.2.  This subclass of Application flushes the autorelease pool each cycle through the event queue.  Special handling is used to make modal loops work correctly.\
                     29: \
                     30: As mentioned in the release notes, the _main file was edited as follows:\
                     31: \
                     32: 
                     33: \f1 #import <EOApplication.h>\
                     34: \
                     35: 
                     36: \f2 was changed to\
                     37: \
                     38: 
                     39: \f1 #import <eointerface/EOApplication.h>
                     40: \f2 \
                     41: \
                     42: There are three controllers in this example.  The Employee controller has a master/detail relationship with its EquipmentForEmployee controller to display equipment assigned to a selected employee.  An additional AddEquipmentForEmployee controller is used to allow selection of equipment not currently assigned to the employee.  The MasterDetail object is the delegate of the Employee controller.  It gets notification when inserts and delete operations are performed.  This hook allows clean-up of equipment ownership when an employee leaves the company.  MasterDetail has outlets for these controllers and supports actions from the release and assign buttons in the equipment detail.\
                     43:                        \
                     44: \
                     45: 
                     46: \b Major Classes in the Application
                     47: \b0 \
                     48: \
                     49:  \
                     50: 
                     51: \pard\tx2880\tx2900\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fi-2880\li2880\fc1\cf1 MasterDetail       A coordination object which is the delegate of the Employee, EquipmentForEmployee, and AddEquipmentForEmployee controllers.  It creates a UniqueKey instances to vend keys for the addition of employees.\
                     52: \
                     53: 
                     54: \pard\tx2900\tx2900\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fi-2880\li2880\fc1\cf1  UniqueKey Reserves blocks of unique integer keys for a given entity name.  UniqueKey uses a separate channel to insure access to its own unique_key entity.  This entity (table) is used to store the maxKey for a given entityName.  An instance of UniqueKey reserves a block of keys by incrementing maxKey by the block size.  Optimistic locking is used for the update, so a re-try consists of a call to re-fetch the current data, increment maxKey, and attempt another update.\
                     55: 
                     56: \pard\tx560\tx1120\tx2060\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\fi-2060\li2060\fc1\cf1 \
                     57: \
                     58: 
                     59: \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\b\fc1\cf1 Other Peculiarities\
                     60: 
                     61: \b0 This example uses the additional shared libraries libEOInterface_s.a, libEOAccess_s.a, and libFoundation_s.a.  Also, Makefile.preamble uses:\
                     62: \
                     63: 
                     64: \f1 OTHER_LDFLAGS = -all_load\
                     65: 
                     66: \f2 \
                     67: to force the linking of shared library classes that are referenced at runtime by EOPalette.palette objects.\
                     68: 
                     69: \fc0\cf0 \
                     70: 
                     71: \b NOTE for HPPA-Users (EOF Release 1.0 only)\
                     72: 
                     73: \b0 \
                     74: The Oracle7 adaptor is not available yet for HPPA platforms. You'll need to edit the .eomodel file and replace the Oracle7 string with the Oracle string to use the Oracle6-based adaptor.\
                     75: \
                     76: 
                     77: \b\fs28\fc1\cf1 DB Scripts\
                     78: \
                     79: 
                     80: \pard\tx2880\tx2900\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\b0\fs24\fi-2880\li2880\fc0\cf0 installPEOPLE.sqlsybase\
                     81: installPEOPLE.sqloracle        Used to create and restore the databases for the Sybase and Oracle versions of this example.\
                     82: 
                     83: \b\fs28\fc1\cf1 \
                     84: 
                     85: \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\b0\fs24\fc1\cf1 \
                     86: 
                     87: \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc1\cf1 Valid for NEXTSTEP Release 3.2 installed with the Enterprise Objects Framework Release 1.0 and 1.1
                     88: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.