countrypk.java

来自「噶额外噶外骨骼感广泛高热感 就 啊啊」· Java 代码 · 共 51 行

JAVA
51
字号
  /*
   * @author  Neelesh
   * @version 1.0
   *
   * Development Environment        :  Oracle9i JDeveloper
   * Name of the Application        :  CountryPK.java
   * Creation/Modification History  :
   *
   * Neelesh             11-Jan-2003    Created
   *
   */
  package oracle.otnsamples.vsm.entities;

  import java.io.Serializable;

  /**
   * Primary key for Country entity. Consists of a String id.  Generated by
   * Oracle9i JDeveloper Tool.
   */
  public class CountryPK implements Serializable {
    public String id;

    public CountryPK(  ) {
    }

    public CountryPK( String id ) {
      this.id = id;
    }

    public boolean equals( Object other ) {
      try {
        if ( other instanceof CountryPK ) {
          final CountryPK otherCountryPK = (CountryPK) other;

          // The following assignment statement is auto-maintained
          boolean areEqual = ( otherCountryPK.id.equals( id ) );

          return areEqual;
        }
      } catch ( Exception ex ) {
      }

      return false;
    }

    public int hashCode(  ) {
      // Add custom hashCode() impl here
      return id.hashCode(  );
    }
  }

⌨️ 快捷键说明

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