Example #1
0
  // THIS BLOCK CONTAINS JAVA CODE.
  private Long removeRefContactAcct(Long lIndex) {
    //
    // loop through the elements in the actual container, in order to find the one
    // at lIndex. Once it is found, then loop through the reference list and remove
    // the corresponding reference for that element.
    //
    ContactAcct refActualElement = GetContactAcct(lIndex);

    if (refActualElement == null) return lIndex; // oh well.

    // Loop through the reference list and remove the corresponding reference
    // for the specified element.
    //
    for (Integer intIndex = 0; intIndex < elementList.size(); intIndex++) {
      Object theObject = elementList.get(intIndex);

      if ((theObject == null) || !(theObject instanceof ContactAcct)) continue;

      ContactAcct tempRef = (ContactAcct) (theObject);

      if ((ContactAcct.getCPtr(tempRef) == ContactAcct.getCPtr(refActualElement))) {
        elementList.remove(tempRef);
        break;
      }
    }

    return lIndex;
  }
Example #2
0
  private Long getCPtrAddRefContactAcct(ContactAcct element) {
    // Whenever adding a reference to the list, I remove it first (if already there.)
    // That way we never store more than one reference per actual contained object.
    //
    for (Integer intIndex = 0; intIndex < elementList.size(); intIndex++) {
      Object theObject = elementList.get(intIndex);

      if ((theObject == null) || !(theObject instanceof ContactAcct)) continue;

      ContactAcct tempRef = (ContactAcct) (theObject);

      if ((ContactAcct.getCPtr(tempRef) == ContactAcct.getCPtr(element))) {
        elementList.remove(
            tempRef); // It was already there, so let's remove it before adding (below.)
        break;
      }
    }
    // Now we add it...
    //
    ContactAcct tempLocalRef = element;
    elementList.add(tempLocalRef);
    return ContactAcct.getCPtr(element);
  } // Hope I get away with overloading this for every type. Otherwise,
Example #3
0
 public boolean AddContactAcct(ContactAcct disownObject) {
   return otapiJNI.Contact_AddContactAcct(
       swigCPtr, this, ContactAcct.getCPtr(disownObject), disownObject);
 }