// Stub class generated by rmic, do not edit.
// Contents subject to change without notice.

package relational;

import rmi.InvokeHack;

public final class InternalDatabase_Stub
    extends java.rmi.server.RemoteStub
    implements relational.Database, java.rmi.Remote
{
    private static final java.rmi.server.Operation[] operations = {
	new java.rmi.server.Operation("void createIndex(relational.FieldDescriptor)"),
	new java.rmi.server.Operation("relational.ResultSet evaluateSelect(relational.Select)"),
	new java.rmi.server.Operation("void insert(relational.Relational)"),
	new java.rmi.server.Operation("void insert(relational.Relational[])"),
	new java.rmi.server.Operation("void noop()"),
	new java.rmi.server.Operation("void shutdown()"),
	new java.rmi.server.Operation("void update(relational.Relational)"),
	new java.rmi.server.Operation("void update(relational.Relational[])")
    };
    
    private static final long interfaceHash = 1433761301597707804L;
    
    private static final long serialVersionUID = 2;
    
    private static boolean useNewInvoke;
    private static java.lang.reflect.Method $method_createIndex_0;
    private static java.lang.reflect.Method $method_evaluateSelect_1;
    private static java.lang.reflect.Method $method_insert_2;
    private static java.lang.reflect.Method $method_insert_3;
    private static java.lang.reflect.Method $method_noop_4;
    private static java.lang.reflect.Method $method_shutdown_5;
    private static java.lang.reflect.Method $method_update_6;
    private static java.lang.reflect.Method $method_update_7;
    
    static {
	try {
	    java.rmi.server.RemoteRef.class.getMethod("invoke",
		new java.lang.Class[] {
		    java.rmi.Remote.class,
		    java.lang.reflect.Method.class,
		    java.lang.Object[].class,
		    long.class
		});
	    useNewInvoke = true;
	    $method_createIndex_0 = relational.Database.class.getMethod("createIndex", new java.lang.Class[] {relational.FieldDescriptor.class});
	    $method_evaluateSelect_1 = relational.Database.class.getMethod("evaluateSelect", new java.lang.Class[] {relational.Select.class});
	    $method_insert_2 = relational.Database.class.getMethod("insert", new java.lang.Class[] {relational.Relational.class});
	    $method_insert_3 = relational.Database.class.getMethod("insert", new java.lang.Class[] {relational.Relational[].class});
	    $method_noop_4 = relational.Database.class.getMethod("noop", new java.lang.Class[] {});
	    $method_shutdown_5 = relational.Database.class.getMethod("shutdown", new java.lang.Class[] {});
	    $method_update_6 = relational.Database.class.getMethod("update", new java.lang.Class[] {relational.Relational.class});
	    $method_update_7 = relational.Database.class.getMethod("update", new java.lang.Class[] {relational.Relational[].class});
	} catch (java.lang.NoSuchMethodException e) {
	    useNewInvoke = false;
	}
    }
    
    // constructors
    public InternalDatabase_Stub() {
	super();
    }
    public InternalDatabase_Stub(java.rmi.server.RemoteRef ref) {
	super(ref);
    }
    
    // methods from remote interfaces
    
    // implementation of createIndex(FieldDescriptor)
    public void createIndex(relational.FieldDescriptor $param_FieldDescriptor_1)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		InvokeHack.invoke(ref, this, $method_createIndex_0, new java.lang.Object[] {$param_FieldDescriptor_1}, 548209614843614530L);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
		try {
		    java.io.ObjectOutput out = call.getOutputStream();
		    out.writeObject($param_FieldDescriptor_1);
		} catch (java.io.IOException e) {
		    throw new java.rmi.MarshalException("error marshalling arguments", e);
		}
		ref.invoke(call);
		ref.done(call);
	    }
	} catch (java.lang.RuntimeException e) {
	    throw e;
	} catch (java.rmi.RemoteException e) {
	    throw e;
	} catch (java.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
    // implementation of evaluateSelect(Select)
    public relational.ResultSet evaluateSelect(relational.Select $param_Select_1)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		Object $result = InvokeHack.invoke(ref, this, $method_evaluateSelect_1, new java.lang.Object[] {$param_Select_1}, -2783220231305417061L);
		return ((relational.ResultSet) $result);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
		try {
		    java.io.ObjectOutput out = call.getOutputStream();
		    out.writeObject($param_Select_1);
		} catch (java.io.IOException e) {
		    throw new java.rmi.MarshalException("error marshalling arguments", e);
		}
		ref.invoke(call);
		relational.ResultSet $result;
		try {
		    java.io.ObjectInput in = call.getInputStream();
		    $result = (relational.ResultSet) in.readObject();
		} catch (java.io.IOException e) {
		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
		} catch (java.lang.ClassNotFoundException e) {
		    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
		} finally {
		    ref.done(call);
		}
		return $result;
	    }
	} catch (java.lang.RuntimeException e) {
	    throw e;
	} catch (java.rmi.RemoteException e) {
	    throw e;
	} catch (java.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
    // implementation of insert(Relational)
    public void insert(relational.Relational $param_Relational_1)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		InvokeHack.invoke(ref, this, $method_insert_2, new java.lang.Object[] {$param_Relational_1}, -5825883743388956471L);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
		try {
		    java.io.ObjectOutput out = call.getOutputStream();
		    out.writeObject($param_Relational_1);
		} catch (java.io.IOException e) {
		    throw new java.rmi.MarshalException("error marshalling arguments", e);
		}
		ref.invoke(call);
		ref.done(call);
	    }
	} catch (java.lang.RuntimeException e) {
	    throw e;
	} catch (java.rmi.RemoteException e) {
	    throw e;
	} catch (java.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
    // implementation of insert(Relational[])
    public void insert(relational.Relational[] $param_arrayOf_Relational_1)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		InvokeHack.invoke(ref, this, $method_insert_3, new java.lang.Object[] {$param_arrayOf_Relational_1}, 8403990407738094962L);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 3, interfaceHash);
		try {
		    java.io.ObjectOutput out = call.getOutputStream();
		    out.writeObject($param_arrayOf_Relational_1);
		} catch (java.io.IOException e) {
		    throw new java.rmi.MarshalException("error marshalling arguments", e);
		}
		ref.invoke(call);
		ref.done(call);
	    }
	} catch (java.lang.RuntimeException e) {
	    throw e;
	} catch (java.rmi.RemoteException e) {
	    throw e;
	} catch (java.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
    // implementation of noop()
    public void noop()
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		InvokeHack.invoke(ref, this, $method_noop_4, null, 6815962424935952648L);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 4, interfaceHash);
		ref.invoke(call);
		ref.done(call);
	    }
	} catch (java.lang.RuntimeException e) {
	    throw e;
	} catch (java.rmi.RemoteException e) {
	    throw e;
	} catch (java.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
    // implementation of shutdown()
    public void shutdown()
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		InvokeHack.invoke(ref, this, $method_shutdown_5, null, -7207851917985848402L);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 5, interfaceHash);
		ref.invoke(call);
		ref.done(call);
	    }
	} catch (java.lang.RuntimeException e) {
	    throw e;
	} catch (java.rmi.RemoteException e) {
	    throw e;
	} catch (java.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
    // implementation of update(Relational)
    public void update(relational.Relational $param_Relational_1)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		InvokeHack.invoke(ref, this, $method_update_6, new java.lang.Object[] {$param_Relational_1}, -3863351175113629196L);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 6, interfaceHash);
		try {
		    java.io.ObjectOutput out = call.getOutputStream();
		    out.writeObject($param_Relational_1);
		} catch (java.io.IOException e) {
		    throw new java.rmi.MarshalException("error marshalling arguments", e);
		}
		ref.invoke(call);
		ref.done(call);
	    }
	} catch (java.lang.RuntimeException e) {
	    throw e;
	} catch (java.rmi.RemoteException e) {
	    throw e;
	} catch (java.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
    
    // implementation of update(Relational[])
    public void update(relational.Relational[] $param_arrayOf_Relational_1)
	throws java.rmi.RemoteException
    {
	try {
	    if (useNewInvoke) {
		InvokeHack.invoke(ref, this, $method_update_7, new java.lang.Object[] {$param_arrayOf_Relational_1}, -5073909635146001301L);
	    } else {
		java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 7, interfaceHash);
		try {
		    java.io.ObjectOutput out = call.getOutputStream();
		    out.writeObject($param_arrayOf_Relational_1);
		} catch (java.io.IOException e) {
		    throw new java.rmi.MarshalException("error marshalling arguments", e);
		}
		ref.invoke(call);
		ref.done(call);
	    }
	} catch (java.lang.RuntimeException e) {
	    throw e;
	} catch (java.rmi.RemoteException e) {
	    throw e;
	} catch (java.lang.Exception e) {
	    throw new java.rmi.UnexpectedException("undeclared checked exception", e);
	}
    }
}
