How can one convert from String to Text
java.lang.String
to
com.google.appengine.api.datastore.Text;
and vise-versa?
How can one convert from String to Text
java.lang.String
to
com.google.appengine.api.datastore.Text;
and vise-versa?
Check Javadoc about
Text
class. It has two methods:toString()
andgetValue()
. ButtoString()
returns first 70 characters only.So, use
getValue()
instead:Contructor of the
Text
class supports initialization with a string value. And (as Javadoc says), this object cannot be modified after construction.