home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Headers / dbkit / DBFetchGroup.h < prev    next >
Text File  |  1992-12-18  |  2KB  |  102 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. @class List;
  13.  
  14. @interface DBFetchGroup : Object
  15. {
  16.     char *_name;
  17.     id _module;
  18.     id _entity;
  19.     id _recordList;
  20.     id _expressionList;
  21.     id _associationList;
  22.     int _currentRecord;
  23.     id _selectionOwner;            // for handling multiple-selection
  24.     struct {
  25.     BOOL _autoSelect : 1;
  26.     int _reserved : 31;
  27.     } _fgflags;
  28.     id _delegate;
  29.     id _reserved;
  30. }
  31.  
  32.  
  33. - initEntity:anEntity;
  34.  
  35. - setName:(const char *)newName;
  36. - (const char *)name;
  37.  
  38. - setDelegate:anObject;
  39. - delegate;
  40.  
  41. - module;
  42. - entity;
  43. - recordList;
  44.  
  45. /* methods to control current record cursor */
  46. - setCurrentRecord:(unsigned int)newIndex;
  47. - clearCurrentRecord;
  48. - (unsigned int)currentRecord;
  49. - (unsigned int)recordCount;
  50. - (unsigned int)selectedRowAfter:(unsigned int)previousRow;
  51. - redisplayEverything;
  52.  
  53. /* methods for manipulating contents */
  54. - deleteCurrentSelection;
  55. - (BOOL)insertNewRecordAt:(unsigned int)index;
  56. - fetchContentsOf:aSource usingQualifier:aQualifier;
  57.  
  58. /* methods for dealing with changes */
  59. - (BOOL)hasUnsavedChanges;
  60. - (BOOL)validateCurrentRecord;
  61. - saveChanges;
  62. - discardChanges;
  63.  
  64. /* methods for configuring and using associations */
  65. - addExpression:newExpression;
  66. - removeExpression:expression;
  67. - (List*)getExpressions:(List*)aList;
  68. - addAssociation:newAssociation;
  69. - removeAssociation:association;
  70. - (List*)getAssociations:(List*)aList;
  71. - makeAssociationFrom:expr to:destination;
  72. - takeValueFromAssociation:association;
  73.  
  74. /* other configurations */
  75. - setAutoSelect:(BOOL)yn;
  76. - (BOOL)doesAutoSelect;
  77.  
  78. @end
  79.  
  80.  
  81. /* methods sent to the DBFetchGroup's delegate */
  82. @interface Object(DBFetchGroupDelegate)
  83. - fetchGroupWillFetch:fetchGroup;
  84. - fetchGroupDidFetch:fetchGroup;
  85. - fetchGroupWillChange:fetchGroup;
  86. - fetchGroup:fetchGroup didInsertRecordAt:(int)index;
  87. - fetchGroup:fetchGroup willDeleteRecordAt:(int)index;
  88. - (BOOL)fetchGroup:fetchGroup willValidateRecordAt:(int)index;
  89. - (BOOL)fetchGroupWillSave:fetchGroup;
  90. - fetchGroupDidSave:fetchGroup;
  91. - (DBFailureResponse)fetchGroup:fetchGroup
  92.     willFailForReason:(DBFailureCode)code;
  93. @end
  94.  
  95.  
  96.  
  97. /* This is the default ceiling set on the number of records that will be */
  98. /* returned before the delegate is notified or an alert is put up. An */
  99. /* alternate default can be set by calling setRecordLimit: on DBRecordList */
  100. #define DB_DEFAULT_RECORD_LIMIT        1000
  101.  
  102.