java.lang.Object
io.ebeaninternal.server.type.ScalarTypeWrapper<B,S>
- Type Parameters:
B- the logical typeS- the underlying scalar type this is converted to
- All Implemented Interfaces:
ScalarDataReader<B>,ScalarType<B>,StringFormatter,StringParser
A ScalarType that uses a ScalarTypeConverter to convert to and from another underlying
ScalarType.
Enables the use of a simple interface to add additional scalarTypes.
-
Constructor Summary
ConstructorsConstructorDescriptionScalarTypeWrapper(Class<B> wrapperType, ScalarType<S> scalarType, ScalarTypeConverter<B, S> converter) -
Method Summary
Modifier and TypeMethodDescriptionlongbooleanbinary()voidbind(DataBinder binder, B value) docType()formatValue(B v) ScalarType<?> booleanbooleanintjdbcType()jsonRead(com.fasterxml.jackson.core.JsonParser parser) voidintlength()booleanmutable()read(DataReader reader) toBeanType(Object value) toJdbcType(Object value) toString()type()voidwriteData(DataOutput dataOutput, B value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.ebean.core.type.ScalarType
format, jsonMapper
-
Constructor Details
-
ScalarTypeWrapper
public ScalarTypeWrapper(Class<B> wrapperType, ScalarType<S> scalarType, ScalarTypeConverter<B, S> converter)
-
-
Method Details
-
toString
-
asVersion
- Specified by:
asVersionin interfaceScalarType<B>
-
binary
public boolean binary()- Specified by:
binaryin interfaceScalarType<B>
-
mutable
public boolean mutable()- Specified by:
mutablein interfaceScalarType<B>
-
isDirty
- Specified by:
isDirtyin interfaceScalarType<B>
-
readData
- Specified by:
readDatain interfaceScalarType<B>- Throws:
IOException
-
writeData
- Specified by:
writeDatain interfaceScalarType<B>- Throws:
IOException
-
bind
- Specified by:
bindin interfaceScalarType<B>- Throws:
SQLException
-
jdbcType
public int jdbcType()- Specified by:
jdbcTypein interfaceScalarType<B>
-
length
public int length()- Specified by:
lengthin interfaceScalarType<B>
-
type
- Specified by:
typein interfaceScalarType<B>
-
jdbcNative
public boolean jdbcNative()- Specified by:
jdbcNativein interfaceScalarType<B>
-
formatValue
- Specified by:
formatValuein interfaceScalarType<B>
-
parse
- Specified by:
parsein interfaceScalarType<B>- Specified by:
parsein interfaceStringParser
-
read
- Specified by:
readin interfaceScalarDataReader<B>- Specified by:
readin interfaceScalarType<B>- Throws:
SQLException
-
toBeanType
- Specified by:
toBeanTypein interfaceScalarType<B>
-
toJdbcType
- Specified by:
toJdbcTypein interfaceScalarType<B>
-
getScalarType
-
jsonRead
- Specified by:
jsonReadin interfaceScalarType<B>- Throws:
IOException
-
jsonWrite
public void jsonWrite(com.fasterxml.jackson.core.JsonGenerator writer, B beanValue) throws IOException - Specified by:
jsonWritein interfaceScalarType<B>- Throws:
IOException
-
docType
- Specified by:
docTypein interfaceScalarType<B>
-