FileDocCategorySizeDatePackage
Entity.javaAPI DocAndroid 5.1 API2368Thu Mar 12 22:22:10 GMT 2015android.content

Entity

public 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 voidaddSubValue(android.net.Uri uri, ContentValues values)

        mSubValues.add(new Entity.NamedContentValues(uri, values));
    
public ContentValuesgetEntityValues()

        return mValues;
    
public java.util.ArrayListgetSubValues()

        return mSubValues;
    
public java.lang.StringtoString()

        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();