package rose;

import com.linar.jintegra.*;

/**
 * COM Class 'RoseInstantiateRelationCollection'. Generated 31/01/2002 11:44:15 AM
 * from 'C:|Program Files|Rational|Rose|rationalrose.tlb'<P>
 * Generated using version 1.5 of <B>J-Integra[tm]</B> -- pure Java/COM integration technology from Intrinsyc Software Inc.
 * See  <A HREF="http://www.intrinsyc.com/">http://www.intrinsyc.com/</A><P>
 *
 * Generator Options:
 * PromptForTypeLibraries = False
 * AttemptNonDual = True
 * ClashPrefix = zz_
 * LowerCaseMemberNames = True
 * IDispatchOnly = False
 * RetryOnReject = False
 * AwtForOcxs = False
 * GenerateDeprecatedConstructors = True
 * ArraysAsObjects = False
 * DontGenerateDisp = False
 * DontRenameSameMethods = False
 * IgnoreConflictingInterfaces = True
 * MakeSerializable = True
 */
public class RoseInstantiateRelationCollection implements com.linar.jintegra.RemoteObjRef, IRoseInstantiateRelationCollection {

  private static final String CLSID = "b91d8f05-ddbb-11d1-9fad-0060975306fe";

  protected String getJintegraVersion() { return "1.5"; }

  // Interface delagates
  private IRoseInstantiateRelationCollectionProxy d_IRoseInstantiateRelationCollectionProxy = null;

  /** Access this COM class's IRoseInstantiateRelationCollection interface */
  public IRoseInstantiateRelationCollection getAsIRoseInstantiateRelationCollection() { return d_IRoseInstantiateRelationCollectionProxy; }

  /** Compare this object with another */
  public boolean equals(Object o) { return getJintegraDispatch() == null ? false : getJintegraDispatch().equals(o); }


  /** the hashcode for this object */
  public int hashCode() { return getJintegraDispatch() == null ? 0 : getJintegraDispatch().hashCode(); }

   /**
   * getActiveObject. Get a reference to a running instance of this class on the current machine using native code.
   *                  <B>Uses native code (See GetActiveObject() in MS doc) and thus can only be used on MS Windows</B>
   *
   * @return    return value.  A reference to the running object.
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If there was an error attaching to the instance.
   */
  public static RoseInstantiateRelationCollection getActiveObject() throws com.linar.jintegra.AutomationException, java.io.IOException {
    return new RoseInstantiateRelationCollection(com.linar.jintegra.Dispatch.getActiveObject(CLSID));
  }

  /**
   * bindUsingMoniker. Bind to a running instance of this class using the supplied ObjRef moniker
   *
   * @return    return value.  A reference to the running object.
   * @param     moniker. The ObjRef Moniker (Created using Windows CreateObjrefMoniker() and IMoniker->GetDisplayName)
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If there was an error attaching to the instance.
   */
  public static RoseInstantiateRelationCollection bindUsingMoniker(String moniker) throws com.linar.jintegra.AutomationException, java.io.IOException {
    return new RoseInstantiateRelationCollection(com.linar.jintegra.Dispatch.bindUsingMoniker(moniker));
  }

  /** J-Integra internal method */
  public com.linar.jintegra.Dispatch getJintegraDispatch() {  return d_IRoseInstantiateRelationCollectionProxy; }

  /**
   * Constructs a RoseInstantiateRelationCollection on the local host.
   * @exception java.io.IOException if there are problems communicating via DCOM 
   * @exception java.net.UnknownHostException if the host can not be found 
   */
  public RoseInstantiateRelationCollection() throws java.io.IOException, java.net.UnknownHostException {
    this("localhost", null);
  }

  /**
   * Construct a RoseInstantiateRelationCollection on specified host.
   * @param     host  the host on which the object should be created
   * @exception java.io.IOException if there are problems communicating via DCOM 
   * @exception java.net.UnknownHostException if the host can not be found 
   */
  public RoseInstantiateRelationCollection(String host) throws java.io.IOException, java.net.UnknownHostException {
    this(host, null);
  }

  /**
   * @deprecated use AuthInfo.setDefault(...) or AuthInfo.setThreadDefault(...)
   * See Security section in the J-Integra documentation
   * @see com.linar.jintegra.AuthInfo.setDefault(..)
   */
  public RoseInstantiateRelationCollection(AuthInfo authInfo) throws java.io.IOException, java.net.UnknownHostException {
    this("localhost", authInfo);
  }

  /**
   * @deprecated use AuthInfo.setDefault(...) or AuthInfo.setThreadDefault(...)
   * See Security section in the J-Integra documentation
   * @see com.linar.jintegra.AuthInfo.setDefault(..)
   */
  public RoseInstantiateRelationCollection(String host, AuthInfo authInfo) throws java.io.IOException, java.net.UnknownHostException {
    d_IRoseInstantiateRelationCollectionProxy = new IRoseInstantiateRelationCollectionProxy(CLSID, host, authInfo);
  }

  /**
   * Construct a RoseInstantiateRelationCollection using a reference to such an object returned from a COM server
   * @param     obj an object returned from a COM server
   * @exception java.io.IOException if there are problems communicating via DCOM 
   */
  public RoseInstantiateRelationCollection(Object obj) throws java.io.IOException {
    d_IRoseInstantiateRelationCollectionProxy = new IRoseInstantiateRelationCollectionProxy(obj);
  }

  /**
   * Release a RoseInstantiateRelationCollection.
   */
  public void release() {
    com.linar.jintegra.Cleaner.release(d_IRoseInstantiateRelationCollectionProxy);
  }

  /**
   * getPropertyByName. Get the value of a property dynamically at run-time, based on its name
   *
   * @return    return value.  The value of the property.
   * @param     name. The name of the property to get.
   * @exception java.lang.NoSuchFieldException If the property does not exit.
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public Object getPropertyByName(String name) throws NoSuchFieldException, java.io.IOException, com.linar.jintegra.AutomationException {
    try {
      return d_IRoseInstantiateRelationCollectionProxy.getPropertyByName(name);
    } catch(com.linar.jintegra.AutomationException automationException) {
      automationException.fillInStackTrace();
      throw automationException;
    } catch(NoSuchFieldException noSuchFieldException) {
      noSuchFieldException.fillInStackTrace();
      throw noSuchFieldException;
    }
  }

  /**
   * getPropertyByName. Get the value of a property dynamically at run-time, based on its name and a parameter
   *
   * @return    return value.  The value of the property.
   * @param     name. The name of the property to get.
   * @param     rhs. A parameter used when getting the proxy
   * @exception java.lang.NoSuchFieldException If the property does not exit.
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public Object getPropertyByName(String name, Object rhs) throws NoSuchFieldException, java.io.IOException, com.linar.jintegra.AutomationException {
    try {
      return d_IRoseInstantiateRelationCollectionProxy.getPropertyByName(name, rhs);
    } catch(com.linar.jintegra.AutomationException automationException) {
      automationException.fillInStackTrace();
      throw automationException;
    } catch(NoSuchFieldException noSuchFieldException) {
      noSuchFieldException.fillInStackTrace();
      throw noSuchFieldException;
    }
  }

  /**
   * invokeMethodByName. Invoke a method dynamically at run-time
   *
   * @return    return value.  The value returned by the method (null if none).
   * @param     name. The name of the method to be invoked
   * @param     parameters.  One element for each parameter.  Use primitive type wrappers
   *            to pass primitive types (eg Integer to pass an int).
   * @exception java.lang.NoSuchMethodException If the method does not exit.
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public Object invokeMethodByName(String name, Object[] parameters) throws NoSuchMethodException, java.io.IOException, com.linar.jintegra.AutomationException {
    return d_IRoseInstantiateRelationCollectionProxy.invokeMethodByName(name, parameters);
  }

  /**
   * getCount. 
   *
   * @return    return value.  The return value
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public short getCount  () throws java.io.IOException, com.linar.jintegra.AutomationException {
    try {
      return d_IRoseInstantiateRelationCollectionProxy.getCount();
    } catch(com.linar.jintegra.AutomationException automationException) {
      automationException.fillInStackTrace();
      throw automationException;
    }
  }

  /**
   * setCount. 
   *
   * @param     rhs The rhs)
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public void setCount  (
              short rhs) throws java.io.IOException, com.linar.jintegra.AutomationException {
    try {
      d_IRoseInstantiateRelationCollectionProxy.setCount(rhs);
    } catch(com.linar.jintegra.AutomationException automationException) {
      automationException.fillInStackTrace();
      throw automationException;
    }
  }

  /**
   * getAt. 
   *
   * @param     index The index (in)
   * @return    return value.  An reference to a IRoseInstantiateRelation
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public IRoseInstantiateRelation getAt  (
              short index) throws java.io.IOException, com.linar.jintegra.AutomationException {
    try {
      return d_IRoseInstantiateRelationCollectionProxy.getAt(index);
    } catch(com.linar.jintegra.AutomationException automationException) {
      automationException.fillInStackTrace();
      throw automationException;
    }
  }

  /**
   * exists. 
   *
   * @param     pObject An reference to a IRoseInstantiateRelation (in)
   * @return    return value.  The return value
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public boolean exists  (
              IRoseInstantiateRelation pObject) throws java.io.IOException, com.linar.jintegra.AutomationException {
    try {
      return d_IRoseInstantiateRelationCollectionProxy.exists(pObject);
    } catch(com.linar.jintegra.AutomationException automationException) {
      automationException.fillInStackTrace();
      throw automationException;
    }
  }

  /**
   * findFirst. 
   *
   * @param     name The name (in)
   * @return    return value.  The return value
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public short findFirst  (
              String name) throws java.io.IOException, com.linar.jintegra.AutomationException {
    try {
      return d_IRoseInstantiateRelationCollectionProxy.findFirst(name);
    } catch(com.linar.jintegra.AutomationException automationException) {
      automationException.fillInStackTrace();
      throw automationException;
    }
  }

  /**
   * findNext. 
   *
   * @param     iCurID The iCurID (in)
   * @param     name The name (in)
   * @return    return value.  The return value
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public short findNext  (
              short iCurID,
              String name) throws java.io.IOException, com.linar.jintegra.AutomationException {
    try {
      return d_IRoseInstantiateRelationCollectionProxy.findNext(iCurID,name);
    } catch(com.linar.jintegra.AutomationException automationException) {
      automationException.fillInStackTrace();
      throw automationException;
    }
  }

  /**
   * indexOf. 
   *
   * @param     theObject An reference to a IRoseInstantiateRelation (in)
   * @return    return value.  The return value
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public short indexOf  (
              IRoseInstantiateRelation theObject) throws java.io.IOException, com.linar.jintegra.AutomationException {
    try {
      return d_IRoseInstantiateRelationCollectionProxy.indexOf(theObject);
    } catch(com.linar.jintegra.AutomationException automationException) {
      automationException.fillInStackTrace();
      throw automationException;
    }
  }

  /**
   * add. 
   *
   * @param     theObject An reference to a IRoseInstantiateRelation (in)
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public void add  (
              IRoseInstantiateRelation theObject) throws java.io.IOException, com.linar.jintegra.AutomationException {
    try {
      d_IRoseInstantiateRelationCollectionProxy.add(theObject);
    } catch(com.linar.jintegra.AutomationException automationException) {
      automationException.fillInStackTrace();
      throw automationException;
    }
  }

  /**
   * addCollection. 
   *
   * @param     theCollection An reference to a IRoseInstantiateRelationCollection (in)
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public void addCollection  (
              IRoseInstantiateRelationCollection theCollection) throws java.io.IOException, com.linar.jintegra.AutomationException {
    try {
      d_IRoseInstantiateRelationCollectionProxy.addCollection(theCollection);
    } catch(com.linar.jintegra.AutomationException automationException) {
      automationException.fillInStackTrace();
      throw automationException;
    }
  }

  /**
   * remove. 
   *
   * @param     theObject An reference to a IRoseInstantiateRelation (in)
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public void remove  (
              IRoseInstantiateRelation theObject) throws java.io.IOException, com.linar.jintegra.AutomationException {
    try {
      d_IRoseInstantiateRelationCollectionProxy.remove(theObject);
    } catch(com.linar.jintegra.AutomationException automationException) {
      automationException.fillInStackTrace();
      throw automationException;
    }
  }

  /**
   * removeAll. 
   *
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public void removeAll  () throws java.io.IOException, com.linar.jintegra.AutomationException {
    try {
      d_IRoseInstantiateRelationCollectionProxy.removeAll();
    } catch(com.linar.jintegra.AutomationException automationException) {
      automationException.fillInStackTrace();
      throw automationException;
    }
  }

  /**
   * getFirst. 
   *
   * @param     name The name (in)
   * @return    return value.  An reference to a IRoseInstantiateRelationCollection
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public IRoseInstantiateRelationCollection getFirst  (
              String name) throws java.io.IOException, com.linar.jintegra.AutomationException {
    try {
      return d_IRoseInstantiateRelationCollectionProxy.getFirst(name);
    } catch(com.linar.jintegra.AutomationException automationException) {
      automationException.fillInStackTrace();
      throw automationException;
    }
  }

  /**
   * getWithUniqueID. 
   *
   * @param     uniqueID The uniqueID (in)
   * @return    return value.  An reference to a IRoseInstantiateRelation
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public IRoseInstantiateRelation getWithUniqueID  (
              String uniqueID) throws java.io.IOException, com.linar.jintegra.AutomationException {
    try {
      return d_IRoseInstantiateRelationCollectionProxy.getWithUniqueID(uniqueID);
    } catch(com.linar.jintegra.AutomationException automationException) {
      automationException.fillInStackTrace();
      throw automationException;
    }
  }

}
