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;
}
}