Class Person
- java.lang.Object
-
- one.xingyi.reference4.person.server.domain.Person
-
- All Implemented Interfaces:
one.xingyi.core.marshelling.HasJson<one.xingyi.core.marshelling.ContextForJson>,one.xingyi.core.marshelling.HasJsonWithLinks<one.xingyi.core.marshelling.ContextForJson,Person>,one.xingyi.core.sdk.IXingYiResource,IPerson
public class Person extends java.lang.Object implements one.xingyi.core.marshelling.HasJson<one.xingyi.core.marshelling.ContextForJson>, IPerson, one.xingyi.core.marshelling.HasJsonWithLinks<one.xingyi.core.marshelling.ContextForJson,Person>
-
-
Constructor Summary
Constructors Constructor Description Person(java.lang.String name, ITelephoneNumber telephone, java.lang.Integer age, java.lang.String line1, java.lang.String line2)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Integerage()booleanequals(java.lang.Object o)inthashCode()java.lang.Stringline1()java.lang.Stringline2()java.lang.Stringname()ITelephoneNumbertelephone()<J> JtoJson(one.xingyi.core.marshelling.JsonWriter<J> jsonWriter, one.xingyi.core.marshelling.ContextForJson context)<J> JtoJsonWithLinks(one.xingyi.core.marshelling.JsonWriter<J> jsonWriter, one.xingyi.core.marshelling.ContextForJson context, java.util.function.Function<Person,java.lang.String> stateFn)java.lang.StringtoString()Personwithage(java.lang.Integer age)Personwithline1(java.lang.String line1)Personwithline2(java.lang.String line2)Personwithtelephone(ITelephoneNumber telephone)
-
-
-
Constructor Detail
-
Person
public Person(java.lang.String name, ITelephoneNumber telephone, java.lang.Integer age, java.lang.String line1, java.lang.String line2)
-
-
Method Detail
-
telephone
public ITelephoneNumber telephone()
-
withtelephone
public Person withtelephone(ITelephoneNumber telephone)
- Specified by:
withtelephonein interfaceIPerson
-
withline1
public Person withline1(java.lang.String line1)
-
withline2
public Person withline2(java.lang.String line2)
-
toJson
public <J> J toJson(one.xingyi.core.marshelling.JsonWriter<J> jsonWriter, one.xingyi.core.marshelling.ContextForJson context)- Specified by:
toJsonin interfaceone.xingyi.core.marshelling.HasJson<one.xingyi.core.marshelling.ContextForJson>
-
toJsonWithLinks
public <J> J toJsonWithLinks(one.xingyi.core.marshelling.JsonWriter<J> jsonWriter, one.xingyi.core.marshelling.ContextForJson context, java.util.function.Function<Person,java.lang.String> stateFn)- Specified by:
toJsonWithLinksin interfaceone.xingyi.core.marshelling.HasJsonWithLinks<one.xingyi.core.marshelling.ContextForJson,Person>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-