Skip to content

Commit

Permalink
Revert "BLC-416 - Added an ID field to State to be used as the primary
Browse files Browse the repository at this point in the history
key in order to support international provinces that could have the same
abbreviation as other countries"

This reverts commit 184fe20.
  • Loading branch information
phillipuniverse committed Apr 11, 2012
1 parent e6da268 commit deab595
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
Expand Up @@ -19,10 +19,6 @@
import java.io.Serializable;

public interface State extends Serializable {

public Long getId();

public void setId(Long id);

public String getAbbreviation();

Expand Down
Expand Up @@ -25,15 +25,12 @@
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

@Entity
@Inheritance(strategy = InheritanceType.JOINED)
Expand All @@ -45,12 +42,7 @@ public class StateImpl implements State {
private static final long serialVersionUID = 1L;

@Id
@GeneratedValue(generator = "StateId", strategy = GenerationType.TABLE)
@TableGenerator(name = "StateId", table = "SEQUENCE_GENERATOR", pkColumnName = "ID_NAME", valueColumnName = "ID_VAL", pkColumnValue = "StateImpl", allocationSize = 50)
@Column(name = "STATE_ID")
protected Long id;

@Column(name = "ABBREVIATION")
@Column(name = "ABBREVIATION")
protected String abbreviation;

@Column(name = "NAME", nullable = false)
Expand All @@ -61,14 +53,6 @@ public class StateImpl implements State {
@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, targetEntity = CountryImpl.class, optional = false)
@JoinColumn(name = "COUNTRY")
protected Country country;

public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

public String getAbbreviation() {
return abbreviation;
Expand Down

0 comments on commit deab595

Please sign in to comment.