<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0-google-internal) on Thu Dec 03 14:16:50 CST 2009 --> <TITLE> Entity </TITLE> <META NAME="date" CONTENT="2009-12-03"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../dev_javadoc.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Entity"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../com/google/appengine/api/datastore/Email.html" title="class in com.google.appengine.api.datastore"><B>PREV CLASS</B></A> <A HREF="../../../../../com/google/appengine/api/datastore/EntityNotFoundException.html" title="class in com.google.appengine.api.datastore"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?com/google/appengine/api/datastore/Entity.html" target="_top"><B>FRAMES</B></A> <A HREF="Entity.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> com.google.appengine.api.datastore</FONT> <BR> Class Entity</H2> <PRE> java.lang.Object <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>com.google.appengine.api.datastore.Entity</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, java.lang.Cloneable</DD> </DL> <HR> <DL> <DT><PRE>public final class <B>Entity</B><DT>extends java.lang.Object<DT>implements java.lang.Cloneable, java.io.Serializable</DL> </PRE> <P> <code>Entity</code> is the fundamental unit of data storage. It has an immutable identifier (contained in the <code>Key</code>) object, a reference to an optional parent <code>Entity</code>, a kind (represented as an arbitrary string), and a set of zero or more typed properties. <P> <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../../../serialized-form.html#com.google.appengine.api.datastore.Entity">Serialized Form</A></DL> <HR> <P> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Field Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#KEY_RESERVED_PROPERTY">KEY_RESERVED_PROPERTY</A></B></CODE> <BR> A reserved property name used to refer to the key of the entity.</TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#Entity(com.google.appengine.api.datastore.Key)">Entity</A></B>(<A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore">Key</A> key)</CODE> <BR> Create a new <code>Entity</code> uniquely identified by the provided <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore"><CODE>Key</CODE></A>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#Entity(java.lang.String)">Entity</A></B>(java.lang.String kind)</CODE> <BR> Create a new <code>Entity</code> with the specified kind and no parent <code>Entity</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#Entity(java.lang.String, com.google.appengine.api.datastore.Key)">Entity</A></B>(java.lang.String kind, <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore">Key</A> parent)</CODE> <BR> Create a new <code>Entity</code> with the specified kind and parent <code>Entity</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#Entity(java.lang.String, java.lang.String)">Entity</A></B>(java.lang.String kind, java.lang.String keyName)</CODE> <BR> Create a new <code>Entity</code> with the specified kind and key name and no parent <code>Entity</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#Entity(java.lang.String, java.lang.String, com.google.appengine.api.datastore.Key)">Entity</A></B>(java.lang.String kind, java.lang.String keyName, <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore">Key</A> parent)</CODE> <BR> Create a new <code>Entity</code> with the specified kind, key name, and parent <code>Entity</code>.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../../com/google/appengine/api/datastore/Entity.html" title="class in com.google.appengine.api.datastore">Entity</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#clone()">clone</A></B>()</CODE> <BR> Returns a shallow copy of this <code>Entity</code> instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object object)</CODE> <BR> Two <code>Entity</code> objects are considered equal if they refer to the same entity (i.e.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#getAppId()">getAppId</A></B>()</CODE> <BR> Returns the identifier of the application that owns this <code>Entity</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore">Key</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#getKey()">getKey</A></B>()</CODE> <BR> Returns the <code>Key</code> that represents this <code>Entity</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#getKind()">getKind</A></B>()</CODE> <BR> Returns a logical type that is associated with this <code>Entity</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#getNamespace()">getNamespace</A></B>()</CODE> <BR> Returns the namespace of the application/namespace that owns this <code>Entity</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore">Key</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#getParent()">getParent</A></B>()</CODE> <BR> Get a <code>Key</code> that corresponds to this the parent <code>Entity</code> of this <code>Entity</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.Map<java.lang.String,java.lang.Object></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#getProperties()">getProperties</A></B>()</CODE> <BR> Gets all of the properties belonging to this <code>Entity</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.Object</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#getProperty(java.lang.String)">getProperty</A></B>(java.lang.String propertyName)</CODE> <BR> Gets the property with the specified name.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#hashCode()">hashCode</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#hasProperty(java.lang.String)">hasProperty</A></B>(java.lang.String propertyName)</CODE> <BR> Returns true if a property has been set.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#removeProperty(java.lang.String)">removeProperty</A></B>(java.lang.String propertyName)</CODE> <BR> Removes any property with the specified name.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#setPropertiesFrom(com.google.appengine.api.datastore.Entity)">setPropertiesFrom</A></B>(<A HREF="../../../../../com/google/appengine/api/datastore/Entity.html" title="class in com.google.appengine.api.datastore">Entity</A> src)</CODE> <BR> A convenience method that populates the properties of this <code>Entity</code> with the properties set on the provided <code>Entity</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#setProperty(java.lang.String, java.lang.Object)">setProperty</A></B>(java.lang.String propertyName, java.lang.Object value)</CODE> <BR> Sets the property named, <code>propertyName</code>, to <code>value</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#setUnindexedProperty(java.lang.String, java.lang.Object)">setUnindexedProperty</A></B>(java.lang.String propertyName, java.lang.Object value)</CODE> <BR> Like <code>#setProperty</code>, but doesn't index the property in the built-in single property indexes.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#toString()">toString</A></B>()</CODE> <BR> </TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>getClass, notify, notifyAll, wait, wait, wait</CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Field Detail</B></FONT></TH> </TR> </TABLE> <A NAME="KEY_RESERVED_PROPERTY"><!-- --></A><H3> KEY_RESERVED_PROPERTY</H3> <PRE> public static final java.lang.String <B>KEY_RESERVED_PROPERTY</B></PRE> <DL> <DD>A reserved property name used to refer to the key of the entity. This string can be used for filtering and sorting by the entity key itself. <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#com.google.appengine.api.datastore.Entity.KEY_RESERVED_PROPERTY">Constant Field Values</A></DL> </DL> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="Entity(java.lang.String)"><!-- --></A><H3> Entity</H3> <PRE> public <B>Entity</B>(java.lang.String kind)</PRE> <DL> <DD>Create a new <code>Entity</code> with the specified kind and no parent <code>Entity</code>. The instantiated <code>Entity</code> will have an incomplete <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore"><CODE>Key</CODE></A> when this constructor returns. The <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore"><CODE>Key</CODE></A> will remain incomplete until you put the <code>Entity</code>, after which time the <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore"><CODE>Key</CODE></A> will have its <code>id</code> set. <P> </DL> <HR> <A NAME="Entity(java.lang.String, com.google.appengine.api.datastore.Key)"><!-- --></A><H3> Entity</H3> <PRE> public <B>Entity</B>(java.lang.String kind, <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore">Key</A> parent)</PRE> <DL> <DD>Create a new <code>Entity</code> with the specified kind and parent <code>Entity</code>. The instantiated <code>Entity</code> will have an incomplete <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore"><CODE>Key</CODE></A> when this constructor returns. The <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore"><CODE>Key</CODE></A> will remain incomplete until you put the <code>Entity</code>, after which time the <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore"><CODE>Key</CODE></A> will have its <code>id</code> set. <P> </DL> <HR> <A NAME="Entity(java.lang.String, java.lang.String)"><!-- --></A><H3> Entity</H3> <PRE> public <B>Entity</B>(java.lang.String kind, java.lang.String keyName)</PRE> <DL> <DD>Create a new <code>Entity</code> with the specified kind and key name and no parent <code>Entity</code>. The instantiated <code>Entity</code> will have a complete <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore"><CODE>Key</CODE></A> when this constructor returns. The <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore"><CODE>Key's</CODE></A> <code>name</code> field will be set to the value of <code>keyName</code>. <P> </DL> <HR> <A NAME="Entity(java.lang.String, java.lang.String, com.google.appengine.api.datastore.Key)"><!-- --></A><H3> Entity</H3> <PRE> public <B>Entity</B>(java.lang.String kind, java.lang.String keyName, <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore">Key</A> parent)</PRE> <DL> <DD>Create a new <code>Entity</code> with the specified kind, key name, and parent <code>Entity</code>. The instantiated <code>Entity</code> will have a complete <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore"><CODE>Key</CODE></A> when this constructor returns. The <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore"><CODE>Key's</CODE></A> <code>name</code> field will be set to the value of <code>keyName</code>. <P> </DL> <HR> <A NAME="Entity(com.google.appengine.api.datastore.Key)"><!-- --></A><H3> Entity</H3> <PRE> public <B>Entity</B>(<A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore">Key</A> key)</PRE> <DL> <DD>Create a new <code>Entity</code> uniquely identified by the provided <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore"><CODE>Key</CODE></A>. Creating an entity for the purpose of insertion (as opposed to update) with a key that has its <code>id</code> field set is strongly discouraged unless the key was returned by a <A HREF="../../../../../com/google/appengine/api/datastore/KeyRange.html" title="class in com.google.appengine.api.datastore"><CODE>KeyRange</CODE></A>. <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../../../com/google/appengine/api/datastore/KeyRange.html" title="class in com.google.appengine.api.datastore"><CODE>KeyRange</CODE></A></DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="equals(java.lang.Object)"><!-- --></A><H3> equals</H3> <PRE> public boolean <B>equals</B>(java.lang.Object object)</PRE> <DL> <DD>Two <code>Entity</code> objects are considered equal if they refer to the same entity (i.e. their <code>Key</code> objects match). <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE>equals</CODE> in class <CODE>java.lang.Object</CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getKey()"><!-- --></A><H3> getKey</H3> <PRE> public <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore">Key</A> <B>getKey</B>()</PRE> <DL> <DD>Returns the <code>Key</code> that represents this <code>Entity</code>. If the entity has not yet been saved (e.g. via <code>DatastoreService.put</code>), this <code>Key</code> will not be fully specified and cannot be used for certain operations (like <code>DatastoreService.get</code>). Once the <code>Entity</code> has been saved, its <code>Key</code> will be updated to be fully specified. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getKind()"><!-- --></A><H3> getKind</H3> <PRE> public java.lang.String <B>getKind</B>()</PRE> <DL> <DD>Returns a logical type that is associated with this <code>Entity</code>. This is simply a convenience method that forwards to the <code>Key</code> for this <code>Entity</code>. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getParent()"><!-- --></A><H3> getParent</H3> <PRE> public <A HREF="../../../../../com/google/appengine/api/datastore/Key.html" title="class in com.google.appengine.api.datastore">Key</A> <B>getParent</B>()</PRE> <DL> <DD>Get a <code>Key</code> that corresponds to this the parent <code>Entity</code> of this <code>Entity</code>. This is simply a convenience method that forwards to the <code>Key</code> for this <code>Entity</code>. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getProperty(java.lang.String)"><!-- --></A><H3> getProperty</H3> <PRE> public java.lang.Object <B>getProperty</B>(java.lang.String propertyName)</PRE> <DL> <DD>Gets the property with the specified name. The value returned may not be the same type as originally set via <A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#setProperty(java.lang.String, java.lang.Object)"><CODE>setProperty(java.lang.String, java.lang.Object)</CODE></A>. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the property corresponding to <code>propertyName</code>.</DL> </DD> </DL> <HR> <A NAME="getProperties()"><!-- --></A><H3> getProperties</H3> <PRE> public java.util.Map<java.lang.String,java.lang.Object> <B>getProperties</B>()</PRE> <DL> <DD>Gets all of the properties belonging to this <code>Entity</code>. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>an unmodifiable <code>Map</code> of properties.</DL> </DD> </DL> <HR> <A NAME="hashCode()"><!-- --></A><H3> hashCode</H3> <PRE> public int <B>hashCode</B>()</PRE> <DL> <DD><DL> <DT><B>Overrides:</B><DD><CODE>hashCode</CODE> in class <CODE>java.lang.Object</CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="hasProperty(java.lang.String)"><!-- --></A><H3> hasProperty</H3> <PRE> public boolean <B>hasProperty</B>(java.lang.String propertyName)</PRE> <DL> <DD>Returns true if a property has been set. This function can be used to test if a property has been specifically set to <code>null</code>. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>true iff the property named <code>propertyName</code> exists.</DL> </DD> </DL> <HR> <A NAME="removeProperty(java.lang.String)"><!-- --></A><H3> removeProperty</H3> <PRE> public void <B>removeProperty</B>(java.lang.String propertyName)</PRE> <DL> <DD>Removes any property with the specified name. If there is no property with this name set, simply does nothing. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Throws:</B> <DD><CODE>java.lang.NullPointerException</CODE> - If <code>propertyName</code> is null.</DL> </DD> </DL> <HR> <A NAME="setProperty(java.lang.String, java.lang.Object)"><!-- --></A><H3> setProperty</H3> <PRE> public void <B>setProperty</B>(java.lang.String propertyName, java.lang.Object value)</PRE> <DL> <DD>Sets the property named, <code>propertyName</code>, to <code>value</code>. <p> As the value is stored in the datastore, it is converted to the datastore's native type. This may include widening, such as converting a <code>Short</code> to a <code>Long</code>. <p> All <code>Collections</code> are prone to losing their sort order and their original types as they are stored in the datastore. For example, a <code>TreeSet</code> may be returned as a <code>List</code> from <A HREF="../../../../../com/google/appengine/api/datastore/Entity.html#getProperty(java.lang.String)"><CODE>getProperty(java.lang.String)</CODE></A>, with an arbitrary re-ordering of elements. <p> Overrides any existing value for this property, whether indexed or unindexed. <p> Note that <A HREF="../../../../../com/google/appengine/api/datastore/Blob.html" title="class in com.google.appengine.api.datastore"><CODE>Blob</CODE></A> and <code>Text</code> property values are never indexed by the built-in single property indexes. To store other types without being indexed, use <code>#setUnindexedProperty</code>. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>value</CODE> - may be one of the supported datatypes, a heterogenous <code>Collection</code> of one of the supported datatypes, or an <code>UnindexedValue</code> wrapping one of the supported datatypes. <DT><B>Throws:</B> <DD><CODE>java.lang.IllegalArgumentException</CODE> - If the value is not of a type that the data store supports.<DT><B>See Also:</B><DD><CODE>#setUnindexedProperty}</CODE></DL> </DD> </DL> <HR> <A NAME="setUnindexedProperty(java.lang.String, java.lang.Object)"><!-- --></A><H3> setUnindexedProperty</H3> <PRE> public void <B>setUnindexedProperty</B>(java.lang.String propertyName, java.lang.Object value)</PRE> <DL> <DD>Like <code>#setProperty</code>, but doesn't index the property in the built-in single property indexes. <p> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>value</CODE> - may be one of the supported datatypes, or a heterogenous <code>Collection</code> of one of the supported datatypes. <p> Overrides any existing value for this property, whether indexed or unindexed. <DT><B>Throws:</B> <DD><CODE>java.lang.IllegalArgumentException</CODE> - If the value is not of a type that the data store supports.<DT><B>See Also:</B><DD><CODE>#setProperty}</CODE></DL> </DD> </DL> <HR> <A NAME="toString()"><!-- --></A><H3> toString</H3> <PRE> public java.lang.String <B>toString</B>()</PRE> <DL> <DD><DL> <DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getAppId()"><!-- --></A><H3> getAppId</H3> <PRE> public java.lang.String <B>getAppId</B>()</PRE> <DL> <DD>Returns the identifier of the application that owns this <code>Entity</code>. This is simply a convenience method that forwards to the <code>Key</code> for this <code>Entity</code>. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getNamespace()"><!-- --></A><H3> getNamespace</H3> <PRE> public java.lang.String <B>getNamespace</B>()</PRE> <DL> <DD>Returns the namespace of the application/namespace that owns this <code>Entity</code>. This is simply a convenience method that forwards to the <code>Key</code> for this <code>Entity</code>. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="clone()"><!-- --></A><H3> clone</H3> <PRE> public <A HREF="../../../../../com/google/appengine/api/datastore/Entity.html" title="class in com.google.appengine.api.datastore">Entity</A> <B>clone</B>()</PRE> <DL> <DD>Returns a shallow copy of this <code>Entity</code> instance. <code>Collection</code> properties are cloned as an <code>ArrayList</code>, the type returned from the datastore. Instances of mutable datastore types are cloned as well. Instances of all other types are reused. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE>clone</CODE> in class <CODE>java.lang.Object</CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>a shallow copy of this <code>Entity</code></DL> </DD> </DL> <HR> <A NAME="setPropertiesFrom(com.google.appengine.api.datastore.Entity)"><!-- --></A><H3> setPropertiesFrom</H3> <PRE> public void <B>setPropertiesFrom</B>(<A HREF="../../../../../com/google/appengine/api/datastore/Entity.html" title="class in com.google.appengine.api.datastore">Entity</A> src)</PRE> <DL> <DD>A convenience method that populates the properties of this <code>Entity</code> with the properties set on the provided <code>Entity</code>. This method is the only way to transfer information about unindexed properties. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>src</CODE> - The entity from which we will populate ourself.</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../com/google/appengine/api/datastore/Email.html" title="class in com.google.appengine.api.datastore"><B>PREV CLASS</B></A> <A HREF="../../../../../com/google/appengine/api/datastore/EntityNotFoundException.html" title="class in com.google.appengine.api.datastore"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?com/google/appengine/api/datastore/Entity.html" target="_top"><B>FRAMES</B></A> <A HREF="Entity.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>