From 41fbf12b4d4681cde925a438b822bb46cd68d1bb Mon Sep 17 00:00:00 2001 From: Brad Gonzales Date: Thu, 9 May 2013 08:05:49 -0500 Subject: [PATCH] Issue #1970 added annotation comment to PluginDataObject header. Change-Id: Ic6612278d98f862e0d1ba3d504a0391cf59f6a52 Former-commit-id: 36345cc166f406a80f2a5795ba7db866918ecdb7 [formerly 90d93e2a029800e8a7f151cc0d76b80e0998900b] [formerly ed59927d6200b1cd067828d1c55c050a3dd8075d [formerly a84978566dda2f943dff31f61c30ee286d961fd1]] Former-commit-id: ed59927d6200b1cd067828d1c55c050a3dd8075d Former-commit-id: 877fbacffefdddcaf7bffd34a2a5b8b8ba178b67 --- .../common/dataplugin/PluginDataObject.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/PluginDataObject.java b/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/PluginDataObject.java index 439ff831a6..2e98097087 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/PluginDataObject.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin/src/com/raytheon/uf/common/dataplugin/PluginDataObject.java @@ -65,6 +65,26 @@ import com.raytheon.uf.common.util.ConvertUtil; * plugin specific data type would be called SatelliteRecord. * *
+ * Hibernate Annotation Requirements for "@Entity" annotated classes that are subclasses
+ * of PluginDataObject
+ * 
+ * 1) If it is not abstract and not a super class for "@Entity" annotated
+ * subclasses, then add a SequenceGenerator annotation:
+ * "@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "
+ * seq")"
+ * 
+ * 2) If it is abstract and a super class for @Entity annotated subclasses:
+ * 
+ * - if there are "@ManyToOne" or "@OneToMany" relationships to the class, then
+ * an "@Entity" annotation has to be used otherwise use a "@MappedSuperClass"
+ * annotation
+ * 
+ * - Add an "@Inheritance" annotation
+ * "@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)"
+ * 
+ * - Add an "@Sequence" annotation
+ * "@SequenceGenerator(name = PluginDataObject.ID_GEN)"
+ * 
  * SOFTWARE HISTORY
  * Date         Ticket#     Engineer    Description
  * ------------ ----------  ----------- --------------------------