summaryrefslogtreecommitdiffstats
path: root/models-dao
AgeCommit message (Collapse)AuthorFilesLines
2022-03-10Update snapshot and/or references of policy/models to latest snapshotsliamfallon1-1/+1
policy/models updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-3982 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: Ia409ca1501edff6e1014d06a7fdee805befc5e17
2022-02-16Fix issue with GeneratedValue in PfGeneratedIdKeya.sreekumar5-421/+4
PfGeneratedIdKey class (which is used as a composite key in JpaPolicyAudit and JpaPdpStatistics) uses GeneratedValue in a wrong way and not according to the specification. This review fixes it. PfGeneratedIdKey class is removed, and the generatedId is directly specified in the JpaPolicyAudit and JpaPdpStatistics classes. Note: These classes are only used by PAP, so the related methods for db interaction is removed as PAP directly talks to DB using spring repository layer. Also the only end result this change brings is that the 'generatedId' alone will be used as the primary key instead of 'generatedId, name and version' together. Corresponding changes in DB Migrator: https://gerrit.onap.org/r/c/policy/docker/+/127139 PAP: https://gerrit.onap.org/r/c/policy/pap/+/127130 Change-Id: Ib4ea8b60ffe5c2480746569c0354bf474a6b7006 Issue-ID: POLICY-3897 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2021-11-26Update snapshot of policy/models to 2.6.1-SNAPSHOTliamfallon1-1/+1
*** This commit is generated by a PF release script *** This commit updates the snapshot of the repo to the next patch version. Issue-ID: POLICY-3827 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I7cdc8887455227b8315598add584593188332729
2021-11-03Fix Db connection issues in TOSCA control loopFrancescoFioraEst1-0/+520
Issue-ID: POLICY-3153 Change-Id: I28a7962027a9cb383238a6d3765a46a905f8e58b Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
2021-10-14Bump policy/models to Jakarta 2.6.0-SNAPSHOTliamfallon1-1/+1
Issue-ID: POLICY-3696 Change-Id: I66ec28e3a51a8f388b56ccbf211f71698cf5e8aa Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-10-13Bump policy/models to 2.5.2-SNAPSHOTliamfallon1-1/+1
Issue-ID: POLICY-3696 Change-Id: Idbdbbe56e5daac2ce8ce780d2c8ce5ff54b8e006 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-09-15Bump policy-models to 2.5.1-SNAPSHOTliamfallon1-1/+1
Issue-ID: POLICY-3587 Change-Id: Idca2237777c1f7bda3fab89934dc97b9360fbc3d Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-08-20Fix sonars in modelsJim Hahn1-1/+1
Fixed: - use "var" - change constructor to protected - add equals() to subclasses Issue-ID: POLICY-3094 Change-Id: Ia62716b1a740b4475e54e496330f50aa7fb404d7 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-21Fix new checkstyle issues in modelsJim Hahn1-7/+8
The new version of checkstyle identified new issues. Fixed those. Issue-ID: POLICY-3094 Change-Id: I85314bc0249cba0020a0aefbc250851a2b646dd9 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-21Use lombok for events, base, daoJim Hahn3-79/+11
Issue-ID: POLICY-3396 Change-Id: I7b37efc13a25e0e27d63a85a3ee291e91a4e1682 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-15Replace method parameters with filter parametersJim Hahn2-30/+66
Added more methods taking filter parameters instead of individual method parameters. Removed the old methods. Added genOrderClause(). Issue-ID: POLICY-3094 Change-Id: Ie9d8c13a8d4a7f81e284f07fce3d96a35918a114 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-14Fix sonars in policy-modelsJim Hahn6-145/+190
Fixed: - too many parameters in method call Fixed it by introducing PfFilterParameters. However, classes having the Builder annotation are not easily subclassed, so introduced an interface, too. Issue-ID: POLICY-3094 Change-Id: Ida99522a542b1296b367c55b7e8f8e83783c2e4f Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-02Merge "Handling Policy deploy/undeploy audit models"Jim Hahn3-7/+40
2021-05-28No-sonar on the wrong lineJim Hahn1-2/+2
Tried putting NOSONAR comment at the end of the statement, because it seems like checkstyle/sonar doesn't like comments in the middle of a statement. Nonetheless, sonar still reports an issue on the line with the "SELECT" statement, so I guess there's no choice but to move NOSONAR to the end of that line. Issue-ID: POLICY-3094 Change-Id: If26ad0b1e7dcc9c7aa963da10a9c5160a8fe272d Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-28Handling Policy deploy/undeploy audit modelsadheli.tavares3-7/+40
Added a new Entity to store information when a Pdp Policy is deployed or undeployed and its create/retrieve methods. Change-Id: I35b3608c878bbfbbee0a99a124d100a48fe08131 Issue-ID: POLICY-2899 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2021-05-27Fix more sonars in modelsJim Hahn2-2/+9
Fixed sonars: - SQL injection - use re2j instead of regex Issue-ID: POLICY-3094 Change-Id: I553bd6aa5832d71a5ac33320e2d0d022f9a00e98 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-12Fix sonars in policy modelsJim Hahn3-34/+31
Fixed: - a few other "var" cases - use re2j instead of java.util.regex - use correct class for constants - remove unused constants Issue-ID: POLICY-3094 Change-Id: Ifcb2b0623e8df0527f0a279e666d062422978ded Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-27Add correct filter type prefix to queryktimoney7-1/+217
Added unit tests Issue-ID: POLICY-3247 Change-Id: I27474948619b7256a1e504611531eecac15c27c1 Signed-off-by: ktimoney <kevin.timoney@est.tech>
2021-04-22Add a new key class which uses @GeneratedValue to base classesktimoney10-81/+692
This will provide an alternative unique key. It will be used in place of PfTimestampKey in the PdpStatistics table. We make use of the @GeneratedValue annotation to provide this feature. Added DummyGeneratedIdEntity and unit tests Added PfFilterFactory class Added new filter classes Issue-ID: POLICY-3189 Change-Id: I097eab318d2cb958e1157e35825fd6d35d429a25 Signed-off-by: ktimoney <kevin.timoney@est.tech>
2021-04-12Close DB in junitsJim Hahn1-6/+13
Modified some of the junits to close the DB. In addition, one of the junits was apparently dependent on a previous test method adding records to the DB, thus the test methods were actually order dependent, even though no annotations were used to enforce the order. Modified that method to insert the data, itself, so the test methods are no longer order dependent. Issue-ID: POLICY-3171 Change-Id: I778c12796340f2a665b4ba00588c823c925c078c Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-08Use distinct names in DB junitsJim Hahn1-3/+3
Junits for models often use the same memory DB name which may leave garbage in the DB from one test to the next. Modified the code to use distinct names for each XxxTest class. Issue-ID: POLICY-3171 Change-Id: I2a4a0b4949d532d6949f5d39396288c54d03688b Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-19Fix write failure on PDP statisticsliamfallon1-1/+2
Due to the precision of time stamps being saved to the nearest second, a millisecond precision timestamp was being compared to a second precision timestamp, causing the write to fail. This change fixes that. A unit test is also added to test for this on the provider. In addition, a USE-MARIADB flag is being introduced, which allows unit tests to be run against a locally installed MariaDB instance so that the unit tests can be verified against MariaDB locally rather than H2, the default in Gerrit. Issue-ID: POLICY-3146 Change-Id: I878f160956e89506743dc074679ee81ac1c48216 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-03-10Bump version to 2.5.0 in modelsJim Hahn1-1/+1
Issue-ID: POLICY-3105 Change-Id: I01fe35f16609f9b8d98fb2083c8b18fc7ce3ccf3 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-10Merge "Add support for localName based filtering in PfReferenceTimestamp key."Jim Hahn1-3/+8
2021-03-09Bump models to 2.4.2-SNAPSHOTJim Hahn1-1/+1
Issue-ID: POLICY-3127 Change-Id: Ie37871c54dc5e7eab0ee7d553c6b38ea0e720a29 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-09Add support for localName based filtering in PfReferenceTimestamp key.rameshiyer271-3/+8
Issue : Currently we have a requirement to filter control loop statistics based on the UUID of the element which is "localName" of the PfREferenceTimestamp key. Adding UUID as part of filterMap in getFiltered() method which also requires this minor change in buildFilter. Issue-ID: POLICY-3051 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: Idb9f4fc47c439f84bf8fc784bd9e228a2e05d8e9
2021-03-03Fix Reference Key columns persistence issue in dbrameshiyer272-9/+53
Problem: When PfReferenceTimestamp Key is persisted in db, the parent class fields are ignored which causes inconsistent data while saving and fetching in db. Fix: JPA is not supporting inheritance in @Embeddable classes. Hence included the super class as @Embedded property in PfReferenceTimestamp key. @Embedded properties are unable to be queried directly. Slightly modified Dao methods to support querying @embedded fields. Issue-ID: POLICY-3049 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: I5c2e03a5ae98525764a64dd6cce1a1298c5f9816
2021-02-23Bump models to 2.4.1-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-3088 Change-Id: I7f6cc0ab5299200315c78f6e6c79c79349d2608c Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2021-02-19Refactor timestamp property in policy models to use Instantrameshiyer273-18/+19
Updated JPA classes to use java.sql.TImestamp rather than Instant. Issue-ID: POLICY-3069 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: If5b874ec96931d4b8dd142d46a9980e83a4708fc
2021-01-15Do not log filter to error logJim Hahn1-1/+1
The DAO code was logging the query filter to the error log. Modified to log it to the debug log. Issue-ID: POLICY-2648 Change-Id: I372c77cb4fa1e5c4cb645d82b26ab0bba4a00826 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-12Add more methods to query deployment statusJim Hahn2-1/+32
Issue-ID: POLICY-2648 Change-Id: I398fa1332eb5a862dabd97ed409ef6413bb0c202 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-12-17Use ValidationResult for models v2.0Jim Hahn3-11/+18
Policy models uses PfValidationXxx classes which are totally unrelated to ValidationResult in policy common. This precludes the use of various utility methods and annotations for doing validation. Modified policy models to use ValidationResult instead. This approach uses function calls, though a future approach could make use of annotations instead. Issue-ID: POLICY-2648 Change-Id: I9760f1dc46902ab6bef7f440f3caf5e951660a5d Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-27Bump models master to 2.4.0 SNAPSHOTJim Hahn1-1/+1
Bumping minor version now that guilin branch has been created. Issue-ID: POLICY-2875 Change-Id: Iec7868062610a3acca6f883f999615ccc109f850 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-19Bump models to 2.3.6 snapshotJim Hahn1-1/+1
Issue-ID: POLICY-2869 Change-Id: I98223c20d6d1d6d9bf5bd958d9d3ed4aacdf17e6 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-09Bump models to 2.3.5Jim Hahn1-1/+1
Issue-ID: POLICY-2863 Change-Id: Iba0dfe78576a2ad1551c165e3b9f53fa3c55259a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-09Bump models to 2.3.4 snapshotJim Hahn1-1/+1
Issue-ID: POLICY-2863 Change-Id: I9d764a0cd695aa95a5880fd20b594e465d14c658 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-07Bump models to 2.3.3Jim Hahn1-1/+1
Issue-ID: POLICY-2839 Change-Id: Ifd7f45854904545b4f2973e1429cb791ac00b600 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-08Bump models to 2.3.2Jim Hahn1-1/+1
Issue-ID: POLICY-2789 Change-Id: I19b397ecb165bea30059142d9d4c5357ceba9825 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-25Address more sonar issues in policy-modelsJim Hahn1-5/+1
Addressed sonar issues: - diamond operator Also removed a number of the "NOSONAR" comments now that we know how to address them without disabling sonar. Issue-ID: POLICY-2714 Change-Id: I440f4fa955968fd911616c2b6ee61b4b4d013821 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-20Sonar Fixes policy/models, removing model-yamluj426b1-7/+6
Change-Id: Icd82ea1aef90e4d638b13958519aac5ed5a53f73 Issue-ID: POLICY-2714 Signed-off-by: uj426b <uj426b@att.com>
2020-07-09Bump policy/models to 2.3.1-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2695 Change-Id: I64473cc81ae48942010472f15faac75c13cb0b7d Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-06-18Changes for Checkstyle 8.32liamfallon7-14/+0
Issue-ID: POLICY-2188 Change-Id: I6db16763c1d2d80ff934302081a8dfc16afa7d9a Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-05-19Bump models master to 2.3.0-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2514 Change-Id: I6a3d4e588a0ff0d15fccf49de66c51ea7d709b4b Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-05-19Bump models to 2.2.7-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2514 Change-Id: Ie482926a56a5250be5d78a97aa7c1c19311a292c Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-04-24Bump models patch 2.2.6-SNAPSHOTPamela Dragosh1-1/+1
Also point to parent, common snapshots Issue-ID: POLICY-2510 Change-Id: Iad79c341bcfb8cb6bb828ee71e199ba3bb9a838b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-04-14Bump models to 2.2.5-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2378 Change-Id: I5461bafd3c2d19f4f457da0816bba117a2d8b550 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-04-11Bump models patch 2.2.4-SNAPSHOTPamela Dragosh1-1/+1
Issue-ID: POLICY-2378 Change-Id: I51c6c57bdcc0299c25b5ee05f47c20f4542bc02d Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-04-07Address sonar issues in modelsJim Hahn3-37/+26
Addressed the following sonar issues: - use RE2 instead of java.util Pattern for "+" and "*" - don't use deprecated methods - for Date(long), sonar appeared not to parse the argument's type correctly. Modified the code slightly to make sonar happy - duplicate blocks of code - either log or throw - missing assert in junit - for SDNR & VFC, eliminated threads, as they are unnecessary - duplicate code block in different branches - useless assignments - redeclaring abstract methods - cyclomatic complexity - used lombok in some cases (e.g., EqualsAndHashCode) - assert argument order - actually deleted ControlLoopTargetType, because it is not needed and sonar complains regardless of which order is used - add private constructor to utility classes - use StandardCharsets instead of literals Also: - added logback-test.xml to SO to eliminate the voluminous output from the junit test Issue-ID: POLICY-2305 Change-Id: I586c331781bedbd54a115a71847d04d293689445 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-03-25Bump models 2.2.3-SNAPSHOTPamela Dragosh1-1/+1
Released 2.2.2 Issue-ID: POLICY-2378 Change-Id: I829f0dfc88aeaf1f9b7efad91c983628f2a5d706 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-24Bump policy-models to version 2.2.2-SNAPSHOTliamfallon1-1/+1
Issue-ID: POLICY-2378 Change-Id: I644e45822154f57d2bf6a81e55df07e2e4ca6966 Signed-off-by: liamfallon <liam.fallon@est.tech>