1 package org.hibernate.ejb.test.pack.defaultpar; 3 4 import javax.persistence.Embeddable; 5 6 9 @Embeddable 10 public class Version { 11 private static final String DOT = "."; 12 private int major; 13 private int minor; 14 private int micro; 15 16 public int getMajor() { 17 return major; 18 } 19 20 public void setMajor(int major) { 21 this.major = major; 22 } 23 24 public int getMinor() { 25 return minor; 26 } 27 28 public void setMinor(int minor) { 29 this.minor = minor; 30 } 31 32 public int getMicro() { 33 return micro; 34 } 35 36 public void setMicro(int micro) { 37 this.micro = micro; 38 } 39 40 public String toString() { 41 return new StringBuffer (major).append(DOT).append(minor).append(DOT).append(micro).toString(); 42 } 43 } 44 | Popular Tags |