home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / visbuild / oasearch / contrctr.hpv < prev    next >
Encoding:
Text File  |  1996-02-20  |  4.7 KB  |  112 lines

  1. /******************************************************************************
  2. * .FILE:        contrctr.hpv                                                  *
  3. *                                                                             *
  4. * .DESCRIPTION: Implementation of additional member functions for the class   *
  5. *               OAContractor (header file)                                    *
  6. *                                                                             *
  7. * .CLASSES:                                                                   *
  8. *                                                                             *
  9. * .COPYRIGHT:                                                                 *
  10. *    Licensed Material - Program-Property of IBM                              *
  11. *    (C) Copyright IBM Corp. 1992, 1995, 1996 - All Rights Reserved           *
  12. *                                                                             *
  13. * .DISCLAIMER:                                                                *
  14. *   The following [enclosed] code is sample code created by IBM               *
  15. *   Corporation.  This sample code is not part of any standard IBM product    *
  16. *   and is provided to you solely for the purpose of assisting you in the     *
  17. *   development of your applications.  The code is provided 'AS IS',          *
  18. *   without warranty of any kind.  IBM shall not be liable for any damages    *
  19. *   arising out of your use of the sample code, even if they have been        *
  20. *   advised of the possibility of such damages.                               *
  21. *                                                                             *
  22. * .NOTE: WE RECOMMEND USING A FIXED SPACE FONT TO LOOK AT THE SOURCE          *
  23. *                                                                             *
  24. ******************************************************************************/
  25. public:
  26.   IString contractorID() const;
  27.   OAContractor & setContractorID();
  28.   IString lastName() const;
  29.   OAContractor & setLastName(const IString & aLastName);
  30.   IString firstName() const;
  31.   OAContractor & setFirstName(const IString & aFirstName);
  32.   IString middleInitial() const;
  33.   OAContractor & setMiddleInitial(const IString & aMiddleInitial);
  34.   IString homeStreet() const;
  35.   OAContractor & setHomeStreet(const IString & aHomeStreet);
  36.   IString homeCity() const;
  37.   OAContractor & setHomeCity(const IString & aHomeCity);
  38.   IString homeState() const;
  39.   OAContractor & setHomeState(const IString & aHomeState);
  40.   IString homeZip() const;
  41.   OAContractor & setHomeZip(const IString & aHomeZip);
  42.   IString phoneNumber() const;
  43.   OAContractor & setPhoneNumber(const IString & aPhoneNumber);
  44.   IString startDate() const;
  45.   OAContractor & setStartDate(const IString & aStartDate);
  46.   IString endDate() const;
  47.   OAContractor & setEndDate(const IString & aEndDate);
  48.   Boolean isActiveStatus() const;
  49.   OAContractor & enableActiveStatus(const Boolean enable = true);
  50. // Overloaded string enabler
  51.   OAContractor & enableActiveStatus(const IString & status);
  52.   IString currentContract() const;
  53.   OAContractor & setCurrentContract(const IString & aCurrentContract);
  54.   Boolean isIDvalid() const;
  55.   OAContractor & enableIDvalid(const Boolean enable = false);
  56.  
  57. // Actions
  58.  
  59.   OAContractor & getContractor();
  60.   OAContractor & putContractor();
  61.   OAContractor & refreshID();
  62.   OAContractor & parseName(const IString & aName);
  63.  
  64. // Added copy constructor
  65.  
  66.   OAContractor(const OAContractor & aContractor);
  67.  
  68. // Notification IDs
  69.  
  70.   static INotificationId contractorIDId;
  71.   static INotificationId lastNameId;
  72.   static INotificationId firstNameId;
  73.   static INotificationId middleInitialId;
  74.   static INotificationId homeStreetId;
  75.   static INotificationId homeCityId;
  76.   static INotificationId homeStateId;
  77.   static INotificationId homeZipId;
  78.   static INotificationId phoneNumberId;
  79.   static INotificationId startDateId;
  80.   static INotificationId endDateId;
  81.   static INotificationId activeStatusId;
  82.   static INotificationId currentContractId;
  83.   static INotificationId IDvalidId;
  84.  
  85. // Added after OS2 GA
  86.   static INotificationId qryFoundId;
  87.  
  88. // Added for Windows implementation of IProfile
  89.   OAContractor & primeData(IProfile & aDatabase);
  90.  
  91. private:
  92.   unsigned long iStartingResourceId;
  93.   IString iContractorID;
  94.   IString iLastName;
  95.   IString iFirstName;
  96.   IString iMiddleInitial;
  97.   IString iHomeStreet;
  98.   IString iHomeCity;
  99.   IString iHomeState;
  100.   IString iHomeZip;
  101.   IString iPhoneNumber;
  102.   IString iStartDate;
  103.   IString iEndDate;
  104.   Boolean iActiveStatus;
  105.   IString iCurrentContract;
  106.   Boolean iIDvalid;
  107.  
  108. // Added private member function to clear out old attribute values
  109. // Called in parseName()
  110.  
  111.   void clear();
  112.