package org.zstack.header.configuration;
import org.zstack.header.vo.Index;
import org.zstack.header.vo.ResourceVO;
import javax.persistence.*;
import java.sql.Timestamp;
@MappedSuperclass
public class DiskOfferingAO extends ResourceVO {
@Column
@Index
private String name;
@Column
private String description;
@Column
private long diskSize;
@Column
private int sortKey;
@Column
private String type;
@Column
@Enumerated(EnumType.STRING)
private DiskOfferingState state;
@Column
private Timestamp createDate;
@Column
private Timestamp lastOpDate;
@Column
private String allocatorStrategy;
@PreUpdate
private void preUpdate() {
lastOpDate = null;
}
public long getDiskSize() {
return diskSize;
}
public void setDiskSize(long diskSize) {
this.diskSize = diskSize;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public int getSortKey() {
return sortKey;
}
public void setSortKey(int sortKey) {
this.sortKey = sortKey;
}
public String getAllocatorStrategy() {
return allocatorStrategy;
}
public void setAllocatorStrategy(String allocatorStrategy) {
this.allocatorStrategy = allocatorStrategy;
}
public Timestamp getCreateDate() {
return createDate;
}
public void setCreateDate(Timestamp createDate) {
this.createDate = createDate;
}
public Timestamp getLastOpDate() {
return lastOpDate;
}
public void setLastOpDate(Timestamp lastOpDate) {
this.lastOpDate = lastOpDate;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public DiskOfferingState getState() {
return state;
}
public void setState(DiskOfferingState state) {
this.state = state;
}
}