Tidy up TypeManager API after #2435

This commit is contained in:
Rob Bygrave committed 2021-11-26 14:55:16 +13:00
1 parent d05a77e755
commit 268146df85
3 files changed
+4 -4

No files matched your search

@@ -172,7 +172,7 @@ public final class DeployUtil {
*/
void setDbArray(DeployBeanProperty prop, DbArray dbArray) {
Class<?> type = prop.getPropertyType();
ScalarType<?> scalarType = typeManager.getArrayScalarType(type, dbArray, prop.getGenericType(), prop.isNullable());
ScalarType<?> scalarType = typeManager.getArrayScalarType(type, prop.getGenericType(), prop.isNullable());
if (scalarType == null) {
throw new RuntimeException("No ScalarType for @DbArray type for [" + prop.getFullBeanName() + "]");
}
@@ -257,7 +257,7 @@ public final class DefaultTypeManager implements TypeManager {
ParameterizedType pt = (ParameterizedType)propertyType;
Type rawType = pt.getRawType();
if (List.class == rawType || Set.class == rawType) {
return getArrayScalarType((Class<?>)rawType, null, propertyType, true);
return getArrayScalarType((Class<?>)rawType, propertyType, true);
}
}
return getScalarType(propertyClass);
@@ -298,7 +298,7 @@ public final class DefaultTypeManager implements TypeManager {
}
@Override
public ScalarType<?> getArrayScalarType(Class<?> type, DbArray dbArray, Type genericType, boolean nullable) {
public ScalarType<?> getArrayScalarType(Class<?> type, Type genericType, boolean nullable) {
Type valueType = getValueType(genericType);
if (type.equals(List.class)) {
return getArrayScalarTypeList(valueType, nullable);
@@ -71,7 +71,7 @@ public interface TypeManager {
/**
* Return the ScalarType used to handle DB ARRAY.
*/
ScalarType<?> getArrayScalarType(Class<?> type, DbArray dbArray, Type genericType, boolean nullable);
ScalarType<?> getArrayScalarType(Class<?> type, Type genericType, boolean nullable);
/**
* Return the ScalarType used to handle HSTORE (Map<String,String>).