|
|
1.1 ! root 1: /* QualifiedAssociation.h: ! 2: * You may freely copy, distribute, and reuse the code in this example. ! 3: * NeXT disclaims any warranty of any kind, expressed or implied, as to its ! 4: * fitness for any particular use. ! 5: * ! 6: * Written by Mai Nguyen, NeXT Developer Support ! 7: * ! 8: * ! 9: * QualifiedAssociation is a subclass of DBAssociation which is designed to ! 10: * replace the association created by the DBKit palette between a fetch ! 11: * group from a master table and the fetch group from a detail table. Pass ! 12: * the detail fetch group into the init method for this object which will find ! 13: * the current association for that fetch group and replace that association ! 14: * with this new one. After the initialization, the new association is owned ! 15: * by the DBModule, and the old association has been freed. ! 16: * ! 17: * The added value of this association is to place an additional qualifier ! 18: * on the fetch of the detail records. This qualifier can be set and accessed ! 19: * via the setQualifier: and qualifier methods. ! 20: */ ! 21: ! 22: #import <appkit/appkit.h> ! 23: #import <dbkit/dbkit.h> ! 24: ! 25: #import <dbkit/DBAssociation.h> ! 26: ! 27: @interface QualifiedAssociation:DBAssociation ! 28: { ! 29: DBQualifier *dbQualifier; ! 30: } ! 31: ! 32: /* init method for the new subclass (designated initializer) */ ! 33: - (QualifiedAssociation *)initAndReplaceAssociationTo:(DBFetchGroup *)detailFG; ! 34: ! 35: /* Override the setValue methods */ ! 36: - setValue:value; ! 37: ! 38: /* new methods */ ! 39: - setQualifier:(DBQualifier *)qualifier; ! 40: - (DBQualifier *)qualifier; ! 41: ! 42: @end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.