diff options
author | liamfallon <liam.fallon@est.tech> | 2023-02-02 14:43:12 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2023-02-07 09:17:33 +0000 |
commit | e53df8d3f8ab0464b0876bdb339fa91dc9085cd2 (patch) | |
tree | e01029186ff980f7e00901c28aba09b80a85f8e8 /models-interactions/model-impl/guard | |
parent | e3938e43b8a1f02f74368ecb75c38530285feac0 (diff) |
Replace Eclipselink with Hibernate
Issue-ID: POLICY-4533
Change-Id: I77a6c44c96013963e141265758629cae83e49876
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models-interactions/model-impl/guard')
-rw-r--r-- | models-interactions/model-impl/guard/src/main/java/org/onap/policy/guard/OperationsHistory.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/models-interactions/model-impl/guard/src/main/java/org/onap/policy/guard/OperationsHistory.java b/models-interactions/model-impl/guard/src/main/java/org/onap/policy/guard/OperationsHistory.java index 2ec1f342e..aee57f142 100644 --- a/models-interactions/model-impl/guard/src/main/java/org/onap/policy/guard/OperationsHistory.java +++ b/models-interactions/model-impl/guard/src/main/java/org/onap/policy/guard/OperationsHistory.java @@ -3,7 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2021 Nordix Foundation. + * Modifications Copyright (C) 2021,2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,9 +28,11 @@ import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Index; import javax.persistence.Table; +import javax.persistence.TableGenerator; import lombok.Data; @Entity @@ -44,7 +46,13 @@ public class OperationsHistory implements Serializable { private static final long serialVersionUID = -551420180714993577L; @Id - @GeneratedValue + @GeneratedValue(strategy = GenerationType.TABLE, generator = "opHistoryIdGen") + @TableGenerator( + name = "opHistoryIdGen", + table = "ophistory_id_sequence", + pkColumnName = "SEQ_NAME", + valueColumnName = "SEQ_COUNT", + pkColumnValue = "SEQ_GEN") @Column(name = "id") private Long id; |