You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
2.2 KiB
96 lines
2.2 KiB
3 years ago
|
package com.fr.plugin.beans;
|
||
|
|
||
|
import com.fr.general.ComparatorUtils;
|
||
|
import com.fr.json.JSONException;
|
||
|
import com.fr.json.JSONObject;
|
||
|
import com.fr.plugin.entitys.YTAgentEntity;
|
||
|
import com.fr.stable.db.data.BaseDataRecord;
|
||
|
|
||
|
import java.io.Serializable;
|
||
|
|
||
|
public class MyAgentBean extends BaseDataRecord implements Serializable {
|
||
|
private String agentName;
|
||
|
private String teamId;
|
||
|
private String groupId;
|
||
|
private String clientId;
|
||
|
private String secret;
|
||
|
private int type;
|
||
|
private long timeStamp;
|
||
|
|
||
|
public YTAgentEntity createEntity(YTAgentEntity var1) {
|
||
|
var1.setId(this.getId());
|
||
|
var1.setAgentName(this.agentName);
|
||
|
var1.setAgentId(this.groupId);
|
||
|
var1.setCorpId(this.clientId);
|
||
|
var1.setSecret(this.secret);
|
||
|
var1.setType(this.type);
|
||
|
var1.setTimeStamp(this.timeStamp);
|
||
|
return var1;
|
||
|
}
|
||
|
|
||
|
private boolean isAgentTypeValidate() {
|
||
|
return ComparatorUtils.equals(this.type, 2);
|
||
|
}
|
||
|
|
||
|
|
||
|
public String getAgentName() {
|
||
|
return this.agentName;
|
||
|
}
|
||
|
|
||
|
public void setAgentName(String var1) {
|
||
|
this.agentName = var1;
|
||
|
}
|
||
|
|
||
|
public String getGroupId() {
|
||
|
return this.groupId;
|
||
|
}
|
||
|
|
||
|
public void setGroupId(String var1) {
|
||
|
this.groupId = var1;
|
||
|
}
|
||
|
|
||
|
public String getClientId() {
|
||
|
return this.clientId;
|
||
|
}
|
||
|
|
||
|
public void setClientId(String var1) {
|
||
|
this.clientId = var1;
|
||
|
}
|
||
|
|
||
|
public String getSecret() {
|
||
|
return this.secret;
|
||
|
}
|
||
|
|
||
|
public void setSecret(String var1) {
|
||
|
this.secret = var1;
|
||
|
}
|
||
|
|
||
|
public int getType() {
|
||
|
return this.type;
|
||
|
}
|
||
|
|
||
|
public void setType(int var1) {
|
||
|
this.type = var1;
|
||
|
}
|
||
|
|
||
|
public long getTimeStamp() {
|
||
|
return this.timeStamp;
|
||
|
}
|
||
|
|
||
|
public void setTimeStamp(long var1) {
|
||
|
this.timeStamp = var1;
|
||
|
}
|
||
|
|
||
|
|
||
|
public JSONObject toJSONObject() throws JSONException {
|
||
|
JSONObject var1 = JSONObject.create();
|
||
|
var1.put("id", this.getId());
|
||
|
var1.put("agentName", this.agentName);
|
||
|
var1.put("agentId", this.groupId);
|
||
|
var1.put("corpId", this.clientId);
|
||
|
var1.put("secret", this.secret);
|
||
|
var1.put("type", this.type);
|
||
|
return var1;
|
||
|
}
|
||
|
}
|