Table Declaration/**
* @ Hibernate. Class table = "author"
*/
One-to-one
/**
* @ Hibernate. One-to-one cascade = "all" constrained = "true"
*/
Public Person getperson (){
Return Person;
}
Multiple to one, one to multiple
/**
* @ Hibernate. set lazy = "true" inverse = "true" cascade = "all"
* @ Hibernate. Collection-key column = "authorid"
* @ Hibernate. Collection-one-to-register class = "com. CQ. Publication"
*/
PublicSet getpublications (){
ReturnPublications;
}
/**
* @ hibernate. export-to-one column = "authorid"
*/
Public author getauthor () {
return author;
}
many-to-many /**
* @ hibernate. set lazy = "true" table = "author_work"
* @ hibernate. collection-key column = "author_id"
* @ hibernate. collection-tables-to-operate column = "work_id" class = "com. RQ. work "
*/
Public set getworks () {
return works;
}
/**
* @ Hibernate. set lazy = "true" table = "author_work"
* @ Hibernate. Collection-key column = "work_id"
* @ Hibernate. Collection-allow-to-assign column = "author_id" class = "com. RQ. Author"
*/
PublicSet getauthors (){
ReturnAuthors;
}