{"id":650,"date":"2007-11-29T11:18:35","date_gmt":"2007-11-29T02:18:35","guid":{"rendered":"http:\/\/www.kazu.tv\/blog\/?p=650"},"modified":"2007-11-29T11:18:35","modified_gmt":"2007-11-29T02:18:35","slug":"hibernate_annot","status":"publish","type":"post","link":"https:\/\/kazu.tv\/blog\/2007\/11\/29\/hibernate_annot\/","title":{"rendered":"Hibernate Annotations tips \u305d\u306e1"},"content":{"rendered":"<p>\u4eca\u307e\u3067\u3067\u3061\u3087\u3063\u3068\u8a70\u307e\u3063\u305f\u3068\u3053\u308d\u3068\u304b\u3092\u307e\u3068\u3081\u3002<br \/>\n\u25cbGeneration Gap\u30d1\u30bf\u30fc\u30f3<br \/>\nHibernate\u306e\u5165\u9580\u7528\u306e\u3053\u306e<a href=\"http:\/\/www.ogis-ri.co.jp\/otc\/hiroba\/technical\/HibernateForOnsite\/\">\u30da\u30fc\u30b8<\/a>\u306e4.2\u306bGeneration Gap\u30d1\u30bf\u30fc\u30f3\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u3066\u3042\u308b\u3002<br \/>\n\u524d\u63d0\u3068\u3057\u3066\u65e2\u5b58\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f7f\u3046\u3068\u3044\u3046\u72b6\u6cc1\u3092\u60f3\u5b9a\u3002<br \/>\n\u8a73\u7d30\u306f\u7701\u304f\u3068\u3057\u3066\u3001\u3042\u308b\u30c6\u30fc\u30d6\u30eb\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308bJava\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08\u30af\u30e9\u30b9A\u3001\u901a\u5e38\u306f\u81ea\u52d5\u751f\u6210\u3055\u308c\u308b\uff09\u3063\u3066\u30c6\u30fc\u30d6\u30eb\u69cb\u9020\u306e\u5909\u5316\u306b\u3088\u3063\u3066\u5909\u66f4\u3057\u306a\u304d\u3083\u3044\u3051\u306a\u3044\u3093\u3060\u3051\u3069\u3001\u30e6\u30fc\u30b6\u30fc\u30af\u30e9\u30b9\u304c\u30af\u30e9\u30b9A\u3092\u76f4\u63a5\u4f7f\u3046\u5834\u5408\u3001\u305d\u306e\u90fd\u5ea6\u30e6\u30fc\u30b6\u30af\u30e9\u30b9\u3082\u5909\u66f4\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002\u305d\u308c\u306b\u5bfe\u3057\u3066\u3001\u30af\u30e9\u30b9A\u3092\u7d99\u627f\u3057\u305f\u30af\u30e9\u30b9B\u3092\u4f5c\u308a\u30e6\u30fc\u30b6\u30fc\u30af\u30e9\u30b9\u306f\u30af\u30e9\u30b9B\u3092\u4f7f\u3046\u3088\u3046\u306b\u3059\u308c\u3070\u3001\u30c6\u30fc\u30d6\u30eb\u69cb\u9020\u306e\u5909\u5316\uff08\uff1d\u30af\u30e9\u30b9A\u306e\u5909\u5316\uff09\u3092\u30af\u30e9\u30b9B\u3067\u5438\u53ce\u3067\u304d\u308b\u3001\u3068\u3044\u3046\u611f\u3058\u3002<br \/>\n\u5148\u307b\u3069\u306e<a href=\"http:\/\/www.ogis-ri.co.jp\/otc\/hiroba\/technical\/HibernateForOnsite\/\">\u30da\u30fc\u30b8<\/a>\u306f\u901a\u5e38\u306eHibernate\u306e\u5834\u5408\u3060\u3051\u3069\u3001Hibernate Annotations\u3092\u4f7f\u3063\u305f\u5834\u5408\u306f\u3069\u3046\u306a\u308b\u304b\u3002<br \/>\n\u4f8b\u3048\u3070<a href=\"http:\/\/blog.netbeans.jp\/roller\/page\/kishida\/20050605#hibernateannotations_ejb3_12398_12510_12483\">\u3053\u306e\u30da\u30fc\u30b8<\/a>\u306e\u7528\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b9\u30ad\u30fc\u30de\u304b\u3089Hibernate Annotations\u3092\u4f7f\u3063\u305f\u30b3\u30fc\u30c9\u3092\u81ea\u52d5\u751f\u6210\u3055\u305b\u308b\u3068\u3057\u3066\u3001\u3067\u3082\u305d\u306e\u30af\u30e9\u30b9\u3092\u76f4\u63a5\u30e6\u30fc\u30b6\u30fc\u30af\u30e9\u30b9\u304b\u3089\u306f\u4f7f\u308f\u305b\u305f\u304f\u306a\u3044\u5834\u5408\u3002<\/p>\n<p><!--more--><br \/>\n\u3053\u306e\u5834\u5408\u3001\u5148\u307b\u3069\u306e\u4f8b\u3067\u8a00\u3046\u30af\u30e9\u30b9A\u304c\u3053\u3093\u306a\u611f\u3058\u306b\u306a\u308b\u3088\u3046\u306b\u81ea\u52d5\u751f\u6210\u51fa\u6765\u308c\u3070ok\u3002\u30dd\u30a4\u30f3\u30c8\u306f@MappedSuperclass<\/p>\n<div class=\"code\">@MappedSuperclass<br \/>\npublic class BaseTableA {<br \/>\n@Id<br \/>\n@Column(name=&#8221;tableA_id&#8221;)<br \/>\nprotected Integer tableAID;<br \/>\n@Column(name=&#8221;address_1&#8243;, length=20)<br \/>\nprotected String address1;<br \/>\n}<\/div>\n<p>\u3067\u3001\u305d\u308c\u3092\u7d99\u627f\u3059\u308b\u30af\u30e9\u30b9B\uff08\u624b\u66f8\u304d\uff09\u306f\u3053\u3093\u306a\u611f\u3058\u3002\u5916\u90e8\u304b\u3089\u306f\u30d7\u30ed\u30d1\u30c6\u30a3address1\u3060\u3051\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u308b\u3002<\/p>\n<div class=\"code\">@Entity<br \/>\n@Table(name=&#8221;table_a&#8221;)<br \/>\npublic class TableA extends BaseTableA {<br \/>\npublic String getAddress1() {<br \/>\nreturn address1;<br \/>\n}<br \/>\npublic void setAddress1(String address1) {<br \/>\nthis.address1 = address1;<br \/>\n}<br \/>\n}<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Hibernate Annotations\u3067Generation Gap\u30d1\u30bf\u30fc\u30f3\u3092\u5b9f\u88c5\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3044\u3044\u304b\uff1f@MappedSuperclass\u3068\u3044\u3046\u306e\u3092\u4f7f\u3046\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[60],"tags":[197,198,199],"class_list":["post-650","post","type-post","status-publish","format-standard","hentry","category-java","tag-mappedsuperclass","tag-generation-gap","tag-hibernate-annotations"],"_links":{"self":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/posts\/650","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/comments?post=650"}],"version-history":[{"count":0,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/posts\/650\/revisions"}],"wp:attachment":[{"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/media?parent=650"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/categories?post=650"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kazu.tv\/blog\/wp-json\/wp\/v2\/tags?post=650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}