package entity;

import java.io.Serializable;
import javax.persistence.*;

/*
 * ONLINE CUSTOMER ENTITY CLASS -> This is an example of Single table inheritance
 */
@Entity(name = "ONLINECUSTOMER") //Name of the entity
@Table(name = "ONLINECUSTOMER")
@DiscriminatorValue("ONLINE")
public class OnlineCustomer extends CustomerSingle implements Serializable {
  @Column(name = "WEBSITE", length = 100)
  private String website;

  public String getWebsite() {
    return website;
  }

  public void setWebsite( String website ) {
    this.website = website;
  }

  @Override
  public String toString() {
    StringBuffer sb = new StringBuffer();
    sb.append(super.toString());
    sb.append(" website: " + website);
    return sb.toString();
  }
}
