1 26 27 package org.objectweb.openccm.ir3; 28 29 37 38 public class HomeDef_impl 39 extends ExtInterfaceDef_impl 40 implements org.omg.CORBA.ComponentIR.HomeDefOperations 41 { 42 48 49 protected InterfaceDef_ref[] supported_interfaces_; 50 51 52 protected HomeDef_ref base_home_; 53 54 55 protected ComponentDef_ref managed_component_; 56 57 58 protected ValueDef_ref primary_key_; 59 60 61 protected org.omg.CORBA.ExtInterfaceDef implicit_itf_; 62 63 64 protected org.omg.CORBA.ExtInterfaceDef explicit_itf_; 65 66 67 protected org.omg.CORBA.ExtLocalInterfaceDef ccm_implicit_executor_itf_; 68 69 70 protected org.omg.CORBA.ExtLocalInterfaceDef ccm_explicit_executor_itf_; 71 72 73 protected org.omg.CORBA.ExtLocalInterfaceDef ccm_executor_itf_; 74 75 81 82 public 83 HomeDef_impl(IFR ifr, 84 Container_impl container) 85 { 86 super(ifr, container, false); 88 89 setServant(new org.omg.CORBA.ComponentIR.HomeDefPOATie(this)); 91 92 supported_interfaces_ = null; 94 base_home_ = new HomeDef_ref(this); 95 managed_component_ = new ComponentDef_ref(this); 96 primary_key_ = new ValueDef_ref(this); 97 implicit_itf_ = null; 98 explicit_itf_ = null; 99 ccm_implicit_executor_itf_ = null; 100 ccm_explicit_executor_itf_ = null; 101 ccm_executor_itf_ = null; 102 } 103 104 110 113 protected void 114 addContained(Contained_impl contained) 115 { 116 if (!checkDefinitionKind(contained.def_kind())) 118 throw exceptionInvalidContainer(); 119 120 if (!mapping_started_) 121 contained_elements_.add(contained); 122 123 if ((contained.def_kind().value()==org.omg.CORBA.DefinitionKind._dk_Finder) || 124 (contained.def_kind().value()==org.omg.CORBA.DefinitionKind._dk_Factory)) 125 contained_with_mappings_.add(contained); 126 } 127 128 131 protected InterfaceDef_ref[] 132 getBaseInterfaces() 133 { 134 if (!getIFR().getRepository().isIDL2Repository()) 135 return new InterfaceDef_ref[0]; 136 else 137 return base_interfaces_; 138 } 139 140 146 149 public org.omg.CORBA.ComponentIR.HomeDef 150 asHomeDef() 151 { 152 return org.omg.CORBA.ComponentIR.HomeDefHelper.narrow(asObject()); 153 } 154 155 158 public org.omg.CORBA.ValueDescription 159 getPrimaryKeyDescription() 160 { 161 178 org.omg.CORBA.ValueDescription result = null; 180 181 if(primary_key_.getImpl() != null) 183 { 184 result = primary_key_.getImpl().getValueDescription(); 186 } 187 else 188 { 189 result = new org.omg.CORBA.ValueDescription (); 192 result.name = ""; 193 result.id = ""; 194 result.is_abstract = false; 195 result.is_custom = false; 196 result.defined_in = ""; 197 result.version = ""; 198 result.supported_interfaces = new String [0]; 199 result.abstract_base_values = new String [0]; 200 result.is_truncatable = false; 201 result.base_value = ""; 202 } 203 204 return result; 206 207 } 211 212 216 public org.omg.CORBA.ExtAttributeDescription[] 217 getLocalExtAttrDescriptionSeq() 218 { 219 java.util.List selection = new java.util.ArrayList (); 220 221 selectContained(selection, org.omg.CORBA.DefinitionKind.dk_Attribute, true); 222 223 org.omg.CORBA.ExtAttributeDescription[] result = 224 new org.omg.CORBA.ExtAttributeDescription[selection.size()]; 225 226 for(int i=0; i<selection.size(); i++) 227 { 228 result[i] = ((ExtAttributeDef_impl)selection.get(i)) 229 .getExtAttributeDescription(); 230 } 231 232 return result; 233 } 234 235 238 public org.omg.CORBA.OperationDescription [] 239 getOpDescriptionSeq(org.omg.CORBA.DefinitionKind kind) 240 { 241 java.util.List selection = new java.util.ArrayList (); 242 243 selectContained(selection, kind, true); 244 245 org.omg.CORBA.OperationDescription [] result = 246 new org.omg.CORBA.OperationDescription [selection.size()]; 247 248 for(int i=0; i<selection.size(); i++) 249 result[i] = ((OperationDef_impl)selection.get(i)) 250 .getOperationDescription(); 251 252 return result; 253 } 254 255 258 public org.omg.CORBA.OperationDescription [] 259 getFactoryDescriptionSeq() 260 { 261 return getOpDescriptionSeq(org.omg.CORBA.DefinitionKind.dk_Factory); 262 } 263 264 267 public org.omg.CORBA.OperationDescription [] 268 getFinderDescriptionSeq() 269 { 270 return getOpDescriptionSeq(org.omg.CORBA.DefinitionKind.dk_Finder); 271 } 272 273 279 282 public void 283 setDescriptionValue(org.omg.CORBA.Any any) 284 { 285 org.omg.CORBA.ComponentIR.HomeDescription description = 287 new org.omg.CORBA.ComponentIR.HomeDescription(); 288 description.name = name(); 289 description.id = id(); 290 description.defined_in = getContainerID(); 291 description.version = version(); 292 description.base_home = base_home_.getId(); 293 description.managed_component = managed_component_.getId(); 294 description.primary_key = getPrimaryKeyDescription(); 295 description.factories = getFactoryDescriptionSeq(); 296 description.finders = getFinderDescriptionSeq(); 297 description.operations = getOpDescriptionSeq(org.omg.CORBA.DefinitionKind.dk_Operation); 298 description.attributes = getLocalExtAttrDescriptionSeq(); 299 description.type = type(); 301 302 org.omg.CORBA.ComponentIR.HomeDescriptionHelper.insert(any, description); 304 } 305 306 312 315 public boolean 316 checkDefinitionKind(org.omg.CORBA.DefinitionKind dk) 317 { 318 return super.checkDefinitionKind(dk) 319 || (dk == org.omg.CORBA.DefinitionKind.dk_Factory) 320 || (dk == org.omg.CORBA.DefinitionKind.dk_Finder); 321 } 322 323 326 public void 327 checkName(String name, 328 boolean exclude_inherited, 329 boolean in_inherited) 330 { 331 super.checkName(name, exclude_inherited, in_inherited); 333 334 if(!exclude_inherited) 335 { 336 } 338 } 339 340 346 349 protected void 350 cutDependencies() 351 { 352 if(ccm_executor_itf_ != null) 354 { 355 try 356 { 357 ccm_executor_itf_.destroy(); 358 } 359 catch(org.omg.CORBA.OBJECT_NOT_EXIST exc) 360 { 361 } 363 ccm_executor_itf_ = null; 364 } 365 366 if(ccm_implicit_executor_itf_ != null) 367 { 368 try 369 { 370 ccm_implicit_executor_itf_.destroy(); 371 } 372 catch(org.omg.CORBA.OBJECT_NOT_EXIST exc) 373 { 374 } 376 ccm_implicit_executor_itf_ = null; 377 } 378 379 if(ccm_explicit_executor_itf_ != null) 380 { 381 try 382 { 383 ccm_explicit_executor_itf_.destroy(); 384 } 385 catch(org.omg.CORBA.OBJECT_NOT_EXIST exc) 386 { 387 } 389 ccm_explicit_executor_itf_ = null; 390 } 391 392 base_home_.cutDependency(); 394 base_home_ = null; 395 396 managed_component_.cutDependency(); 398 managed_component_ = null; 399 400 primary_key_.cutDependency(); 402 primary_key_ = null; 403 404 while(contained_elements_.size() != 0) 406 { 407 ((Contained_impl) contained_elements_.get(contained_elements_.size() -1)).destroy(); 408 } 409 410 super.cutDependencies(); 412 413 if(implicit_itf_ != null) 415 { 416 try 417 { 418 implicit_itf_.destroy(); 419 } 420 catch(org.omg.CORBA.OBJECT_NOT_EXIST exc) 421 { 422 } 424 implicit_itf_ = null; 425 } 426 427 if(explicit_itf_ != null) 429 { 430 try 431 { 432 explicit_itf_.destroy(); 433 } 434 catch(org.omg.CORBA.OBJECT_NOT_EXIST exc) 435 { 436 } 438 explicit_itf_ = null; 439 } 440 } 441 442 448 451 public org.omg.CORBA.DefinitionKind 452 def_kind() 453 { 454 if (getIFR().getRepository().isIDL2Repository()) 455 return org.omg.CORBA.DefinitionKind.dk_Interface; 456 457 return org.omg.CORBA.DefinitionKind.dk_Home; 458 } 459 460 466 469 public org.omg.CORBA.TypeCode 470 type() 471 { 472 474 479 return getIFR().getTCF().create_interface_tc(id(), name()); 480 } 481 482 488 491 public void 492 move(org.omg.CORBA.Container new_container, 493 String new_name, 494 String new_version) 495 { 496 super.move(new_container, new_name, new_version); 498 499 if (!getIFR().getRepository().enable_mappings_) 501 return ; 502 503 org.omg.CORBA.LocalInterfaceDef litf = null; 504 String cont_base_id = getBaseContainerID(); 505 506 container_.mapping_started_ = true; 507 508 java.lang.String name = "CCM_"+name()+"Explicit"; 510 java.lang.String id = cont_base_id + name + ':' + new_version; 511 litf = org.omg.CORBA.LocalInterfaceDefHelper.narrow( 512 getIFR().getRepository().lookup_mapped_id(id)); 513 litf.move(new_container, name, new_version); 514 515 name = "CCM_"+name()+"Implicit"; 517 id = cont_base_id + name + ':' + new_version; 518 litf = org.omg.CORBA.LocalInterfaceDefHelper.narrow( 519 getIFR().getRepository().lookup_mapped_id(id)); 520 litf.move(new_container, name, new_version); 521 522 name = "CCM_"+name(); 524 id = cont_base_id + name + ':' + new_version; 525 litf = org.omg.CORBA.LocalInterfaceDefHelper.narrow( 526 getIFR().getRepository().lookup_mapped_id(id)); 527 litf.move(new_container, name, new_version); 528 529 container_.mapping_started_ = false; 530 } 531 532 538 541 public org.omg.CORBA.Contained 542 lookup(String search_name) 543 { 544 org.omg.CORBA.Contained contained = super.lookup(search_name); 546 547 if (contained == null) 548 { 549 } 551 552 return contained; 553 } 554 555 558 public org.omg.CORBA.Contained [] 559 contents(org.omg.CORBA.DefinitionKind limit_type, 560 boolean exclude_inherited) 561 { 562 org.omg.CORBA.Contained [] result = super.contents(limit_type, exclude_inherited); 564 565 if(!exclude_inherited && (base_home() != null)) 566 { 567 org.omg.CORBA.Contained [] result2 = base_home().contents(limit_type, exclude_inherited); 568 org.omg.CORBA.Contained [] result3 = result; 569 result = new org.omg.CORBA.Contained [result3.length + result2.length]; 570 System.arraycopy(result2, 0, result, 0, result2.length); 571 System.arraycopy(result3, 0, result, result2.length, result3.length); 572 } 573 574 return result; 575 } 576 577 580 public org.omg.CORBA.Contained [] 581 lookup_name(String search_name, 582 int levels_to_search, 583 org.omg.CORBA.DefinitionKind limit_type, 584 boolean exclude_inherited) 585 { 586 org.omg.CORBA.Contained [] result = 588 super.lookup_name(search_name, levels_to_search, 589 limit_type, exclude_inherited); 590 591 if(!exclude_inherited) 592 { 593 } 595 596 return result; 597 } 598 599 605 611 614 public org.omg.CORBA.ComponentIR.HomeDef 615 base_home() 616 { 617 return base_home_.asHomeDef(); 619 } 620 621 624 public void 625 base_home(org.omg.CORBA.ComponentIR.HomeDef val) 626 { 627 if(val == null) 628 base_home_.setDependency(null); 629 else 630 { 631 base_home_.setDependency(castToLocal(val)); 634 } 635 } 636 637 640 public org.omg.CORBA.ComponentIR.ComponentDef 641 managed_component() 642 { 643 return managed_component_.asComponentDef(); 645 } 646 647 650 public void 651 managed_component(org.omg.CORBA.ComponentIR.ComponentDef val) 652 { 653 managed_component_.setDependency(castToLocal(val)); 656 } 657 658 661 public org.omg.CORBA.ValueDef 662 primary_key() 663 { 664 return primary_key_.asValueDef(); 666 } 667 668 671 public void 672 primary_key(org.omg.CORBA.ValueDef val) 673 { 674 if (val == null) 676 primary_key_.setDependency(null); 677 else 678 { 679 primary_key_.setDependency( castToLocal(val) ); 682 } 683 } 684 685 688 public org.omg.CORBA.InterfaceDef [] 689 supported_interfaces() 690 { 691 return InterfaceDef_ref.computeInterfaceDefSeq(supported_interfaces_); 692 } 693 694 697 public void 698 supported_interfaces(org.omg.CORBA.InterfaceDef [] val) 699 { 700 InterfaceDef_impl[] itfs = new InterfaceDef_impl[val.length]; 701 for (int i=0; i<val.length; i++) 702 itfs[i] = castToLocal(val[i]); 703 704 706 InterfaceDef_ref[] refs = new InterfaceDef_ref[val.length]; 707 for (int i=0; i<val.length; i++) 708 refs[i] = new InterfaceDef_ref( this, itfs[i] ); 709 710 InterfaceDef_ref.cutDependencies(supported_interfaces_); 712 713 supported_interfaces_ = refs; 714 } 715 716 719 729 730 731 734 public org.omg.CORBA.ComponentIR.FactoryDef 735 create_factory(String id, 736 String name, 737 String version, 738 org.omg.CORBA.ParameterDescription [] params, 739 org.omg.CORBA.ExceptionDef [] exceptions) 740 { 741 FactoryDef_impl f = new FactoryDef_impl(getIFR(), this); 742 try 743 { 744 addContained(f, id, name, version); 745 f.params(params); 746 f.exceptions(exceptions); 747 } 748 catch(org.omg.CORBA.SystemException exc) 749 { 750 f.destroy(); 751 throw exc; 752 } 753 754 f.whenCreated(); 755 return f.asFactoryDef(); 756 } 757 758 761 public org.omg.CORBA.ComponentIR.FinderDef 762 create_finder(String id, 763 String name, 764 String version, 765 org.omg.CORBA.ParameterDescription [] params, 766 org.omg.CORBA.ExceptionDef [] exceptions) 767 { 768 FinderDef_impl f = new FinderDef_impl(getIFR(), this); 769 770 try 771 { 772 addContained(f, id, name, version); 773 f.params(params); 774 f.exceptions(exceptions); 775 } 776 catch(org.omg.CORBA.SystemException exc) 777 { 778 f.destroy(); 779 throw exc; 780 } 781 782 f.whenCreated(); 783 return f.asFinderDef(); 784 } 785 786 792 795 protected void 796 whenCreated() 797 { 798 if (!getIFR().getRepository().enable_mappings_) 800 return ; 801 802 804 String cont_base_id = getBaseContainerID(); 811 String name = name() + "Explicit"; 812 String version = version(); 813 String id = cont_base_id + name + ':' + version; 814 org.omg.CORBA.InterfaceDef [] supported = supported_interfaces(); 815 org.omg.CORBA.InterfaceDef [] bases = new org.omg.CORBA.InterfaceDef [1+supported.length]; 816 for (int i=0;i<supported.length;i++) 820 bases[1+i] = supported[i]; 821 822 if (base_home_.getImpl()==null) 826 { 827 bases[0] = org.omg.CORBA.InterfaceDefHelper.narrow( 828 getIFR().getRepository().lookup("::Components::CCMHome")); 829 } 830 else 831 { 832 bases[0] = base_home_.getImpl().base_interfaces_[0].asInterfaceDef(); 833 } 834 835 container_.mapping_started_ = true; 836 explicit_itf_ = container_.create_ext_interface(id, name, version, bases); 837 container_.mapping_started_ = false; 838 839 name = name() + "Implicit"; 843 String implicit_base_id = cont_base_id + name; 844 id = implicit_base_id + ':' + version; 845 if (primary_key_.getImpl()==null) 849 { 850 bases = new org.omg.CORBA.InterfaceDef [1]; 851 bases[0] = org.omg.CORBA.InterfaceDefHelper.narrow( 852 getIFR().getRepository().lookup("::Components::KeylessCCMHome")); 853 } 854 else 855 { 856 bases = new org.omg.CORBA.InterfaceDef [0]; 857 } 858 859 container_.mapping_started_ = true; 860 implicit_itf_ = container_.create_ext_interface(id, name, version, bases); 861 container_.mapping_started_ = false; 862 863 if (primary_key_.getImpl()==null) 864 { 865 name = "create"; 870 version = implicit_itf_.version(); 871 id = implicit_base_id + '/' + name + ':' + version; 872 org.omg.CORBA.ExceptionDef [] excs = new org.omg.CORBA.ExceptionDef [1]; 873 excs[0] = org.omg.CORBA.ExceptionDefHelper.narrow( 874 getIFR().getRepository().lookup("::Components::CreateFailure")); 875 implicit_itf_.create_operation(id, name, version, 876 managed_component_.asComponentDef(), 877 org.omg.CORBA.OperationMode.OP_NORMAL, 878 new org.omg.CORBA.ParameterDescription [0], 879 excs, 880 new java.lang.String [0]); 881 } 882 else 883 { 884 name = "create"; 891 version = implicit_itf_.version(); 892 id = implicit_base_id + '/' + name + ':' + version; 893 org.omg.CORBA.IDLType key = primary_key_.asValueDef(); 894 org.omg.CORBA.IDLType component = managed_component_.asComponentDef(); 895 org.omg.CORBA.ParameterDescription [] params = new org.omg.CORBA.ParameterDescription [1]; 896 params[0] = new org.omg.CORBA.ParameterDescription (); 897 params[0].name = "key"; 898 params[0].type_def = key; 899 params[0].type = params[0].type_def.type(); 900 params[0].mode = org.omg.CORBA.ParameterMode.PARAM_IN; 901 org.omg.CORBA.ExceptionDef [] excs = new org.omg.CORBA.ExceptionDef [3]; 902 excs[0] = org.omg.CORBA.ExceptionDefHelper.narrow( 903 getIFR().getRepository().lookup("::Components::DuplicateKeyValue")); 904 excs[1] = org.omg.CORBA.ExceptionDefHelper.narrow( 905 getIFR().getRepository().lookup("::Components::InvalidKey")); 906 excs[2] = org.omg.CORBA.ExceptionDefHelper.narrow( 907 getIFR().getRepository().lookup("::Components::CreateFailure")); 908 909 implicit_itf_.create_operation(id, name, version, 910 component, 911 org.omg.CORBA.OperationMode.OP_NORMAL, 912 params, 913 excs, 914 new java.lang.String [0]); 915 916 name = "find_by_primary_key"; 923 id = implicit_base_id + '/' + name + ':' + version; 924 params = new org.omg.CORBA.ParameterDescription [1]; 925 params[0] = new org.omg.CORBA.ParameterDescription (); 926 params[0].name = "key"; 927 params[0].type_def = key; 928 params[0].type = params[0].type_def.type(); 929 params[0].mode = org.omg.CORBA.ParameterMode.PARAM_IN; 930 excs = new org.omg.CORBA.ExceptionDef [3]; 931 excs[0] = org.omg.CORBA.ExceptionDefHelper.narrow( 932 getIFR().getRepository().lookup("::Components::UnknownKeyValue")); 933 excs[1] = org.omg.CORBA.ExceptionDefHelper.narrow( 934 getIFR().getRepository().lookup("::Components::InvalidKey")); 935 excs[2] = org.omg.CORBA.ExceptionDefHelper.narrow( 936 getIFR().getRepository().lookup("::Components::FinderFailure")); 937 938 implicit_itf_.create_operation(id, name, version, 939 component, 940 org.omg.CORBA.OperationMode.OP_NORMAL, 941 params, 942 excs, 943 new java.lang.String [0]); 944 945 name = "remove"; 952 id = implicit_base_id + '/' + name + ':' + version; 953 params = new org.omg.CORBA.ParameterDescription [1]; 954 params[0] = new org.omg.CORBA.ParameterDescription (); 955 params[0].name = "key"; 956 params[0].type_def = key; 957 params[0].type = params[0].type_def.type(); 958 params[0].mode = org.omg.CORBA.ParameterMode.PARAM_IN; 959 excs = new org.omg.CORBA.ExceptionDef [3]; 960 excs[0] = org.omg.CORBA.ExceptionDefHelper.narrow( 961 getIFR().getRepository().lookup("::Components::UnknownKeyValue")); 962 excs[1] = org.omg.CORBA.ExceptionDefHelper.narrow( 963 getIFR().getRepository().lookup("::Components::InvalidKey")); 964 excs[2] = org.omg.CORBA.ExceptionDefHelper.narrow( 965 getIFR().getRepository().lookup("::Components::RemoveFailure")); 966 967 implicit_itf_.create_operation(id, name, version, 968 getIFR().getRepository().get_primitive( 969 org.omg.CORBA.PrimitiveKind.pk_void), 970 org.omg.CORBA.OperationMode.OP_NORMAL, 971 params, 972 excs, 973 new java.lang.String [0]); 974 975 name = "get_primary_key"; 979 id = implicit_base_id + '/' + name + ':' + version; 980 params = new org.omg.CORBA.ParameterDescription [1]; 981 params[0] = new org.omg.CORBA.ParameterDescription (); 982 params[0].name = "comp"; 983 params[0].type_def = component; 984 params[0].type = params[0].type_def.type(); 985 params[0].mode = org.omg.CORBA.ParameterMode.PARAM_IN; 986 987 implicit_itf_.create_operation(id, name, version, 988 key, 989 org.omg.CORBA.OperationMode.OP_NORMAL, 990 params, 991 new org.omg.CORBA.ExceptionDef [0], 992 new java.lang.String [0]); 993 } 994 995 bases = new org.omg.CORBA.InterfaceDef [2]; 999 bases[0] = explicit_itf_; 1000 bases[1] = implicit_itf_; 1001 base_interfaces(bases); 1002 1003 container_.mapping_started_ = true; 1005 getIFR().getRepository().addRID(id(), this); 1006 container_.mapping_started_ = false; 1007 1008 cont_base_id = getBaseContainerID(); 1024 name = "CCM_"+name()+"Explicit"; 1025 version = version(); 1026 id = cont_base_id + name + ':' + version; 1027 bases = new org.omg.CORBA.InterfaceDef [supported_interfaces_.length+1]; 1028 if (base_home_.getImpl()==null) 1029 { 1030 bases[0] = org.omg.CORBA.InterfaceDefHelper.narrow( 1031 getIFR().getRepository().lookup("::Components::HomeExecutorBase")); 1032 } 1033 else 1034 { 1035 String base_cont_base_id = base_home_.getImpl().getBaseContainerID(); 1036 String base_home_exe_id = base_cont_base_id + "CCM_" + 1037 base_home_.getImpl().name() + "Explicit:" + 1038 base_home_.getImpl().version(); 1039 1040 bases[0] = org.omg.CORBA.InterfaceDefHelper.narrow( 1041 getIFR().getRepository().lookup_mapped_id(base_home_exe_id)); 1042 } 1043 1044 for (int i=0;i<supported_interfaces_.length;i++) 1045 { 1046 bases[1+i] = supported_interfaces_[i].asInterfaceDef(); 1047 } 1048 1049 container_.mapping_started_ = true; 1050 ccm_explicit_executor_itf_ = 1051 container_.create_ext_local_interface(id, name, version, bases); 1052 container_.mapping_started_ = false; 1053 1054 name = "CCM_"+name()+"Implicit"; 1062 id = cont_base_id + name + ':' + version; 1063 container_.mapping_started_ = true; 1064 ccm_implicit_executor_itf_ = 1065 container_.create_ext_local_interface(id, name, version, 1066 new org.omg.CORBA.InterfaceDef [0]); 1067 container_.mapping_started_ = false; 1068 String implicit_exe_base_id = cont_base_id + name; 1069 1070 if (primary_key_.getImpl()==null) 1071 { 1072 name = "create"; 1079 version = ccm_implicit_executor_itf_.version(); 1080 id = implicit_exe_base_id + '/' + name + ':' + version; 1081 org.omg.CORBA.ExceptionDef [] excs = new org.omg.CORBA.ExceptionDef [1]; 1082 excs[0] = org.omg.CORBA.ExceptionDefHelper.narrow( 1083 getIFR().getRepository().lookup("::Components::CCMException")); 1084 org.omg.CORBA.InterfaceDef enterprise_comp = org.omg.CORBA.InterfaceDefHelper.narrow( 1085 getIFR().getRepository().lookup("::Components::EnterpriseComponent")); 1086 1087 ccm_implicit_executor_itf_.create_operation(id, name, version, 1088 enterprise_comp, 1089 org.omg.CORBA.OperationMode.OP_NORMAL, 1090 new org.omg.CORBA.ParameterDescription [0], 1091 excs, 1092 new java.lang.String [0]); 1093 } 1094 else 1095 { 1096 org.omg.CORBA.ExceptionDef ccm_exception = org.omg.CORBA.ExceptionDefHelper.narrow( 1097 getIFR().getRepository().lookup("::Components::CCMException")); 1098 org.omg.CORBA.InterfaceDef enterprise_comp = org.omg.CORBA.InterfaceDefHelper.narrow( 1099 getIFR().getRepository().lookup("::Components::EnterpriseComponent")); 1100 org.omg.CORBA.IDLType key = primary_key_.asValueDef(); 1101 1102 name = "create"; 1109 version = ccm_implicit_executor_itf_.version(); 1110 id = implicit_exe_base_id + '/' + name + ':' + version; 1111 org.omg.CORBA.ParameterDescription [] params = new org.omg.CORBA.ParameterDescription [1]; 1112 params[0] = new org.omg.CORBA.ParameterDescription (); 1113 params[0].name = "key"; 1114 params[0].type_def = key; 1115 params[0].type = params[0].type_def.type(); 1116 params[0].mode = org.omg.CORBA.ParameterMode.PARAM_IN; 1117 org.omg.CORBA.ExceptionDef [] excs = new org.omg.CORBA.ExceptionDef [1]; 1118 excs[0] = ccm_exception; 1119 1120 ccm_implicit_executor_itf_.create_operation(id, name, version, 1121 enterprise_comp, 1122 org.omg.CORBA.OperationMode.OP_NORMAL, 1123 params, 1124 excs, 1125 new java.lang.String [0]); 1126 1127 name = "find_by_primary_key"; 1132 id = implicit_exe_base_id + '/' + name + ':' + version; 1133 params = new org.omg.CORBA.ParameterDescription [1]; 1134 params[0] = new org.omg.CORBA.ParameterDescription (); 1135 params[0].name = "key"; 1136 params[0].type_def = key; 1137 params[0].type = params[0].type_def.type(); 1138 params[0].mode = org.omg.CORBA.ParameterMode.PARAM_IN; 1139 excs = new org.omg.CORBA.ExceptionDef [1]; 1140 excs[0] = ccm_exception; 1141 1142 ccm_implicit_executor_itf_.create_operation(id, name, version, 1143 enterprise_comp, 1144 org.omg.CORBA.OperationMode.OP_NORMAL, 1145 params, 1146 excs, 1147 new java.lang.String [0]); 1148 1149 name = "remove"; 1154 id = implicit_exe_base_id + '/' + name + ':' + version; 1155 params = new org.omg.CORBA.ParameterDescription [1]; 1156 params[0] = new org.omg.CORBA.ParameterDescription (); 1157 params[0].name = "key"; 1158 params[0].type_def = key; 1159 params[0].type = params[0].type_def.type(); 1160 params[0].mode = org.omg.CORBA.ParameterMode.PARAM_IN; 1161 excs = new org.omg.CORBA.ExceptionDef [1]; 1162 excs[0] = ccm_exception; 1163 1164 ccm_implicit_executor_itf_.create_operation(id, name, version, 1165 getIFR().getRepository().get_primitive( 1166 org.omg.CORBA.PrimitiveKind.pk_void), 1167 org.omg.CORBA.OperationMode.OP_NORMAL, 1168 params, 1169 excs, 1170 new java.lang.String [0]); 1171 } 1172 1173 name = "CCM_" + name(); 1182 id = cont_base_id + name + ':' + version; 1183 bases = new org.omg.CORBA.InterfaceDef [2]; 1184 bases[0] = ccm_explicit_executor_itf_; 1185 bases[1] = ccm_implicit_executor_itf_; 1186 1187 container_.mapping_started_ = true; 1188 ccm_executor_itf_ = container_.create_ext_local_interface(id, name, version, bases); 1189 container_.mapping_started_ = false; 1190 } 1191} 1192 | Popular Tags |