Package cn.net.pap.neo4j.entity
Class PersonEntity
java.lang.Object
cn.net.pap.neo4j.entity.PersonEntity
- All Implemented Interfaces:
Serializable
1、可以在类文件上添加 @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "personId") 注解处理循环引用,使用对象的属性作为唯一标识符,
ObjectMapper objectMapperJsonIdentityInfo = new ObjectMapper();
String jsonIdentityInfoStr = objectMapperJsonIdentityInfo.writeValueAsString(p2);
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setChildrens
(List<PersonEntity> childrens) void
setDescription
(String description) void
setHobbys
(List<HobbyEntity> hobbys) void
setParents
(List<PersonEntity> parents) void
setPersonId
(String personId) void
setPersonName
(String personName)
-
Constructor Details
-
PersonEntity
public PersonEntity()
-
-
Method Details
-
getPersonId
-
setPersonId
-
getPersonName
-
setPersonName
-
getDescription
-
setDescription
-
getHobbys
-
setHobbys
-
getParents
-
setParents
-
getChildrens
-
setChildrens
-