mirror of
https://github.com/apache/cloudstack
synced 2026-08-29 00:38:51 +00:00
CLOUDSTACK-4234 Dedicated Resources: When multiple dedication groups are chosen for VM deployment, dedicated resources belonging to both groups should be considered
- Override the equals method
This commit is contained in:
parent
61bd96cb3e
commit
941c12dcd7
@ -26,6 +26,7 @@ import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
|
||||
@Entity
|
||||
@Table(name="dedicated_resources")
|
||||
public class DedicatedResourceVO implements DedicatedResources{
|
||||
@ -142,4 +143,13 @@ public class DedicatedResourceVO implements DedicatedResources{
|
||||
public long getAffinityGroupId() {
|
||||
return affinityGroupId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof DedicatedResourceVO) {
|
||||
return ((DedicatedResourceVO) obj).getId() == this.getId();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user