This is DBRelationship.h in view mode; [Download] [Up]
/*
** DBRelationship.h
** Database Kit, Release 3.0
** Copyright (c) 1992, NeXT Computer, Inc. All rights reserved.
*/
#import <objc/Object.h>
#import <dbkit/protocols.h>
@class List;
@class DBAttribute;
/*
** DBRelationship represents a linkage between two attributes, which can
** be either one-to-one or one-to-many. The linkage is directional, that
** is, there is no automatic inverse relationship.
**
** Relationships are typically used as part of a DBDataPath, where they are
** used to "flatten" complex dataModels and to "decode" master-detail type
** relationships.
*/
@interface DBRelationship : Object <DBProperties, DBExpressionValues>
{
id entity;
@private
id _propertyNameExpr;
id _internalNameExpr; /* not used in SQL */
id _aliasedNameExpr;
id _source; /* this is an attribute or a list */
id _dest; /* this is an attribute or a list */
struct {
BOOL singular:1; /* is a to-many relation */
BOOL readOnly:1; /* is not updateable */
BOOL key:1; /* relates as "foreign key" to destination */
BOOL outerJoin:1; /* outer join used when joined */
BOOL compound:1; /* contains multiple associations */
BOOL hidden:1; /* is relationship invisible in browsers? */
BOOL lazyHint:1; /* is traversing relationship expensive? */
int _RESERVED:9;
} _flags;
}
- initWithName:(const char*)aName forEntity:(id<DBEntities>)anEntity;
- copyFromZone:(NXZone*)z;
- free;
- (List*)getSourceAttributes:(List*)aList;
- (List*)getDestinationAttributes:(List*)aList;
- addAssociationFrom:(DBAttribute*)source to:(DBAttribute*)dest;
- removeAssociationAt:(unsigned)anIndex;
- (BOOL)isAggregate;
- (BOOL)isOuterJoin;
- (BOOL)isHidden;
- (BOOL)isLazy;
- useOuterJoin:(BOOL)yn;
- setSingular:(BOOL)yn;
- setReadOnly:(BOOL)yn;
- setKey:(BOOL)yn;
- setHidden:(BOOL)yn;
- setLazyHint:(BOOL)yn;
- setInternalName:(const char*)newInternalName;
- (const char*)internalName;
- read:(NXTypedStream*)ts;
- write:(NXTypedStream*)ts;
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.