Core Value Types

The datastore supports the following core value types:

Type Java class Sort order Notes
short text, <= 500 characters java.lang.String Unicode A value longer than 500 characters throws a IllegalArgumentException.
short byte array, <= 500 bytes com.google.appengine.api.datastore.ShortBlob byte order A value longer than 500 bytes throws a IllegalArgumentException.
Boolean value boolean or java.lang.Boolean false < true
integer short, java.lang.Short, int, java.lang.Integer, long, java.lang.Long Numeric Stored as long integer, then converted to the field type. Out-of-range values overflow.
floating point number float, java.lang.Float, double, java.lang.Double Numeric Stored as double-width float, then converted to the field type. Out-of-range values overflow.
date-time java.util.Date Chronological
enumjava.lang.EnumUnicode Stored as Enum#name()
Google account com.google.appengine.api.users.User By email address (Unicode)
long text
com.google.appengine.api.datastore.Text (not orderable) Not indexed.
long byte array
com.google.appengine.api.datastore.Blob (not orderable) Not indexed.
entity key com.google.appengine.api.datastore.Key, or the referenced object (as a child) By path elements (kind, ID or name, kind, ID or name...)
a category com.google.appengine.api.datastore.Category Unicode
an email address com.google.appengine.api.datastore.Email Unicode
a geographical point com.google.appengine.api.datastore.GeoPt By latitude, then longitude
an instant messaging handle com.google.appengine.api.datastore.IMHandle Unicode
a URL com.google.appengine.api.datastore.Link Unicode
a phone number com.google.appengine.api.datastore.PhoneNumber Unicode
a postal address com.google.appengine.api.datastore.PostalAddress Unicode
a user-provided rating, an integer between 0 to 100 com.google.appengine.api.datastore.Rating Numeric

Next...

Continue to Serializable Objects.


Comments