home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / dbkit / DBFetchGroup.h < prev    next >
Text File  |  1992-07-09  |  2KB  |  97 lines

  1. /*
  2. **      DBFetchGroup.h
  3. **      Database Kit, Release 3.0
  4. **      Copyright (c) 1992, NeXT Computer, Inc.  All rights reserved. 
  5. */
  6.  
  7.  
  8. #import <objc/Object.h>
  9. #import <dbkit/enums.h>
  10.  
  11.  
  12. @interface DBFetchGroup : Object
  13. {
  14.     char *_name;
  15.     id _module;
  16.     id _entity;
  17.     id _recordList;
  18.     id _expressionList;
  19.     id _associationList;
  20.     int _currentRecord;
  21.     id _selectionOwner;            // for handling multiple-selection
  22.     struct {
  23.     BOOL _autoSelect : 1;
  24.     int _reserved : 31;
  25.     } _fgflags;
  26.     id _delegate;
  27.     id _reserved;
  28. }
  29.  
  30.  
  31. - initEntity:anEntity;
  32.  
  33. - setName:(const char *)newName;
  34. - (const char *)name;
  35.  
  36. - setDelegate:anObject;
  37. - delegate;
  38.  
  39. - module;
  40. - entity;
  41. - recordList;
  42.  
  43. /* methods to control curre$    Uecord cursor */
  44. - setCurrentRecord:(unsigned int)newIndex;
  45. - clearCurrentRecord;
  46. - (unsigned int)currentRecord;
  47. - (unsigned int)recordCount;
  48. - (unsigned int)selectedRowAfter:(unsigned int)previousRow;
  49. - redisplayEverything;
  50.  
  51. /* methods for manipulating contents */
  52. - deleteCurrentSelection;
  53. - (BOOL)insertNewRecordAt:(unsigned int)index;
  54. - fetchContentsOf:aSource usingQualifier:aQualifier;
  55.  
  56. /* methods for dealing with changes */
  57. - (BOOL)hasUnsavedChanges;
  58. - (BOOL)validateCurrentRecord;
  59. - saveChanges;
  60. - discardChanges;
  61.  
  62. /* methods for configuring and using associations */
  63. - addExpression:newExpression;
  64. - addAssociation:newAssociation;
  65. - removeAssociation:association;
  66. - makeAssociationFrom:expr to:destination;
  67. - takeValueFromAssociation:association;
  68.  
  69. /* other configurations */
  70. - setAutoSelect:(BOOL)yn;
  71. - (BOOL)doesAutoSelect;
  72.  
  73. @end
  74.  
  75.  
  76. /* methods sent to the DBFetchGroup's delegate */
  77. @interface Object(DBFetchGroupDelegate)
  78. - fetchGroupWillFetch:fetchGroup;
  79. - fetchGroupDidFetch:fetchGroup;
  80. - fetchGroupWillChange:fetchGroup;
  81. - fetchGroup:fetchGroup didInsertRecordAt:(int)index;
  82. - fetchGroup:fetchGroup willDeleteRecordAt:(int)index;
  83. - (BOOL)fetchGroup:fetchGroup willValidateRecordAt:(int)index;
  84. - (BOOL)fetchGroupWillSave:fetchGroup;
  85. - fetchGroupDidSave:fetchGroup;
  86. - (DBFailureResponse)fetchGroup:fetchGroup
  87.     willFailForReason:(DBFailureCode)code;
  88. @end
  89.  
  90.  
  91.  
  92. /* This is the default ceiling set on the number of records that will be */
  93. /* returned before the delegate is notified or an alert is put up. An */
  94. /* alternate default can be set by calling setRecordLimit: on DBRecordList */
  95. #define DB_DEFAULT_RECORD_LIMIT        1000
  96.  
  97.