public class DefaultMatchStrategy extends StrategyBase implements IMatchStrategyEqual, IParsedMatchStrategy
Modifier and Type | Field and Description |
---|---|
protected MatchMode |
defaultCollectionMatchMode |
protected MatchMode |
defaultMatchMatchMode |
protected MatchMode |
defaultMatchMode |
protected java.lang.Class<? extends IMatchable> |
matchClass |
protected java.util.Map<java.lang.String,java.lang.reflect.Field> |
matchFields |
protected Matching |
matching |
DEFAULT_PARSED_COLLECTION_MATCH_MODE, DEFAULT_PARSED_MATCH_MATCH_MODE, DEFAULT_PARSED_MATCH_MODE
DEFAULT_COLLECTION_MATCH_MODE, DEFAULT_MATCH_MATCH_MODE, DEFAULT_MATCH_MODE
Modifier | Constructor and Description |
---|---|
protected |
DefaultMatchStrategy(java.lang.Class<? extends IMatchable> matchClazz) |
Modifier and Type | Method and Description |
---|---|
protected MatchMode |
getDefaultCollectionMatchMode() |
protected MatchMode |
getDefaultMatchMatchMode() |
protected MatchMode |
getDefaultMatchMode() |
java.lang.Class<? extends IMatchable> |
getMatchClass() |
Matching |
getMatching()
Returns the Matching of this match strategy
|
protected java.util.UUID |
getUuid() |
<T extends IMatchable> |
invoke(T matchFirst,
T matchSecond)
Invokes the match check.
|
<T extends IMatchable> |
invoke(T matchFirst,
T matchSecond,
boolean failAll) |
<T extends IMatchable> |
invoke(T matchFirst,
T matchSecond,
MatchResult matchResult,
boolean failAll) |
protected <T extends IMatchable> |
matchSingleCache(T matchFirst,
T matchSecond,
MatchResult result,
java.util.Map<java.lang.String,java.util.List<MatchMode>> replaceMatchers,
CacheMatcher cacheMatcher,
boolean failAll) |
protected <T extends IMatchable> |
matchSingleField(T matchFirst,
T matchSecond,
MatchResult matchResult,
java.util.Map<java.lang.String,java.util.List<MatchMode>> replaceMatchers,
FieldMatcher fieldMatcher,
boolean failAll) |
static DefaultMatchStrategy |
NewInstance(java.lang.Class<? extends IMatchable> matchClazz) |
protected void |
preInitMapping() |
void |
setMatchMode(java.lang.String propertyName,
MatchMode matchMode)
Sets the match mode for property propertyName
|
void |
setMatchMode(java.lang.String propertyName,
MatchMode matchMode,
IMatchStrategy matchStrategy)
Sets the match mode for property propertyName using the given match strategy.
|
isBlank, isCollection, isNotBlank, isPrimitive, isSingleCdmBaseObject, isUserType, Nz
protected MatchMode defaultMatchMode
protected MatchMode defaultCollectionMatchMode
protected MatchMode defaultMatchMatchMode
protected java.lang.Class<? extends IMatchable> matchClass
protected java.util.Map<java.lang.String,java.lang.reflect.Field> matchFields
protected Matching matching
protected DefaultMatchStrategy(java.lang.Class<? extends IMatchable> matchClazz)
public static DefaultMatchStrategy NewInstance(java.lang.Class<? extends IMatchable> matchClazz)
public java.lang.Class<? extends IMatchable> getMatchClass()
protected java.util.UUID getUuid()
getUuid
in class StrategyBase
public Matching getMatching()
IMatchStrategyEqual
getMatching
in interface IMatchStrategy
getMatching
in interface IMatchStrategyEqual
public void setMatchMode(java.lang.String propertyName, MatchMode matchMode) throws MatchException
IMatchStrategyEqual
setMatchMode
in interface IMatchStrategy
setMatchMode
in interface IMatchStrategyEqual
MatchException
#setMatchMode(String, MatchMode, IMatchStrategy)}
public void setMatchMode(java.lang.String propertyName, MatchMode matchMode, IMatchStrategy matchStrategy) throws MatchException
IMatchStrategyEqual
match mode
is none of
the 4 MATCH* match modes like MatchMode.MATCH
or MatchMode.MATCH_REQUIRED
.setMatchMode
in interface IMatchStrategy
setMatchMode
in interface IMatchStrategyEqual
MatchException
#setMatchMode(String, MatchMode)}
public <T extends IMatchable> MatchResult invoke(T matchFirst, T matchSecond) throws MatchException
IMatchStrategyEqual
invoke
in interface IMatchStrategy
invoke
in interface IMatchStrategyEqual
invoke
in interface IParsedMatchStrategy
matchFirst
- The more complete instancematchSecond
- The parsed instance having only few attributes definedMatchException
public <T extends IMatchable> MatchResult invoke(T matchFirst, T matchSecond, boolean failAll) throws MatchException
invoke
in interface IMatchStrategy
MatchException
public <T extends IMatchable> void invoke(T matchFirst, T matchSecond, MatchResult matchResult, boolean failAll) throws MatchException
invoke
in interface IMatchStrategy
MatchException
protected <T extends IMatchable> void matchSingleCache(T matchFirst, T matchSecond, MatchResult result, java.util.Map<java.lang.String,java.util.List<MatchMode>> replaceMatchers, CacheMatcher cacheMatcher, boolean failAll) throws java.lang.IllegalAccessException, MatchException
matchFirst
- matchSecond
- result
- replaceMatchers
- cacheMatcher
- java.lang.IllegalAccessException
MatchException
protected <T extends IMatchable> void matchSingleField(T matchFirst, T matchSecond, MatchResult matchResult, java.util.Map<java.lang.String,java.util.List<MatchMode>> replaceMatchers, FieldMatcher fieldMatcher, boolean failAll) throws java.lang.Exception
matchFirst
- matchSecond
- result
- replaceMatchers
- fieldMatcher
- java.lang.Exception
protected void preInitMapping()
protected MatchMode getDefaultMatchMode()
protected MatchMode getDefaultCollectionMatchMode()
protected MatchMode getDefaultMatchMatchMode()
Copyright © 2007-2020 EDIT. All Rights Reserved.