Some code cleanup

deploy_packages_to_gitea
Jens Pelzetter 2022-09-26 16:20:18 +02:00
parent 34b81f18f9
commit 03e7d6dfdf
14 changed files with 21 additions and 24 deletions

View File

@ -54,7 +54,7 @@ public class PersonIdResolver implements Serializable, ObjectIdResolver {
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No Person with uuid %s found in the database.",
"No Person with UUID %s found in the database.",
id.key.toString()
)
)

View File

@ -84,10 +84,10 @@ import javax.persistence.Table;
@NamedQuery(
name = "Categorization.findIndexObject",
query = "SELECT c.categorizedObject "
+ "FROM Categorization c "
+ "JOIN c.category a "
+ "WHERE a.uuid = :catuuid "
+ "AND c.indexObject = TRUE"),
+ "FROM Categorization c "
+ "JOIN c.category a "
+ "WHERE a.uuid = :catuuid "
+ "AND c.indexObject = TRUE"),
@NamedQuery(
name = "Categorization.findIndexObjectCategorization",
query = "SELECT c FROM Categorization c "
@ -102,8 +102,10 @@ import javax.persistence.Table;
+ "WHERE c.category = :category "
+ "AND c.indexObject = TRUE")
})
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class,
property = "uuid")
@JsonIdentityInfo(
generator = ObjectIdGenerators.PropertyGenerator.class,
property = "uuid"
)
public class Categorization implements Serializable, Relation, Exportable {
private static final long serialVersionUID = 201504301320L;

View File

@ -56,7 +56,7 @@ public class CategoryIdResolver implements Serializable, ObjectIdResolver {
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No Category with uuid %s in the database.",
"No Category with UUID %s in the database.",
id.key.toString()
)
)

View File

@ -55,7 +55,7 @@ public class DomainIdResolver implements Serializable, ObjectIdResolver {
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No Domain with uuid %s in the database.",
"No Domain with UUID %s in the database.",
id.key.toString()
)
)

View File

@ -56,7 +56,7 @@ public class CcmObjectIdResolver implements Serializable, ObjectIdResolver {
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No CcmObject with uuid %s in the database.",
"No CcmObject with UUID %s in the database.",
id.key.toString()
)
)

View File

@ -57,7 +57,7 @@ public class ResourceIdResolver implements Serializable, ObjectIdResolver {
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No Resource with uuid %s in the database.",
"No Resource with UUID %s in the database.",
id.key.toString()
)
)

View File

@ -56,7 +56,7 @@ public class ResourceTypeIdResolver implements Serializable, ObjectIdResolver {
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No ResourceType with uuid %s in the database.",
"No ResourceType with UUID %s in the database.",
id.key.toString()
)
)

View File

@ -55,7 +55,7 @@ public class GroupIdResolver implements Serializable, ObjectIdResolver {
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No Group with uuid %s in the database.",
"No Group with UUID %s in the database.",
id.key.toString()
)
)

View File

@ -55,7 +55,7 @@ public class PartyIdResolver implements Serializable, ObjectIdResolver {
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No Party with uuid %s in the database.",
"No Party with UUID %s in the database.",
id.key.toString()
)
)

View File

@ -55,7 +55,7 @@ public class RoleIdResolver implements Serializable, ObjectIdResolver {
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No Role with uuid %s in the database.",
"No Role with UUID %s in the database.",
id.key.toString()
)
)

View File

@ -53,7 +53,7 @@ public class ApplicationIdResolver implements Serializable, ObjectIdResolver {
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No ccmApplications with uuid %s in the database.",
"No ccmApplications with UUID %s in the database.",
id.key.toString()
)
)

View File

@ -53,7 +53,7 @@ public class TaskCommentIdResolver implements Serializable, ObjectIdResolver {
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No task comments with uuid %s in the database.",
"No task comments with UUID %s in the database.",
id.key.toString()
)
)

View File

@ -55,7 +55,7 @@ public class TaskIdResolver implements Serializable, ObjectIdResolver {
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No tasks with uuid %s in the database.",
"No tasks with UUID %s in the database.",
id.key.toString()
)
)

View File

@ -48,11 +48,6 @@ public class WorkflowIdResolver implements Serializable, ObjectIdResolver {
@Override
public Object resolveId(final ObjectIdGenerator.IdKey id) {
final CdiUtil cdiUtil = CdiUtil.createCdiUtil();
final WorkflowRepository workflowRepository = cdiUtil.findBean(
WorkflowRepository.class
);
return CdiUtil
.createCdiUtil()
.findBean(WorkflowRepository.class)
@ -60,7 +55,7 @@ public class WorkflowIdResolver implements Serializable, ObjectIdResolver {
.orElseThrow(
() -> new IllegalArgumentException(
String.format(
"No workflows with uuid %s in the database.",
"No workflows with UUID %s in the database.",
id.key.toString()
)
)