Class OneManyOwningParent
- java.lang.Object
-
- ejava.examples.orm.onetomany.annotated.OneManyOwningParent
-
@Entity(name="O2MOwningParent") public class OneManyOwningParent extends Object
This class implements a parent in a OneToMany, uni-directional relationship test case. We are looking to see where the foreign key gets placed; in a link/join table or the child side of the relationship. The child class knows nothing of this relationship. This is the schema when nothing besides @OneToMany is defined
-
-
Field Summary
Fields Modifier and Type Field Description private Collection<OneManyChild>
children
private long
id
private String
name
-
Constructor Summary
Constructors Constructor Description OneManyOwningParent()
OneManyOwningParent(long id)
OneManyOwningParent(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<OneManyChild>
getChildren()
long
getId()
String
getName()
void
setChildren(Collection<OneManyChild> children)
void
setName(String name)
String
toString()
-
-
-
Field Detail
-
id
private long id
-
name
private String name
-
children
private Collection<OneManyChild> children
-
-
Constructor Detail
-
OneManyOwningParent
public OneManyOwningParent()
-
OneManyOwningParent
public OneManyOwningParent(long id)
-
OneManyOwningParent
public OneManyOwningParent(String name)
-
-
Method Detail
-
getId
public long getId()
-
getName
public String getName()
-
setName
public void setName(String name)
-
getChildren
public Collection<OneManyChild> getChildren()
-
setChildren
public void setChildren(Collection<OneManyChild> children)
-
-