{"id":5888,"date":"2015-07-30T04:13:09","date_gmt":"2015-07-30T02:13:09","guid":{"rendered":"http:\/\/blog.wenzlaff.de\/?p=5888"},"modified":"2022-05-13T17:02:22","modified_gmt":"2022-05-13T15:02:22","slug":"ecore-wie-kann-ein-java-attribut-fuer-die-hibernate-suche-im-ecore-modell-annotiert-werden","status":"publish","type":"post","link":"http:\/\/blog.wenzlaff.de\/?p=5888","title":{"rendered":"Ecore: Wie kann ein Java Attribut f\u00fcr die Hibernate Suche im Ecore Modell annotiert werden?"},"content":{"rendered":"<p>Wie kann in einer Java Klasse ein Attribut f\u00fcr die Hibernate-Suche wie folgt annotiert werden?<\/p>\n<pre class=\"lang:java decode:true \" >\r\n@Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO)\r\nprivate String klinik_name = null;\r\n<\/pre>\n<p>Dazu folgende EAnnotation als Value mit den voll qualifizierter Namen einf\u00fcgen, damit auch die imports aufgel\u00f6st werden k\u00f6nnen  <\/p>\n<pre class=\"lang:java decode:true \" >\r\n@org.hibernate.search.annotations.Field(index=org.hibernate.search.annotations.Index.YES, analyze=org.hibernate.search.annotations.Analyze.YES, store=org.hibernate.search.annotations.Store.NO)\r\n<\/pre>\n<p><a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/07\/Bildschirmfoto-2015-07-29-um-20.19.10.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/07\/Bildschirmfoto-2015-07-29-um-20.19.10.png\" alt=\"ecore value\" width=\"1360\" height=\"245\" class=\"aligncenter size-full wp-image-5891\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/07\/Bildschirmfoto-2015-07-29-um-20.19.10.png 1360w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/07\/Bildschirmfoto-2015-07-29-um-20.19.10-300x54.png 300w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/07\/Bildschirmfoto-2015-07-29-um-20.19.10-1024x184.png 1024w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/07\/Bildschirmfoto-2015-07-29-um-20.19.10-900x162.png 900w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/07\/Bildschirmfoto-2015-07-29-um-20.16.49.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/07\/Bildschirmfoto-2015-07-29-um-20.16.49.png\" alt=\"ecore annotation\" width=\"1225\" height=\"196\" class=\"aligncenter size-full wp-image-5890\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/07\/Bildschirmfoto-2015-07-29-um-20.16.49.png 1225w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/07\/Bildschirmfoto-2015-07-29-um-20.16.49-300x48.png 300w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/07\/Bildschirmfoto-2015-07-29-um-20.16.49-1024x164.png 1024w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2015\/07\/Bildschirmfoto-2015-07-29-um-20.16.49-900x144.png 900w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<p>Und f\u00fcr die Maven <code>pom.xml<\/code>, den folgenden Eintrag, damit die Hibernate Klassen auch gefunden werden k\u00f6nnen:<\/p>\n<pre class=\"lang:default decode:true \" >\r\n&lt;!-- F\u00fcr die Hibernate Volltext-Suche --&gt;\r\n\t\t&lt;dependency&gt;\r\n\t\t   &lt;groupId&gt;org.hibernate&lt;\/groupId&gt;\r\n\t\t   &lt;artifactId&gt;hibernate-search-orm&lt;\/artifactId&gt;\r\n\t\t   &lt;version&gt;5.3.0.Final&lt;\/version&gt;\r\n\t\t&lt;\/dependency&gt;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Wie kann in einer Java Klasse ein Attribut f\u00fcr die Hibernate-Suche wie folgt annotiert werden? @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO) private String klinik_name = null; Dazu folgende EAnnotation als Value mit den voll qualifizierter Namen einf\u00fcgen, damit auch die imports aufgel\u00f6st werden k\u00f6nnen @org.hibernate.search.annotations.Field(index=org.hibernate.search.annotations.Index.YES, analyze=org.hibernate.search.annotations.Analyze.YES, store=org.hibernate.search.annotations.Store.NO) Und f\u00fcr die Maven pom.xml, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/blog.wenzlaff.de\/?p=5888\" class=\"more-link\"><span class=\"screen-reader-text\">\u201eEcore: Wie kann ein Java Attribut f\u00fcr die Hibernate Suche im Ecore Modell annotiert werden?\u201c <\/span>weiterlesen<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[220,5,79,8],"tags":[2155,105,2177,2139,2154,2150,2152,2148,2153,2151],"class_list":["post-5888","post","type-post","status-publish","format-standard","hentry","category-anleitung","category-java","category-programmierung","category-uml","tag-analyse-attribut","tag-annotation","tag-eclipse","tag-ecore","tag-field","tag-hibernate","tag-hibernate-suche","tag-modell","tag-search","tag-suche"],"_links":{"self":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/5888","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5888"}],"version-history":[{"count":0,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/5888\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5888"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}