Browse Source

Removed census validator packages interfaces created

Andrew Grant 6 tháng trước cách đây
mục cha
commit
72281fa384

+ 17 - 0
src/main/java/scot/carricksoftware/grants/validators/census/census/CensusCommandValidatorNonNumeric.java

@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grants.validators.census.census;
+
+import org.springframework.validation.BindingResult;
+import scot.carricksoftware.grants.commands.census.CensusCommand;
+
+
+public interface CensusCommandValidatorNonNumeric {
+
+    @SuppressWarnings("unused")
+    void validate(CensusCommand censusCommand, BindingResult bindingResult);
+}
+

+ 1 - 1
src/main/java/scot/carricksoftware/grants/validators/census/census/CensusCommandValidatorNonNumericImpl.java

@@ -12,7 +12,7 @@ import scot.carricksoftware.grants.constants.ApplicationConstants;
 import scot.carricksoftware.grants.constants.ValidationConstants;
 
 @Component
-public class CensusCommandValidatorNonNumericImpl  {
+public class CensusCommandValidatorNonNumericImpl implements CensusCommandValidatorNonNumeric {
 
     public void validate(CensusCommand censusCommand, BindingResult bindingResult) {
         validateDate(censusCommand, bindingResult);

+ 17 - 0
src/main/java/scot/carricksoftware/grants/validators/census/census/CensusCommandValidatorNumeric.java

@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grants.validators.census.census;
+
+import org.springframework.validation.BindingResult;
+import scot.carricksoftware.grants.commands.census.CensusCommand;
+
+
+public interface CensusCommandValidatorNumeric {
+
+    @SuppressWarnings("unused")
+    void validate(CensusCommand censusCommand, BindingResult bindingResult);
+}
+

+ 1 - 2
src/main/java/scot/carricksoftware/grants/validators/census/census/CensusCommandValidatorNumericImpl.java

@@ -12,7 +12,7 @@ import scot.carricksoftware.grants.constants.ApplicationConstants;
 import scot.carricksoftware.grants.constants.ValidationConstants;
 
 @Component
-public class CensusCommandValidatorNumericImpl {
+public class CensusCommandValidatorNumericImpl implements CensusCommandValidatorNumeric{
 
     public void validate(CensusCommand censusCommand, BindingResult bindingResult) {
 
@@ -22,7 +22,6 @@ public class CensusCommandValidatorNumericImpl {
         validateRoomsOccupied(censusCommand, bindingResult);
         validateUninhabitedHouses(censusCommand, bindingResult);
         validateInhabitedHouses(censusCommand, bindingResult);
-
     }