-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Case normalize #1027
base: mappings
Are you sure you want to change the base?
Case normalize #1027
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good overall. minor comments.
@@ -0,0 +1,88 @@ | |||
package zingg.common.core.preprocess.caseNormalize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
java packages should have all lowercase. we messed up at infraForTest but lets follow the convention
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public abstract class CaseNormalizer<S,D,R,C,T> implements IMultiFieldPreprocessor<S,D,R,C,T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to break it down into one abstract class AMultiFieldPreproc and then extend it. So other multi preprocs would not need to define any of the getter setters
|
||
@Override | ||
public boolean isApplicable() { | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should return true only when you have string fields
List<String> stringFields = new ArrayList<>(); | ||
for (FieldDefinition fieldDefinition : fieldDefinitions) { | ||
if (fieldDefinition.dataType != null && fieldDefinition.matchType != null && | ||
fieldDefinition.dataType.equalsIgnoreCase(STRING_TYPE) && !fieldDefinition.matchType.contains(MatchTypes.DONT_USE)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets discuss this. so far we have always abstracted dataType
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor changes
No description provided.