/** Performs a deep copy on <i>other</i>. */ public StorageResourceDescription(StorageResourceDescription other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetStorageResourceId()) { this.storageResourceId = other.storageResourceId; } if (other.isSetHostName()) { this.hostName = other.hostName; } if (other.isSetStorageResourceDescription()) { this.storageResourceDescription = other.storageResourceDescription; } this.enabled = other.enabled; if (other.isSetDataMovementInterfaces()) { List<org.apache.airavata.model.data.movement.DataMovementInterface> __this__dataMovementInterfaces = new ArrayList<org.apache.airavata.model.data.movement.DataMovementInterface>( other.dataMovementInterfaces.size()); for (org.apache.airavata.model.data.movement.DataMovementInterface other_element : other.dataMovementInterfaces) { __this__dataMovementInterfaces.add( new org.apache.airavata.model.data.movement.DataMovementInterface(other_element)); } this.dataMovementInterfaces = __this__dataMovementInterfaces; } }
public boolean equals(StorageResourceDescription that) { if (that == null) return false; boolean this_present_storageResourceId = true && this.isSetStorageResourceId(); boolean that_present_storageResourceId = true && that.isSetStorageResourceId(); if (this_present_storageResourceId || that_present_storageResourceId) { if (!(this_present_storageResourceId && that_present_storageResourceId)) return false; if (!this.storageResourceId.equals(that.storageResourceId)) return false; } boolean this_present_hostName = true && this.isSetHostName(); boolean that_present_hostName = true && that.isSetHostName(); if (this_present_hostName || that_present_hostName) { if (!(this_present_hostName && that_present_hostName)) return false; if (!this.hostName.equals(that.hostName)) return false; } boolean this_present_storageResourceDescription = true && this.isSetStorageResourceDescription(); boolean that_present_storageResourceDescription = true && that.isSetStorageResourceDescription(); if (this_present_storageResourceDescription || that_present_storageResourceDescription) { if (!(this_present_storageResourceDescription && that_present_storageResourceDescription)) return false; if (!this.storageResourceDescription.equals(that.storageResourceDescription)) return false; } boolean this_present_enabled = true && this.isSetEnabled(); boolean that_present_enabled = true && that.isSetEnabled(); if (this_present_enabled || that_present_enabled) { if (!(this_present_enabled && that_present_enabled)) return false; if (this.enabled != that.enabled) return false; } boolean this_present_dataMovementInterfaces = true && this.isSetDataMovementInterfaces(); boolean that_present_dataMovementInterfaces = true && that.isSetDataMovementInterfaces(); if (this_present_dataMovementInterfaces || that_present_dataMovementInterfaces) { if (!(this_present_dataMovementInterfaces && that_present_dataMovementInterfaces)) return false; if (!this.dataMovementInterfaces.equals(that.dataMovementInterfaces)) return false; } return true; }
@Override public int compareTo(StorageResourceDescription other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetStorageResourceId()).compareTo(other.isSetStorageResourceId()); if (lastComparison != 0) { return lastComparison; } if (isSetStorageResourceId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storageResourceId, other.storageResourceId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetHostName()).compareTo(other.isSetHostName()); if (lastComparison != 0) { return lastComparison; } if (isSetHostName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostName, other.hostName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetStorageResourceDescription()) .compareTo(other.isSetStorageResourceDescription()); if (lastComparison != 0) { return lastComparison; } if (isSetStorageResourceDescription()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo( this.storageResourceDescription, other.storageResourceDescription); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEnabled()).compareTo(other.isSetEnabled()); if (lastComparison != 0) { return lastComparison; } if (isSetEnabled()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enabled, other.enabled); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetDataMovementInterfaces()) .compareTo(other.isSetDataMovementInterfaces()); if (lastComparison != 0) { return lastComparison; } if (isSetDataMovementInterfaces()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo( this.dataMovementInterfaces, other.dataMovementInterfaces); if (lastComparison != 0) { return lastComparison; } } return 0; }