【Java开源代码栏目提醒】:网学会员鉴于大家对Java开源代码十分关注,论文会员在此为大家搜集整理了“CartPOA.java”一文,供大家参考学习
package com.borland.samples.ejb;
public abstract class CartPOA extends org.omg.PortableServer.Servant implements
org.omg.CORBA.portable.InvokeHandler, com.borland.samples.ejb.CartOperations {
public com.borland.samples.ejb.Cart _this () {
return com.borland.samples.ejb.CartHelper.narrow(super._this_object());
}
public com.borland.samples.ejb.Cart _this (org.omg.CORBA.ORB orb) {
return com.borland.samples.ejb.CartHelper.narrow(super._this_object(orb));
}
public java.lang.String[] _all_interfaces (final org.omg.PortableServer.POA poa, final byte[] objectId) {
return __ids;
}
private static java.lang.String[] __ids = {
"RMI:com.borland.samples.ejb.Cart:0000000000000000",
"RMI:javax.ejb.EJBObject:0000000000000000"
};
private static java.util.Dictionary _methods = new java.util.Hashtable();
static {
_methods.put("_get_userId", new int[] { 0, 0 });
_methods.put("addToShoppingCart", new int[] { 0, 1 });
_methods.put("addUser", new int[] { 0, 2 });
_methods.put("purchase", new int[] { 0, 3 });
_methods.put("resolveAllData", new int[] { 0, 4 });
_methods.put("provideInventory", new int[] { 0, 5 });
_methods.put("logOut", new int[] { 0, 6 });
_methods.put("logIn", new int[] { 0, 7 });
_methods.put("provideAllData", new int[] { 0, 8 });
_methods.put("resolveInventory", new int[] { 0, 9 });
_methods.put("removeFromShoppingCart", new int[] { 0, 10 });
_methods.put("provideShoppingCart", new int[] { 0, 11 });
_methods.put("resolveShoppingCart", new int[] { 0, 12 });
_methods.put("isLoggedIn", new int[] { 0, 13 });
_methods.put("_get_handle", new int[] { 1, 0 });
_methods.put("_get_EJBHome", new int[] { 1, 1 });
_methods.put("_get_primaryKey", new int[] { 1, 2 });
_methods.put("remove", new int[] { 1, 3 });
_methods.put("isIdentical", new int[] { 1, 4 });
}
public org.omg.CORBA.portable.OutputStream _invoke (java.lang.String opName,
org.omg.CORBA.portable.InputStream _input,
org.omg.CORBA.portable.ResponseHandler handler) {
int[] method = (int[]) _methods.get(opName);
if (method == null) {
throw new org.omg.CORBA.BAD_OPERATION();
}
switch (method[0]) {
case 0: {
return com.borland.samples.ejb.CartPOA._invoke(this, method[1], _input, handler);
}
case 1: {
return javax.ejb.EJBObjectPOA._invoke(this, method[1], _input, handler);
}
}
throw new org.omg.CORBA.BAD_OPERATION();
}
public static org.omg.CORBA.portable.OutputStream _invoke (com.borland.samples.ejb.CartOperations _self,
int _method_id,
org.omg.CORBA.portable.InputStream _input,
org.omg.CORBA.portable.ResponseHandler _handler) {
org.omg.CORBA.portable.OutputStream _output = null;
try {
switch (_method_id) {
case 0: {
java.lang.Integer _result = _self.getUserId();
_output = _handler.createReply();
((org.omg.CORBA_2_3.portable.OutputStream)_output).write_value((java.io.Serializable)_result);
return _output;
}
case 1: {
java.lang.Integer arg0;
arg0 = (java.lang.Integer)((org.omg.CORBA_2_3.portable.InputStream)_input).read_value(java.lang.Integer.class);
_self.addToShoppingCart(arg0);
_output = _handler.createReply();
return _output;
}
case 2: {
com.borland.dx.dataset.DataSetData[] arg0;
arg0 = (com.borland.dx.dataset.DataSetData[]) ((org.omg.CORBA_2_3.portable.InputStream)_input).read_value(com.borland.dx.dataset.DataSetData[].class);
java.lang.String arg1;
arg1 = org.omg.CORBA.WStringValueHelper.read(_input);
boolean _result = _self.addUser(arg0, arg1);
_output = _handler.createReply();
_output.write_boolean((boolean)_result);
return _output;
}
case 3: {
_self.purchase();
_output = _handler.createReply();
return _output;
}
case 4: {
com.borland.dx.dataset.DataSetData[] arg0;
arg0 = (com.borland.dx.dataset.DataSetData[]) ((org.omg.CORBA_2_3.portable.InputStream)_input).read_value(com.borland.dx.dataset.DataSetData[].class);
com.borland.dx.dataset.DataSetData[] _result = _self.resolveAllData(arg0);
_output = _handler.createReply();
((org.omg.CORBA_2_3.portable.OutputStream)_output).write_value((java.io.Serializable)_result);
return _output;
}
case 5: {
com.borland.dx.ejb.RowData[] arg0;
arg0 = (com.borland.dx.ejb.RowData[]) ((org.omg.CORBA_2_3.portable.InputStream)_input).read_value(com.borland.dx.ejb.RowD