From 36edce38f6b17f73322fa38404d6e01818a44fd2 Mon Sep 17 00:00:00 2001
From: rsanchez <rsanchez@curisit.net>
Date: Thu, 11 Dec 2014 19:08:16 +0000
Subject: [PATCH] #2140 fix - Added renew period to pack, change on DB schema, fixed pack selection in listing, upgrade angular to 1.3.6 and other minor issues
---
securis/src/main/java/net/curisit/securis/services/PackResource.java | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/securis/src/main/java/net/curisit/securis/services/PackResource.java b/securis/src/main/java/net/curisit/securis/services/PackResource.java
index a584779..f5cb7d3 100644
--- a/securis/src/main/java/net/curisit/securis/services/PackResource.java
+++ b/securis/src/main/java/net/curisit/securis/services/PackResource.java
@@ -203,13 +203,6 @@
return packs > 0;
}
- private int getNextCodeSuffix(int packId, EntityManager em) {
- TypedQuery<Integer> query = em.createNamedQuery("last-code-suffix-used-in-pack", Integer.class);
- query.setParameter("packId", packId);
- Integer lastCodeSuffix = query.getSingleResult();
- return lastCodeSuffix == null ? 1 : lastCodeSuffix + 1;
- }
-
/**
*
* @return The next available code suffix in pack for license code
@@ -227,7 +220,7 @@
if (packId == null) {
throw new SeCurisServiceException(ErrorCodes.INVALID_DATA, "The pack code is mandatory");
}
- Integer codeSuffix = getNextCodeSuffix(packId, em);
+ Integer codeSuffix = licenseHelper.getNextCodeSuffix(packId, em);
Pack pack = em.find(Pack.class, packId);
;
--
Gitblit v1.3.2