Replace some characters with the HTML entities for correct rendering. Added missing work and paragraph.
am: 249f616b13
Change-Id: I43b5a9f8241e79bf8197ed32c775926ad0d88e14
diff --git a/room/common/src/main/java/android/arch/persistence/room/Relation.java b/room/common/src/main/java/android/arch/persistence/room/Relation.java
index 7206699..d55bbfe 100644
--- a/room/common/src/main/java/android/arch/persistence/room/Relation.java
+++ b/room/common/src/main/java/android/arch/persistence/room/Relation.java
@@ -28,6 +28,8 @@
* <pre>
* {@literal @}Entity
* public class Pet {
+ * {@literal @} PrimaryKey
+ * int id;
* int userId;
* String name;
* // other fields
@@ -41,8 +43,8 @@
*
* {@literal @}Dao
* public interface UserPetDao {
- * {@literal @}Query("SELECT id, name from User WHERE age > :minAge")
- * public List<UserNameAndAllPets> loadUserAndPets(int minAge);
+ * {@literal @}Query("SELECT id, name from User")
+ * public List<UserNameAndAllPets> loadUserAndPets();
* }
* </pre>
* <p>
@@ -63,16 +65,16 @@
* {@literal @}Embedded
* public User user;
* {@literal @}Relation(parentColumn = "id", entityColumn = "userId", entity = Pet.class)
- * public List<PetNameAndId> pets;
+ * public List<PetNameAndId> pets;
* }
* {@literal @}Dao
* public interface UserPetDao {
- * {@literal @}Query("SELECT * from User WHERE age > :minAge")
- * public List<UserAllPets> loadUserAndPets(int minAge);
+ * {@literal @}Query("SELECT * from User")
+ * public List<UserAllPets> loadUserAndPets();
* }
* </pre>
* <p>
- * In the example above, {@code PetNameAndId} is a regular but all of fields are fetched
+ * In the example above, {@code PetNameAndId} is a regular Pojo but all of fields are fetched
* from the {@code entity} defined in the {@code @Relation} annotation (<i>Pet</i>).
* {@code PetNameAndId} could also define its own relations all of which would also be fetched
* automatically.
@@ -85,7 +87,7 @@
* public User user;
* {@literal @}Relation(parentColumn = "id", entityColumn = "userId", entity = Pet.class,
* projection = {"name"})
- * public List<String> petNames;
+ * public List<String> petNames;
* }
* </pre>
* <p>
@@ -93,7 +95,7 @@
* cannot have relations. This is a design decision to avoid common pitfalls in {@link Entity}
* setups. You can read more about it in the main Room documentation. When loading data, you can
* simply work around this limitation by creating Pojo classes that extend the {@link Entity}.
- *
+ * <p>
* Note that the {@code @Relation} annotated field cannot be a constructor parameter, it must be
* public or have a public setter.
*/