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( .orElseThrow(
() -> new IllegalArgumentException( () -> new IllegalArgumentException(
String.format( String.format(
"No Person with uuid %s found in the database.", "No Person with UUID %s found in the database.",
id.key.toString() id.key.toString()
) )
) )

View File

@ -102,8 +102,10 @@ import javax.persistence.Table;
+ "WHERE c.category = :category " + "WHERE c.category = :category "
+ "AND c.indexObject = TRUE") + "AND c.indexObject = TRUE")
}) })
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, @JsonIdentityInfo(
property = "uuid") generator = ObjectIdGenerators.PropertyGenerator.class,
property = "uuid"
)
public class Categorization implements Serializable, Relation, Exportable { public class Categorization implements Serializable, Relation, Exportable {
private static final long serialVersionUID = 201504301320L; private static final long serialVersionUID = 201504301320L;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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