1/** 2 * Copyright (C) 2010 Google, Inc. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package com.google.inject.persist.jpa; 18 19import java.util.ArrayList; 20import java.util.List; 21 22import javax.persistence.Entity; 23import javax.persistence.GeneratedValue; 24import javax.persistence.Id; 25import javax.persistence.OneToMany; 26 27/** 28 * Created with IntelliJ IDEA. 29 * On: 2/06/2007 30 * 31 * @author Dhanji R. Prasanna (dhanji@gmail.com) 32 * @since 1.0 33 */ 34@Entity 35public class JpaParentTestEntity { 36 private Long id; 37 private List<JpaTestEntity> children = new ArrayList<JpaTestEntity>(); 38 39 @Id 40 @GeneratedValue 41 public Long getId() { 42 return id; 43 } 44 45 public void setId(Long id) { 46 this.id = id; 47 } 48 49 @OneToMany 50 public List<JpaTestEntity> getChildren() { 51 return children; 52 } 53 54 public void setChildren(List<JpaTestEntity> children) { 55 this.children = children; 56 } 57} 58