packagecom.jaxb;importjava.util.Date;importjavax.xml.bind.annotation.XmlAccessType;importjavax.xml.bind.annotation.XmlAccessorType;importjavax.xml.bind.annotation.XmlElement;/***


 

* If you annotate your Artifact class with the annotation:

* @XmlAccessorType(XmlAccessType.FIELD)

* then you do not need to annotate the fields with @XmlElement and the

* setter/getter methods will be ignored.

*

*

*@authorUser*/@XmlAccessorType(XmlAccessType.FIELD)//用了这个之后就会自动忽略setter/getter方法。不用这个就需要去掉注解,需要保证属性名和xml里的表签名一致

public classTestOrg {

@XmlElement(name= "org_id")privateLong orgId;

@XmlElement(name= "parent_id")privateLong parentId;

@XmlElement(name= "org_name")privateString orgName;

@XmlElement(name= "org_code")privateString orgCode;

@XmlElement(name= "org_type")privateString orgType;

@XmlElement(name= "start_d")privateDate startDate;

@XmlElement(name= "end_d")privateDate endDate;

@XmlElement(name= "attribute1")privateString attribute;

@XmlElement(name= "insert_t")privateDate insertTime;publicLong getOrgId() {returnorgId;

}public voidsetOrgId(Long orgId) {this.orgId =orgId;

}publicLong getParentId() {returnparentId;

}public voidsetParentId(Long parentId) {this.parentId =parentId;

}publicString getOrgName() {returnorgName;

}public voidsetOrgName(String orgName) {this.orgName =orgName;

}publicString getOrgCode() {returnorgCode;

}public voidsetOrgCode(String orgCode) {this.orgCode =orgCode;

}publicString getOrgType() {returnorgType;

}public voidsetOrgType(String orgType) {this.orgType =orgType;

}publicDate getStartDate() {returnstartDate;

}public voidsetStartDate(Date startDate) {this.startDate =startDate;

}publicDate getEndDate() {returnendDate;

}public voidsetEndDate(Date endDate) {this.endDate =endDate;

}publicString getAttribute() {returnattribute;

}public voidsetAttribute(String attribute) {this.attribute =attribute;

}publicDate getInsertTime() {returninsertTime;

}public voidsetInsertTime(Date insertTime) {this.insertTime =insertTime;

}

}

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐