Entitypublic final class Entity extends Object A representation of a item using ContentValues. It contains one top level ContentValue
plus a collection of Uri, ContentValues tuples as subvalues. One example of its use
is in Contacts, where the top level ContentValue contains the columns from the RawContacts
table and the subvalues contain a ContentValues object for each row from the Data table that
corresponds to that RawContact. The uri refers to the Data table uri for each row. |
Fields Summary |
---|
private final ContentValues | mValues | private final ArrayList | mSubValues |
Constructors Summary |
---|
public Entity(ContentValues values)
mValues = values;
mSubValues = new ArrayList<NamedContentValues>();
|
Methods Summary |
---|
public void | addSubValue(android.net.Uri uri, ContentValues values)
mSubValues.add(new Entity.NamedContentValues(uri, values));
| public ContentValues | getEntityValues()
return mValues;
| public java.util.ArrayList | getSubValues()
return mSubValues;
| public java.lang.String | toString()
final StringBuilder sb = new StringBuilder();
sb.append("Entity: ").append(getEntityValues());
for (Entity.NamedContentValues namedValue : getSubValues()) {
sb.append("\n ").append(namedValue.uri);
sb.append("\n -> ").append(namedValue.values);
}
return sb.toString();
|
|