Package ejava.examples.orm.map.annotated
Class OneManyOwningParent
- java.lang.Object
-
- ejava.examples.orm.map.annotated.OneManyOwningParent
-
@Entity public class OneManyOwningParent extends Object
This class represents a parent in a One-to-Many, uni-directional relationship, relative to the parent. The OneManyChild makes no reference to this relationship. Of note, there is no such thing as a One-to-Many, bi-directional relationship, owned by the parent in JPA. All One-to-Many bi-directional relationships must be owned by the child.
-
-
Field Summary
Fields Modifier and Type Field Description private String
name
private Map<String,OneManyChild>
ownedChildren
-
Constructor Summary
Constructors Modifier Constructor Description protected
OneManyOwningParent()
OneManyOwningParent(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
Map<String,OneManyChild>
getOwnedChildren()
void
setName(String name)
void
setOwnedChildren(Map<String,OneManyChild> ownedChildren)
String
toString()
-
-
-
Field Detail
-
name
private String name
-
ownedChildren
private Map<String,OneManyChild> ownedChildren
-
-
Constructor Detail
-
OneManyOwningParent
protected OneManyOwningParent()
-
OneManyOwningParent
public OneManyOwningParent(String name)
-
-
Method Detail
-
getName
public String getName()
-
setName
public void setName(String name)
-
getOwnedChildren
public Map<String,OneManyChild> getOwnedChildren()
-
setOwnedChildren
public void setOwnedChildren(Map<String,OneManyChild> ownedChildren)
-
-