Java tutorial
/** * Copyright (c) 2009-2013 jeefuse.com, Licensed under GPL (the "License") * Email:yonclv@gmail.com * PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package com.jeefuse.system.security.web.rto; import java.io.Serializable; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; import org.apache.commons.lang.xwork.StringUtils; import com.jeefuse.base.web.rto.GenericRTO; import com.jeefuse.system.security.model.GsysFunction; /** * GsysFunction Entity RTO(Request transfer object). * * @author yonclv * @generated */ public class GsysFunctionRTO implements GenericRTO<GsysFunction>, Serializable { /** @generated */ private static final long serialVersionUID = 1L; /** * ------------------------------------------------------------------------ * ID ---------------------------------------------------------------------- * -- * * @generated */ public String getId() { return id; } /** @generated */ public void setId(final String id) { this.id = id; } /** @generated */ private String id = null; /** * ------------------------------------------------------------------------ * ?? * ------------------------------------------------------------------------ * @generated */ public String getValue() { return value; } /** @generated */ public void setValue(final String value) { this.value = value; } /** @generated */ private String value = null; /** * ------------------------------------------------------------------------ * ?? * ------------------------------------------------------------------------ * * @generated */ public String getName() { return name; } /** @generated */ public void setName(final String name) { this.name = name; } /** @generated */ private String name = null; /** * ------------------------------------------------------------------------ * ?? ---------------------------------------------------------------------- * -- * * @generated */ public String getDescript() { return descript; } /** @generated */ public void setDescript(final String descript) { this.descript = descript; } /** @generated */ private String descript = null; /** * ------------------------------------------------------------------------ * ?? * ------------------------------------------------------------------------ * * @generated */ public String getType() { return type; } /** @generated */ public void setType(final String type) { this.type = type; } /** @generated */ private String type = null; /** * ------------------------------------------------------------------------ * url * ------------------------------------------------------------------------ * * @generated */ public String getUrl() { return url; } /** @generated */ public void setUrl(final String url) { this.url = url; } /** @generated */ private String url = null; /** * ------------------------------------------------------------------------ * ID * ------------------------------------------------------------------------ * * @generated */ public String getParentId() { return parentId; } /** @generated */ public void setParentId(final String parentId) { this.parentId = parentId; } /** @generated */ private String parentId = null; /** * ------------------------------------------------------------------------ * validStatus * ------------------------------------------------------------------------ * * @generated */ public String getValidStatus() { return validStatus; } /** @generated */ public void setValidStatus(final String validStatus) { this.validStatus = validStatus; } /** @generated */ private String validStatus = null; /** * ------------------------------------------------------------------------ * ? ---------------------------------------------------------------------- * -- * * @generated */ public Long getSortNum() { return sortNum; } /** @generated */ public void setSortNum(final Long sortNum) { this.sortNum = sortNum; } /** @generated */ private Long sortNum = null; /** * ------------------------------------------------------------------------ * layerCode * ------------------------------------------------------------------------ * * @generated */ public String getLayerCode() { return layerCode; } /** @generated */ public void setLayerCode(final String layerCode) { this.layerCode = layerCode; } /** @generated */ private String layerCode = null; // ------------------------------------------------------------------------ // RTO <==> model convert // ------------------------------------------------------------------------ /** * ?. * * @generated */ public GsysFunction getModifiedModel(GsysFunction oldModel) { oldModel.setValue(this.value);//1 ?? oldModel.setName(this.name);//2 ???? oldModel.setDescript(this.descript);//3 ?? oldModel.setType(this.type);//4 ?? oldModel.setUrl(this.url);//5 url // oldModel.setParentId(this.parentId);//6 ID oldModel.setValidStatus(this.validStatus);//7 ? oldModel.setSortNum(this.sortNum);//8 ? //oldModel.setLayerCode(this.layerCode);//9 ? return oldModel; } /** *??. * * @generated */ public GsysFunction getNewModel() { GsysFunction newGsysFunction = new GsysFunction(); newGsysFunction.setValue(this.value);//1 ?? newGsysFunction.setName(this.name);//2 ???? newGsysFunction.setDescript(this.descript);//3 ?? newGsysFunction.setType(this.type);//4 ?? newGsysFunction.setUrl(this.url);//5 url if (StringUtils.isNotBlank(this.parentId)) { newGsysFunction.setParentId(this.parentId);//6 ID } else { // newGsysFunction.setParentId(null);//6 ID } newGsysFunction.setValidStatus(this.validStatus);//7 ? newGsysFunction.setSortNum(this.sortNum);//8 ? //newGsysFunction.setLayerCode(this.layerCode);//9 ? return newGsysFunction; } /** * ?. * * @generated */ public void setModel(GsysFunction model) { this.setId(model.getId());//id 1 this.setValue(model.getValue());//2 ?? this.setName(model.getName());//3 ???? this.setDescript(model.getDescript());//4 ?? this.setType(model.getType());//5 ?? this.setUrl(model.getUrl());//6 url this.setParentId(model.getParentId());//7 ID this.setValidStatus(model.getValidStatus());//8 ? this.setSortNum(model.getSortNum());//9 ? this.setLayerCode(model.getLayerCode());//10 ? } // ------------------------------------------------------------------------ // Utils // ------------------------------------------------------------------------ /** @generated */ @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId()) .append("value", value).append("name", name).append("descript", descript).append("type", type) .append("url", url)/*.append("parentId",getParentId())*/.append("validStatus", validStatus) .append("sortNum", sortNum).append("layerCode", layerCode).toString(); } }