NamedObject.java
/*
* @ Copyright 2001 FA Software;
* All right reserved. No part of this program may be reproduced or
* transmitted in any form or by any means, electronic or
* mechanical, including photocopying, recording, or by any
* information storage or retrieval system without written
* permission from FA Software, except for inclusion of brief
* quotations in a review.
*/
package com.mycim.valueobject.bas;
import java.io.Serializable;
import java.sql.Timestamp;
/**
* @author Johnson.Wang
* @version 6.0.0
* @date 2019/9/20
**/
public class NamedObject implements Serializable {
private static final long serialVersionUID = -4427552324656384566L;
protected long instanceRrn = 0;
protected String instanceId;
protected long lockVersion = 0;
protected String namedSpace;
protected String instanceDesc;
protected String instanceLongDesc;
protected String object;
protected String objectType;
protected String objectSubtype;
protected Integer currentVersion;
protected Integer activeVersion;
protected Long roleRrn;
protected String roleId;
protected String instanceStatus;
protected Timestamp createdTimestamp;
protected Timestamp lastUpdateTimestamp;
protected String createdTime;
protected String lastUpdateTime;
protected Long createdUserRrn;
protected String createdUserId;
protected Long lastUpdateUserRrn;
protected String lastUpdateUserId;
protected String transId;
protected String transPerformedby;
protected String flagType;
protected String systemUsed;
protected String dmmType;
protected String attribute1;
protected String attribute2;
/**
* attribute3 表示NPW flag 涉及到 product,process,route,step
**/
protected String attribute3;
protected String attribute4;
protected String attribute5;
protected Long facilityRrn;
public NamedObject() {
}
public NamedObject(String instanceId, String namedSpace, String object) {
if (instanceId != null) {
this.instanceId = instanceId.toUpperCase().trim();
}
this.namedSpace = namedSpace;
this.object = object;
}
public NamedObject(long instanceRrn) {
this.instanceRrn = instanceRrn;
}
public long getInstanceRrn() {
return this.instanceRrn;
}
public void setInstanceRrn(long instanceRrn) {
this.instanceRrn = instanceRrn;
}
public String getDmmType() {
return dmmType;
}
public void setDmmType(String dmmType) {
this.dmmType = dmmType;
}
public String getInstanceId() {
return this.instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
public String getNamedSpace() {
return this.namedSpace;
}
public void setNamedSpace(String namedSpace) {
this.namedSpace = namedSpace;
}
public String getInstanceDesc() {
return this.instanceDesc;
}
public void setInstanceDesc(String instanceDesc) {
this.instanceDesc = instanceDesc;
}
public String getInstanceLongDesc() {
return this.instanceLongDesc;
}
public void setInstanceLongDesc(String instanceLongDesc) {
this.instanceLongDesc = instanceLongDesc;
}
public String getObject() {
return this.object;
}
public void setObject(String object) {
this.object = object;
}
public String getObjectType() {
return this.objectType;
}
public void setObjectType(String objectType) {
this.objectType = objectType;
}
public String getObjectSubtype() {
return this.objectSubtype;
}
public void setObjectSubtype(String objectSubtype) {
this.objectSubtype = objectSubtype;
}
public Integer getCurrentVersion() {
return this.currentVersion;
}
public void setCurrentVersion(Integer currentVersion) {
this.currentVersion = currentVersion;
}
public Integer getActiveVersion() {
return this.activeVersion;
}
public void setActiveVersion(Integer activeVersion) {
this.activeVersion = activeVersion;
}
public Long getRoleRrn() {
return this.roleRrn;
}
public void setRoleRrn(Long roleRrn) {
this.roleRrn = roleRrn;
}
public String getRoleId() {
return this.roleId;
}
public void setRoleId(String roleId) {
this.roleId = roleId;
}
public String getInstanceStatus() {
return this.instanceStatus;
}
public void setInstanceStatus(String instanceStatus) {
this.instanceStatus = instanceStatus;
}
public Timestamp getCreatedTimestamp() {
return this.createdTimestamp;
}
public void setCreatedTimestamp(Timestamp createdTimestamp) {
this.createdTimestamp = createdTimestamp;
}
public Timestamp getLastUpdateTimestamp() {
return this.lastUpdateTimestamp;
}
public void setLastUpdateTimestamp(Timestamp lastUpdateTimestamp) {
this.lastUpdateTimestamp = lastUpdateTimestamp;
}
public String getCreatedTime() {
return this.createdTime;
}
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
public String getLastUpdateTime() {
return this.lastUpdateTime;
}
public void setLastUpdateTime(String lastUpdateTime) {
this.lastUpdateTime = lastUpdateTime;
}
public Long getCreatedUserRrn() {
return this.createdUserRrn;
}
public void setCreatedUserRrn(Long createdUserRrn) {
this.createdUserRrn = createdUserRrn;
}
public String getCreatedUserId() {
return this.createdUserId;
}
public void setCreatedUserId(String createdUserId) {
this.createdUserId = createdUserId;
}
public Long getLastUpdateUserRrn() {
return this.lastUpdateUserRrn;
}
public void setLastUpdateUserRrn(Long lastUpdateUserRrn) {
this.lastUpdateUserRrn = lastUpdateUserRrn;
}
public String getLastUpdateUserId() {
return this.lastUpdateUserId;
}
public void setLastUpdateUserId(String lastUpdateUserId) {
this.lastUpdateUserId = lastUpdateUserId;
}
public String getTransId() {
return this.transId;
}
public void setTransId(String transId) {
this.transId = transId;
}
public String getTransPerformedby() {
return this.transPerformedby;
}
public void setTransPerformedby(String transPerformedby) {
this.transPerformedby = transPerformedby;
}
public long getLockVersion() {
return lockVersion;
}
public void setLockVersion(long lockVersion) {
this.lockVersion = lockVersion;
}
public Long getFacilityRrn() {
return facilityRrn;
}
public void setFacilityRrn(Long facilityRrn) {
this.facilityRrn = facilityRrn;
}
// --------------------------------------------------------- Public methods
@Override
public boolean equals(Object obj) {
if (this.getClass() != null && obj != null) {
if (this.getClass().equals(obj.getClass())) {
try {
NamedObject that = (NamedObject) obj;
return this.instanceRrn == that.instanceRrn;
} catch (Exception e) {
}
}
}
return false;
}
@Override
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append(this.getClass());
sb.append("[instanceRrn=");
sb.append(instanceRrn);
if (object != null) {
sb.append(", object=");
sb.append(object);
}
if (namedSpace != null) {
sb.append(", named space=");
sb.append(namedSpace);
}
if (instanceId != null) {
sb.append(", instance id=");
sb.append(instanceId);
}
sb.append("]");
return (sb.toString());
}
public void copyNamedObject(NamedObject namedObject) {
if (namedObject != null) {
this.lockVersion = namedObject.getLockVersion();
this.instanceRrn = namedObject.getInstanceRrn();
this.instanceId = namedObject.getInstanceId();
this.namedSpace = namedObject.getNamedSpace();
this.instanceDesc = namedObject.getInstanceDesc();
this.instanceLongDesc = namedObject.getInstanceLongDesc();
this.object = namedObject.getObject();
this.objectType = namedObject.getObjectType();
this.objectSubtype = namedObject.getObjectSubtype();
this.currentVersion = namedObject.getCurrentVersion();
this.activeVersion = namedObject.getActiveVersion();
this.roleRrn = namedObject.getRoleRrn();
this.roleId = namedObject.getRoleId();
this.instanceStatus = namedObject.getInstanceStatus();
this.createdTimestamp = namedObject.getCreatedTimestamp();
this.lastUpdateTimestamp = namedObject.getLastUpdateTimestamp();
this.transId = namedObject.getTransId();
this.transPerformedby = namedObject.getTransPerformedby();
this.createdTime = namedObject.getCreatedTime();
this.flagType = namedObject.getFlagType();
this.systemUsed = namedObject.getSystemUsed();
this.attribute1 = namedObject.getAttribute1();
this.attribute2 = namedObject.getAttribute2();
this.attribute3 = namedObject.getAttribute3();
this.attribute4 = namedObject.getAttribute4();
this.attribute5 = namedObject.getAttribute5();
}
}
public String getFlagType() {
return flagType;
}
public void setFlagType(String flagType) {
this.flagType = flagType;
}
public String getSystemUsed() {
return systemUsed;
}
public void setSystemUsed(String systemUsed) {
this.systemUsed = systemUsed;
}
public String getAttribute3() {
return attribute3;
}
public void setAttribute3(String attribute3) {
this.attribute3 = attribute3;
}
public String getAttribute1() {
return attribute1;
}
public void setAttribute1(String attribute1) {
this.attribute1 = attribute1;
}
public String getAttribute2() {
return attribute2;
}
public void setAttribute2(String attribute2) {
this.attribute2 = attribute2;
}
public String getAttribute4() {
return attribute4;
}
public void setAttribute4(String attribute4) {
this.attribute4 = attribute4;
}
public String getAttribute5() {
return attribute5;
}
public void setAttribute5(String attribute5) {
this.attribute5 = attribute5;
}
}