|
|
|
@ -490,6 +490,11 @@ public class MappingRelationalConverter extends AbstractRelationalConverter |
|
|
|
return withContext(context.forProperty(property)).hasValue(property); |
|
|
|
return withContext(context.forProperty(property)).hasValue(property); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean hasNonEmptyValue(RelationalPersistentProperty property) { |
|
|
|
|
|
|
|
return withContext(context.forProperty(property)).hasNonEmptyValue(property); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
@Nullable |
|
|
|
@Nullable |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@ -565,6 +570,7 @@ public class MappingRelationalConverter extends AbstractRelationalConverter |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this hasValue should actually check against null
|
|
|
|
if (!valueProviderToUse.hasValue(property)) { |
|
|
|
if (!valueProviderToUse.hasValue(property)) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -608,7 +614,7 @@ public class MappingRelationalConverter extends AbstractRelationalConverter |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else if (contextual.hasValue(persistentProperty)) { |
|
|
|
} else if (contextual.hasNonEmptyValue(persistentProperty)) { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1051,6 +1057,13 @@ public class MappingRelationalConverter extends AbstractRelationalConverter |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
boolean hasValue(RelationalPersistentProperty property); |
|
|
|
boolean hasValue(RelationalPersistentProperty property); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Determine whether there is a non empty value for the given {@link RelationalPersistentProperty}. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param property the property to check for whether a value is present. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
boolean hasNonEmptyValue(RelationalPersistentProperty property); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Contextualize this property value provider. |
|
|
|
* Contextualize this property value provider. |
|
|
|
* |
|
|
|
* |
|
|
|
@ -1072,6 +1085,8 @@ public class MappingRelationalConverter extends AbstractRelationalConverter |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
boolean hasValue(AggregatePath path); |
|
|
|
boolean hasValue(AggregatePath path); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean hasNonEmptyValue(AggregatePath aggregatePath); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Determine whether there is a value for the given {@link SqlIdentifier}. |
|
|
|
* Determine whether there is a value for the given {@link SqlIdentifier}. |
|
|
|
* |
|
|
|
* |
|
|
|
@ -1154,6 +1169,11 @@ public class MappingRelationalConverter extends AbstractRelationalConverter |
|
|
|
return accessor.hasValue(property); |
|
|
|
return accessor.hasValue(property); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean hasNonEmptyValue(RelationalPersistentProperty property) { |
|
|
|
|
|
|
|
return hasValue(property); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Nullable |
|
|
|
@Nullable |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Object getValue(AggregatePath path) { |
|
|
|
public Object getValue(AggregatePath path) { |
|
|
|
@ -1169,6 +1189,7 @@ public class MappingRelationalConverter extends AbstractRelationalConverter |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public boolean hasValue(AggregatePath path) { |
|
|
|
public boolean hasValue(AggregatePath path) { |
|
|
|
|
|
|
|
|
|
|
|
Object value = document.get(path.getColumnInfo().alias().getReference()); |
|
|
|
Object value = document.get(path.getColumnInfo().alias().getReference()); |
|
|
|
|
|
|
|
|
|
|
|
if (value == null) { |
|
|
|
if (value == null) { |
|
|
|
@ -1179,6 +1200,18 @@ public class MappingRelationalConverter extends AbstractRelationalConverter |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean hasNonEmptyValue(AggregatePath path) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!hasValue(path)) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object value = document.get(path.getColumnInfo().alias().getReference()); |
|
|
|
|
|
|
|
|
|
|
|
if (value instanceof Collection<?> || value.getClass().isArray()) { |
|
|
|
if (value instanceof Collection<?> || value.getClass().isArray()) { |
|
|
|
return !ObjectUtils.isEmpty(value); |
|
|
|
return !ObjectUtils.isEmpty(value); |
|
|
|
} |
|
|
|
} |
|
|
|
|