personalinfoimpl.java

来自「java初学者适用的源码一共分成15章每章都有配套源码,简单易用」· Java 代码 · 共 68 行

JAVA
68
字号

/**
 * Copyright (c) 2001
 * Template File
 *   InterfaceServerImpl.java.template
 * IDL Object
 *   humanresourcedemo.HumanResource.PersonalInfo
 * Generation Date
 *   2001年12月10日 下午10时17分52秒
 * IDL Source File
 *   E:/HumanResourceDemo/src/humanresourcedemo/HumanResource.idl
 * Abstract
 *   Provides default implementation for the server side of a CORBA interface.
 * @version 1.0
 */

package humanresourcedemo.HumanResource.server;

import java.sql.*;
import java.util.*;
import java.math.*;

import org.omg.PortableServer.*;


public class PersonalInfoImpl extends humanresourcedemo.HumanResource.PersonalInfoPOA
{
  String _name = "PersonalInfo";
  public static ServerMonitorPage monitor = null;

  private void init()
  {
    if (monitor == null)
    {
      monitor = ServerMonitor.addPage(this, "PersonalInfo");
      monitor.showObjectCounter(true);
    }
    monitor.updateObjectCounter(1);

  }

  public PersonalInfoImpl(java.lang.String name, java.lang.String creationParameters)
  {
    this._name = name;
    init();
  }

  public PersonalInfoImpl(java.lang.String name)
  {
    this._name = name;
    init();
  }

  public PersonalInfoImpl()
  {
    init();
  }

  public String getName(short IdNumber)
  {
    ServerMonitor.log("(" + _name + ") PersonalInfoImpl.java getName()");
    if( IdNumber == 5 )
        return "John";
    else
        return "Undefined";
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?