How to write data in your Google App Engine data store on com.google.appengine.api.datastore.Text

I have a persistent object with a string property that often is over 500 characters. The Google App Engine says I need to save it as com.google.appengine.api.datastore.Text.

How to convert the String type to the com.google.appengine.api.datastore.Text type so that I can use the setMethod () property in the property, or otherwise get my long sting data into this constant value?

+3
source share
2 answers
setMethod(new Text(longStringValue));

String value = text.getValue();

String Text, , . String Text , ( , , , ). , .

+6

String com.google.appengine.api.datastore.Text,

Text myText = new Text(myString);
+2

Source: https://habr.com/ru/post/1736432/


All Articles