|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.appengine.api.datastore.DataTypeUtils
public final class DataTypeUtils
DataTypeUtils
presents a simpler interface that allows
user-code to determine what Classes can safely be stored as
properties in the data store.
Currently this list includes:
String
(but not StringBuffer
),
Byte
through Long
, Float
and Double
, but not BigInteger
or BigDecimal
.
Key
, for storing references to other Entity
objects.
User
, for storing references to users.
ShortBlob
, for storing binary data small enough to be indexed.
This means properties of this type, unlike Blob
properties, can be
filtered and sorted on in queries.
Blob
, for storing binary data too large to be indexed.
Text
, for storing String data too large to be indexed.
Date
.
Link
.
Field Summary | |
---|---|
static int |
MAX_LINK_PROPERTY_LENGTH
|
static int |
MAX_SHORT_BLOB_PROPERTY_LENGTH
This is the maximum number of bytes that a ShortBlob property
can contain. |
static int |
MAX_STRING_PROPERTY_LENGTH
This is the maximum number of characters that a string property can contain. |
Method Summary | |
---|---|
static void |
checkSupportedValue(java.lang.Object value)
If the specified object cannot be used as the value for a Entity property, throw an exception with the appropriate
explanation. |
static java.util.Set<java.lang.Class<?>> |
getSupportedTypes()
Returns an unmodifiable Set of supported Class
objects. |
static boolean |
isSupportedType(java.lang.Class<?> clazz)
Returns true if and only if the supplied Class can be
stored in the data store. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_STRING_PROPERTY_LENGTH
Text
.
public static final int MAX_SHORT_BLOB_PROPERTY_LENGTH
ShortBlob
property
can contain. If your data is larger, you need to use a Blob
.
public static final int MAX_LINK_PROPERTY_LENGTH
Method Detail |
---|
public static void checkSupportedValue(java.lang.Object value)
Entity
property, throw an exception with the appropriate
explanation.
java.lang.NullPointerException
- if the specified value is null
java.lang.IllegalArgumentException
- if the type is not supported, or
if the object is in some other way invalid.public static boolean isSupportedType(java.lang.Class<?> clazz)
Class
can be
stored in the data store.
public static java.util.Set<java.lang.Class<?>> getSupportedTypes()
Set
of supported Class
objects.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |