Details
-
Sub-task
-
Status: Resolved
-
Low
-
Resolution: Fixed
-
None
Description
Presently, o.a.c.cql.Term.getByteBuffer manage's the conversion from a parsed term to a ByteBuffer of the right contents, this should be moved into the individual AbstractType subclasses (aka AbstractType.fromString).
Additionally, a method that does the inverse (returning the string equivalent), needs to exists such that AbstractType.getString(AbstractType.fromString(s)) == s
Finally, for use in results decoding a method should exist that given a ByteBuffer will return the appropriate object for that type. For example, IntegerType.compose(ByteBuffer) -> java.math.BigInteger, or LexicalUUIDType.compose(ByteBuffer) -> java.util.UUID.