Moved most of the VOs and DAOs from server package into engine-schema as well

This commit is contained in:
Alex Huang 2013-05-02 06:50:38 -07:00
parent f6913b5088
commit 572e71e57d
479 changed files with 374 additions and 1563 deletions

View File

@ -1,151 +0,0 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.vm;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import com.cloud.hypervisor.Hypervisor.HypervisorType;
/**
* ConsoleProxyVO domain object
*/
@Entity
@Table(name = "console_proxy")
@PrimaryKeyJoinColumn(name = "id")
@DiscriminatorValue(value = "ConsoleProxy")
public class ConsoleProxyVO extends VMInstanceVO implements ConsoleProxy {
@Column(name = "public_ip_address", nullable = false)
private String publicIpAddress;
@Column(name = "public_mac_address", nullable = false)
private String publicMacAddress;
@Column(name = "public_netmask", nullable = false)
private String publicNetmask;
@Column(name = "active_session", updatable = true, nullable = false)
private int activeSession;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "last_update", updatable = true, nullable = true)
private Date lastUpdateTime;
@Column(name = "session_details", updatable = true, nullable = true)
private byte[] sessionDetails;
@Transient
private boolean sslEnabled = false;
@Transient
private int port;
/**
* Correct constructor to use.
*
*/
public ConsoleProxyVO(long id, long serviceOfferingId, String name, long templateId, HypervisorType hypervisorType, long guestOSId, long dataCenterId, long domainId, long accountId,
int activeSession, boolean haEnabled) {
super(id, serviceOfferingId, name, name, Type.ConsoleProxy, templateId, hypervisorType, guestOSId, domainId, accountId, haEnabled);
this.activeSession = activeSession;
}
protected ConsoleProxyVO() {
super();
}
public void setPublicIpAddress(String publicIpAddress) {
this.publicIpAddress = publicIpAddress;
}
public void setPublicNetmask(String publicNetmask) {
this.publicNetmask = publicNetmask;
}
public void setPublicMacAddress(String publicMacAddress) {
this.publicMacAddress = publicMacAddress;
}
public void setActiveSession(int activeSession) {
this.activeSession = activeSession;
}
public void setLastUpdateTime(Date time) {
this.lastUpdateTime = time;
}
public void setSessionDetails(byte[] details) {
this.sessionDetails = details;
}
@Override
public String getPublicIpAddress() {
return this.publicIpAddress;
}
@Override
public String getPublicNetmask() {
return this.publicNetmask;
}
@Override
public String getPublicMacAddress() {
return this.publicMacAddress;
}
@Override
public int getActiveSession() {
return this.activeSession;
}
@Override
public Date getLastUpdateTime() {
return this.lastUpdateTime;
}
@Override
public byte[] getSessionDetails() {
return this.sessionDetails;
}
public boolean isSslEnabled() {
return sslEnabled;
}
public void setSslEnabled(boolean sslEnabled) {
this.sslEnabled = sslEnabled;
}
public void setPort(int port) {
this.port = port;
}
public int getPort() {
return port;
}
}

View File

@ -27,7 +27,6 @@ import java.util.Map;
import javax.ejb.Local;
import javax.inject.Inject;
import com.cloud.configuration.Config;
import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
import org.apache.log4j.Logger;

Some files were not shown because too many files have changed in this diff Show More