package org.zstack.header.zone; import org.zstack.header.vo.Index; import org.zstack.header.vo.ResourceVO; import javax.persistence.*; import java.sql.Timestamp; /** */ @MappedSuperclass public class ZoneAO extends ResourceVO { @Column @Index private String name; @Column private String type; @Column private String description; @Column @Enumerated(EnumType.STRING) private ZoneState state; @Column private Timestamp createDate; @Column private Timestamp lastOpDate; @PreUpdate private void preUpdate() { lastOpDate = null; } public ZoneAO() { this.state = ZoneState.Enabled; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getUuid() { return uuid; } public void setUuid(String uuid) { this.uuid = uuid; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getType() { return type; } public void setType(String type) { this.type = type; } public ZoneState getState() { return state; } public void setState(ZoneState state) { this.state = state; } 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; } }