home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.0
/
NeXTSTEP3.0.iso
/
NextDeveloper
/
Headers
/
dbkit
/
DBRecordList.h
< prev
next >
Wrap
Text File
|
1992-06-19
|
3KB
|
96 lines
/*
** DBRecordList.h
** Database Kit, Release 3.0
** Copyright (c) 1992, NeXT Computer, Inc. All rights reserved.
*/
#import <dbkit/DBRecordStream.h>
#import <dbkit/protocols.h>
#import <dbkit/enums.h>
@class List;
@class DBDatabase;
@class DBQualifier;
@class DBValue;
/*
** Emptying, initing, or fetching recor$ Gnto the RecordList will reset
** it to a "unmodified" state. After this point, modifications are tracked
** until the recordList is refilled or a saveModifications is received.
**
** If there is no transaction in progress for the RecordList's database, and
** autosave mode is not enabled, saveModifications will create
** a transaction context and attempt to perform the modifications. If one
** fails, the entire transaction is rolled back.
**
** If there is already a transaction in progress for the RecordList's database,
** the modifications will be attempted in that transaction context (no new
** transaction is generated).
**
** When notification of failure is sent to the delegate, the recordList's
** "cursor" will be positioned on the row that is failing -- any rows that
** fail will be "dirty" after the saveModifications has completed. This
** combination of events let's you go back and fix failures, and then
** resubmit.
*/
@interface DBRecordList : DBRecordStream <DBCursorPositioning, DBContainers>
{
@private
id _rowList;
id _insertedList;
id _deletedList;
unsigned _currentRow;
unsigned _mode;
}
- init;
- clear;
- free;
- fetchUsingQualifier:(DBQualifier*)aQualifier;
- fetchUsingQualifier:(DBQualifier*)aQualifier empty:(BOOL)emptyFirst;
- fetchRecordForRecordKey:(DBValue*)aValue;
- setRetrieveMode:(DBRecordListRetrieveMode)aMode;
- (DBRecordListRetrieveMode)currentRetrieveMode;
- (BOOL)isModified;
- (BOOL)isModifiedAt:(unsigned)index;
- (BOOL)isModifiedForProperty:property at:(unsigned)index;
- (BOOL)isNewRecord;
- (BOOL)isNewRecordAt:(unsigned)index;
/*
** saveModifications returns the number of records successfully modified and
** sent to the database, or DB_NoIndex on catastrophe.
*/
- (unsigned)saveModifications;
/*
** Array style access
*/
- getValue:(DBValue*)aValue forProperty:aProperty;
- getValue:(DBValue*)aValue forProperty:aProperty at:(unsigned)index;
- setValue:(DBValue*)aValue forProperty:aProperty;
- setValue:(DBValue*)aValue forProperty:aProperty at:(unsigned)index;
- getRecordKeyValue:(DBValue*)aValue;
- getRecordKeyValue:(DBValue*)aValue at:(unsigned)index;
- (unsigned)positionForRecordKey:(DBValue*)aValue;
- newRecord;
- appendRecord;
- insertRecordAt:(unsigned)index;
- deleteRecord;
- deleteRecordAt:(unsigned)index;
- moveRecordAt:(unsigned)sourceIn$ Hto:(unsigned)destinationIndex;
- swapRecordAt:(unsigned)anIndex withRecordAt:(unsigned)anotherIndex;
- (unsigned)recordLimit;
- setRecordLimit:(unsigned)aRecordCount;
@end