package rose;

import com.linar.jintegra.*;
/**
 * Proxy for COM Interface 'IRoseRealizeRelationCollection'. Generated 30/01/2002 3:46:12 PM
 * from 'C:\Program Files\Rational\Rose\rationalrose.tlb'<P>
 * Generated using version 1.3.1  of <B>J-Integra[tm]</B> -- pure Java/COM integration technology from Linar Ltd.
 * See  <A HREF="http://www.linar.com/">http://www.linar.com/</A><P>
 */
public class IRoseRealizeRelationCollectionProxy extends com.linar.jintegra.Dispatch implements IRoseRealizeRelationCollection {

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

  public static final Class targetClass = rose.IRoseRealizeRelationCollection.class;

  public IRoseRealizeRelationCollectionProxy(String CLSID, String host, AuthInfo authInfo) throws java.net.UnknownHostException, java.io.IOException{
    super(CLSID, IRoseRealizeRelationCollection.IID, host, authInfo);
  }

  /** For internal use only */
  public IRoseRealizeRelationCollectionProxy() {}

  public IRoseRealizeRelationCollectionProxy(Object obj) throws java.io.IOException {
    super(obj, IRoseRealizeRelationCollection.IID);
  }

  protected IRoseRealizeRelationCollectionProxy(Object obj, String iid) throws java.io.IOException {
    super(obj, iid);
  }

  protected IRoseRealizeRelationCollectionProxy(String CLSID, String iid, String host, AuthInfo authInfo) throws java.io.IOException {
    super(CLSID, iid, host, authInfo);
  }

  public void addListener(String iidStr, Object theListener, Object theSource) throws java.io.IOException {
    super.addListener(iidStr, theListener, theSource);
  }

  public void removeListener(String iidStr, Object theListener) throws java.io.IOException {
    super.removeListener(iidStr, theListener);
  }

  /**
   * 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 {
    com.linar.jintegra.Variant parameters[] = {};
    return super.invoke(name, super.getDispatchIdOfName(name), 2, parameters).getVARIANT();
  }

  /**
   * getPropertyByName. Get the value of a property dynamically at run-time, based on its name and a parameter value
   *
   * @return    return value.  The value of the property.
   * @param     name. The name of the property to get.
   * @param     rhs. Parameter used when getting the property.
   * @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 {
    com.linar.jintegra.Variant parameters[] = {rhs == null ? new Variant("rhs", 10, 0x80020004L) : new Variant("rhs", 12, rhs)};
    return super.invoke(name, super.getDispatchIdOfName(name), 2, parameters).getVARIANT();
  }

  /**
   * 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 {
    com.linar.jintegra.Variant variantParameters[] = new com.linar.jintegra.Variant[parameters.length];
    for(int i = 0; i < parameters.length; i++) {
      variantParameters[i] = parameters[i] == null ? new Variant("p" + i, 10, 0x80020004L) :
	                                                   new Variant("p" + i, 12, parameters[i]);
    }
    try {
      return super.invoke(name, super.getDispatchIdOfName(name), 1, variantParameters).getVARIANT();
    } catch(NoSuchFieldException nsfe) {
      throw new NoSuchMethodException("There is no method called " + name);
    }
  }

  /**
   * 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{
    com.linar.jintegra.Variant[] parameters = {};
    return invoke("getCount", 202, 2, parameters).getI2();
  }

  /**
   * 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{
    com.linar.jintegra.Variant[] parameters = {new Variant("rhs", 2, rhs),};
    invoke("setCount", 202, 4, parameters);
    return;
  }

  /**
   * getAt. 
   *
   * @param     Index The Index (in)
   * @return    return value.  An reference to a IRoseRealizeRelation
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public IRoseRealizeRelation getAt  (
              short Index) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("Index", 2, Index),};
    Object res = invoke("getAt", 203, 1, parameters).getDISPATCH();
    return res == null ? null : new IRoseRealizeRelationProxy(res);
  }

  /**
   * exists. 
   *
   * @param     pObject An reference to a IRoseRealizeRelation (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  (
              rose.IRoseRealizeRelation pObject) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("pObject", 9, pObject),};
    return invoke("exists", 204, 1, parameters).getBOOL();
  }

  /**
   * 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{
    com.linar.jintegra.Variant[] parameters = {new Variant("Name", 8, Name),};
    return invoke("findFirst", 205, 1, parameters).getI2();
  }

  /**
   * 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{
    com.linar.jintegra.Variant[] parameters = {new Variant("iCurID", 2, iCurID),
                                         new Variant("Name", 8, Name),};
    return invoke("findNext", 206, 1, parameters).getI2();
  }

  /**
   * indexOf. 
   *
   * @param     theObject An reference to a IRoseRealizeRelation (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  (
              rose.IRoseRealizeRelation theObject) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("theObject", 9, theObject),};
    return invoke("indexOf", 207, 1, parameters).getI2();
  }

  /**
   * add. 
   *
   * @param     theObject An reference to a IRoseRealizeRelation (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  (
              rose.IRoseRealizeRelation theObject) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("theObject", 9, theObject),};
    invoke("add", 208, 1, parameters);
    return;
  }

  /**
   * addCollection. 
   *
   * @param     theCollection An reference to a IRoseRealizeRelationCollection (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  (
              rose.IRoseRealizeRelationCollection theCollection) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("theCollection", 9, theCollection),};
    invoke("addCollection", 209, 1, parameters);
    return;
  }

  /**
   * remove. 
   *
   * @param     theObject An reference to a IRoseRealizeRelation (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  (
              rose.IRoseRealizeRelation theObject) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("theObject", 9, theObject),};
    invoke("remove", 210, 1, parameters);
    return;
  }

  /**
   * 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{
    com.linar.jintegra.Variant[] parameters = {};
    invoke("removeAll", 211, 1, parameters);
    return;
  }

  /**
   * getFirst. 
   *
   * @param     Name The Name (in)
   * @return    return value.  An reference to a IRoseRealizeRelation
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public IRoseRealizeRelation getFirst  (
              String Name) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("Name", 8, Name),};
    Object res = invoke("getFirst", 212, 1, parameters).getDISPATCH();
    return res == null ? null : new IRoseRealizeRelationProxy(res);
  }

  /**
   * getWithUniqueID. 
   *
   * @param     UniqueID The UniqueID (in)
   * @return    return value.  An reference to a IRoseRealizeRelation
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public IRoseRealizeRelation getWithUniqueID  (
              String UniqueID) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("UniqueID", 8, UniqueID),};
    Object res = invoke("getWithUniqueID", 213, 1, parameters).getDISPATCH();
    return res == null ? null : new IRoseRealizeRelationProxy(res);
  }

  /** Dummy reference from interface to proxy to make sure proxy gets compiled */
  static final int xxDummy = 0;
}
