Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
109 lines (89 sloc) 2.45 KB
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
package de.crowdcode.bitemporal.example;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import org.apache.commons.lang.NotImplementedException;
* Person implementation.
* @author Lofi Dewanto
* @since 1.0.0
* @version 1.0.0
@Table(name = "person")
public class PersonImpl implements Person, Serializable {
private static final long serialVersionUID = 2909659022959145389L;
private Long id;
@Column(name = "firstname")
private String firstname;
@Column(name = "lastname")
private String lastname;
@OneToOne(targetEntity = AddressImpl.class)
private Address address;
public String getFirstname() {
return firstname;
public void setFirstname(String firstname) {
this.firstname = firstname;
public Address getAddress() {
return this.address;
public void setAddress(Address address) {
this.address = address;
public String getLastname() {
return lastname;
public void setLastname(String lastname) {
this.lastname = lastname;
public Address address() {
return getAddress();
public Boolean alive() {
// Not implemented
throw new NotImplementedException("Person.alive() is not implemented!");
public Long getId() {
return id;
public void setId(Long id) { = id;
You can’t perform that action at this time.