From d2da4f7e5238366cff035d2e115c27c092b0c9cb Mon Sep 17 00:00:00 2001 From: Rob Bygrave Date: Thu, 25 Aug 2022 13:12:35 +1200 Subject: [PATCH] Reorder methods on ScalarType only --- .../java/io/ebean/core/type/ScalarType.java | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/ebean-core-type/src/main/java/io/ebean/core/type/ScalarType.java b/ebean-core-type/src/main/java/io/ebean/core/type/ScalarType.java index ae354110e..83433ef69 100644 --- a/ebean-core-type/src/main/java/io/ebean/core/type/ScalarType.java +++ b/ebean-core-type/src/main/java/io/ebean/core/type/ScalarType.java @@ -2,7 +2,6 @@ package io.ebean.core.type; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; - import io.ebean.text.StringFormatter; import io.ebean.text.StringParser; @@ -94,6 +93,11 @@ public interface ScalarType extends StringParser, StringFormatter, ScalarData */ Class type(); + /** + * Return the type this maps to for JSON document stores. + */ + DocPropertyType docType(); + /** * Read the value from the resultSet and convert if necessary to the logical * bean property value. @@ -129,6 +133,14 @@ public interface ScalarType extends StringParser, StringFormatter, ScalarData */ T toBeanType(Object value); + /** + * Convert the string value to the appropriate java object. + *

+ * Mostly used to support CSV, JSON and XML parsing. + */ + @Override + T parse(String value); + /** * Convert the type into a string representation. */ @@ -147,19 +159,6 @@ public interface ScalarType extends StringParser, StringFormatter, ScalarData return formatValue((T) value); } - /** - * Convert the string value to the appropriate java object. - *

- * Mostly used to support CSV, JSON and XML parsing. - */ - @Override - T parse(String value); - - /** - * Return the type this maps to for JSON document stores. - */ - DocPropertyType docType(); - /** * Convert the value into a long version value. */