📄 nameprimarykeyfactoryhelper.java
字号:
/*====================================================================Tnis file was produced by the OpenCCM ir3_java generator.OpenCCM: The Open CORBA Component Model PlatformCopyright (C) 2000-2002 USTL - LIFL - GOALContact: openccm-team@objectweb.orgThis library is free software; you can redistribute it and/ormodify it under the terms of the GNU Lesser General PublicLicense as published by the Free Software Foundation; eitherversion 2.1 of the License, or any later version.This library is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNULesser General Public License for more details.You should have received a copy of the GNU Lesser General PublicLicense along with this library; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USAInitial developer(s): Philippe Merle, Mathieu Vadet.Contributor(s): ______________________________________.====================================================================*/package org.objectweb.ccm.demo3; /** ** Helper class for the ::demo3::NamePrimaryKey primary key. **/public class NamePrimaryKeyFactoryHelper{ // ================================================================== // // Public static methods. // // ================================================================== /** ** Register the primary key factory on the ORB. **/ public static void register(org.omg.CORBA.portable.ValueFactory factory) { org.objectweb.openccm.Components.Runtime.register_value_factory("IDL:ccm.objectweb.org/demo3/NamePrimaryKey:1.0", factory); } /** ** Cast a base primary key to a ::demo3::NamePrimaryKey one. **/ public static NamePrimaryKey narrow(org.omg.Components.PrimaryKeyBase key) { try { return (NamePrimaryKey)key; } catch(java.lang.ClassCastException ex) { } return null; } /** ** Create a ::CORBA::Any from a primary key instance. **/ public static org.omg.CORBA.Any create_any(NamePrimaryKey key) { org.omg.CORBA.TypeCode type = NamePrimaryKeyHelper.type(); org.omg.DynamicAny.DynAny dyn_any = org.objectweb.openccm.corba.TheDynamicAnyFactory.create_dyn_any_from_type_code(type); org.omg.CORBA.Any res = dyn_any.to_any(); NamePrimaryKeyHelper.insert(res, key); return res; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -