Package org.mycore.backend.jpa
Class MCRObjectIDPK
java.lang.Object
org.mycore.backend.jpa.MCRObjectIDPK
- All Implemented Interfaces:
Serializable
Use this wrapper if you want a
MCRObjectID
as a primary key with name id
in your JPA mapping.
@Entity
@IdClass(MCRObjectIDPK.class)
public class EntityClass {
private MCRObjectID id;
[…]
@Id
public MCRObjectID getId() {
return id;
}
public void setId(MCRObjectID id) {
this.id = id;
}
[…]
}
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionUse this constructor for quick queries. -
Method Summary
-
Field Details
-
id
-
-
Constructor Details
-
MCRObjectIDPK
Use this constructor for quick queries. Sample-Code:
EntityManager em = […]; em.find(EntityClass.class, new MCRObjectIDPK(MCRObjectID.getInstance('mir_mods_00004711')));
- See Also:
-
MCRObjectIDPK
public MCRObjectIDPK()
-
-
Method Details