1 8 9 package com.sleepycat.persist.model; 10 11 12 21 public class PrimaryKeyMetadata extends FieldMetadata { 22 23 private static final long serialVersionUID = 2946863622972437018L; 24 25 private String sequenceName; 26 27 30 public PrimaryKeyMetadata(String name, 31 String className, 32 String declaringClassName, 33 String sequenceName) { 34 super(name, className, declaringClassName); 35 this.sequenceName = sequenceName; 36 } 37 38 42 public String getSequenceName() { 43 return sequenceName; 44 } 45 46 @Override 47 public boolean equals(Object other) { 48 if (other instanceof PrimaryKeyMetadata) { 49 PrimaryKeyMetadata o = (PrimaryKeyMetadata) other; 50 return super.equals(o) && 51 ClassMetadata.nullOrEqual(sequenceName, o.sequenceName); 52 } else { 53 return false; 54 } 55 } 56 57 @Override 58 public int hashCode() { 59 return super.hashCode() + ClassMetadata.hashCode(sequenceName); 60 } 61 } 62 | Popular Tags |