File:  [NeXTSTEP 3.3 examples] / Examples / DatabaseKit / AssociationOracle / QualifiedAssociation.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:49:00 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3

/* QualifiedAssociation.h:
 * You may freely copy, distribute, and reuse the code in this example.
 * NeXT disclaims any warranty of any kind, expressed or  implied, as to its
 * fitness for any particular use.
 *
 * Written by Mai Nguyen, NeXT Developer Support
 *
 *
 * QualifiedAssociation is a subclass of DBAssociation which is designed to
 * replace the association created by the DBKit palette between a fetch  
 * group from a master table and the fetch group from a detail table.  Pass 
 * the detail fetch group into the init method for this object which will find  
 * the current association for that fetch group and replace that association 
 * with this new one.  After the initialization, the new association is owned
 * by the DBModule, and the old association has been freed.
 *
 * The added value of this association is to place an additional qualifier
 * on the fetch of the detail records.  This qualifier can be set and accessed
 * via the setQualifier: and qualifier methods.
 */

#import <appkit/appkit.h>
#import <dbkit/dbkit.h>

#import <dbkit/DBAssociation.h>

@interface QualifiedAssociation:DBAssociation
{
	DBQualifier *dbQualifier;
}

/* init method for the new subclass (designated initializer) */
- (QualifiedAssociation *)initAndReplaceAssociationTo:(DBFetchGroup *)detailFG;
												
/* Override the setValue methods */
- setValue:value;

/* new methods */
- setQualifier:(DBQualifier *)qualifier;
- (DBQualifier *)qualifier;

@end

unix.superglobalmegacorp.com

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