mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fixing license headers
This commit is contained in:
parent
db82d5605d
commit
a5e8c8aeb7
@ -1,15 +1,19 @@
|
||||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by 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.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||
|
||||
import javax.persistence.Column;
|
||||
@ -27,19 +31,19 @@ public class ClusterDetailsVO {
|
||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||
@Column(name="id")
|
||||
private long id;
|
||||
|
||||
|
||||
@Column(name="cluster_id")
|
||||
private long clusterId;
|
||||
|
||||
|
||||
@Column(name="name")
|
||||
private String name;
|
||||
|
||||
|
||||
@Column(name="value")
|
||||
private String value;
|
||||
|
||||
|
||||
protected ClusterDetailsVO() {
|
||||
}
|
||||
|
||||
|
||||
public ClusterDetailsVO(long clusterId, String name, String value) {
|
||||
this.clusterId = clusterId;
|
||||
this.name = name;
|
||||
|
||||
@ -1,15 +1,19 @@
|
||||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by 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.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||
|
||||
import javax.persistence.Column;
|
||||
@ -26,19 +30,19 @@ public class DcDetailVO {
|
||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||
@Column(name="id")
|
||||
private long id;
|
||||
|
||||
|
||||
@Column(name="dc_id")
|
||||
private long dcId;
|
||||
|
||||
|
||||
@Column(name="name")
|
||||
private String name;
|
||||
|
||||
|
||||
@Column(name="value")
|
||||
private String value;
|
||||
|
||||
|
||||
protected DcDetailVO() {
|
||||
}
|
||||
|
||||
|
||||
public DcDetailVO(long dcId, String name, String value) {
|
||||
this.dcId = dcId;
|
||||
this.name = name;
|
||||
|
||||
@ -1,15 +1,19 @@
|
||||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by 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.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||
|
||||
import java.util.Date;
|
||||
@ -239,5 +243,5 @@ public class EngineClusterVO implements EngineCluster, Identity {
|
||||
|
||||
public State getState() {
|
||||
return state;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,19 @@
|
||||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by 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.
|
||||
// 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
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||
|
||||
import java.util.Date;
|
||||
@ -86,7 +90,7 @@ public class EngineDataCenterVO implements EngineDataCenter, Identity {
|
||||
private String domain;
|
||||
|
||||
@Column(name="networktype")
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Enumerated(EnumType.STRING)
|
||||
NetworkType networkType;
|
||||
|
||||
@Column(name="dns_provider")
|
||||
@ -115,7 +119,7 @@ public class EngineDataCenterVO implements EngineDataCenter, Identity {
|
||||
private long macAddress = 1;
|
||||
|
||||
@Column(name="zone_token")
|
||||
private String zoneToken;
|
||||
private String zoneToken;
|
||||
|
||||
@Column(name=GenericDao.REMOVED_COLUMN)
|
||||
private Date removed;
|
||||
@ -131,7 +135,7 @@ public class EngineDataCenterVO implements EngineDataCenter, Identity {
|
||||
AllocationState allocationState;
|
||||
|
||||
@Column(name="uuid")
|
||||
private String uuid;
|
||||
private String uuid;
|
||||
|
||||
@Column(name="is_security_group_enabled")
|
||||
boolean securityGroupEnabled;
|
||||
@ -199,7 +203,7 @@ public class EngineDataCenterVO implements EngineDataCenter, Identity {
|
||||
|
||||
@Override
|
||||
public String getFirewallProvider() {
|
||||
return firewallProvider;
|
||||
return firewallProvider;
|
||||
}
|
||||
|
||||
public void setFirewallProvider(String firewallProvider) {
|
||||
@ -371,7 +375,7 @@ public class EngineDataCenterVO implements EngineDataCenter, Identity {
|
||||
return networkType;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public boolean isSecurityGroupEnabled() {
|
||||
return securityGroupEnabled;
|
||||
}
|
||||
@ -396,7 +400,7 @@ public class EngineDataCenterVO implements EngineDataCenter, Identity {
|
||||
|
||||
@Override
|
||||
public void setDetails(Map<String, String> details2) {
|
||||
details = details2;
|
||||
details = details2;
|
||||
}
|
||||
|
||||
public String getDetail(String name) {
|
||||
|
||||
@ -1,15 +1,19 @@
|
||||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by 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.
|
||||
// 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
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db;
|
||||
|
||||
import java.util.Date;
|
||||
@ -82,7 +86,7 @@ public class EngineHostPodVO implements EnginePod, Identity {
|
||||
|
||||
@Column(name="lastUpdated", updatable=true)
|
||||
@Temporal(value=TemporalType.TIMESTAMP)
|
||||
protected Date lastUpdated;
|
||||
protected Date lastUpdated;
|
||||
|
||||
/**
|
||||
* Note that state is intentionally missing the setter. Any updates to
|
||||
|
||||
@ -1,15 +1,19 @@
|
||||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by 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.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db.dao;
|
||||
|
||||
import java.util.Map;
|
||||
@ -18,11 +22,11 @@ import org.apache.cloudstack.engine.datacenter.entity.api.db.DcDetailVO;
|
||||
|
||||
import com.cloud.utils.db.GenericDao;
|
||||
|
||||
public interface DcDetailsDao extends GenericDao<DcDetailVO, Long> {
|
||||
public interface DcDetailsDao extends GenericDao<DcDetailVO, Long> {
|
||||
Map<String, String> findDetails(long dcId);
|
||||
|
||||
|
||||
void persist(long dcId, Map<String, String> details);
|
||||
|
||||
|
||||
DcDetailVO findDetail(long dcId, String name);
|
||||
|
||||
void deleteDetails(long dcId);
|
||||
|
||||
@ -1,15 +1,19 @@
|
||||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by 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.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db.dao;
|
||||
|
||||
import java.util.HashMap;
|
||||
@ -32,12 +36,12 @@ import com.cloud.utils.db.Transaction;
|
||||
public class DcDetailsDaoImpl extends GenericDaoBase<DcDetailVO, Long> implements DcDetailsDao {
|
||||
protected final SearchBuilder<DcDetailVO> DcSearch;
|
||||
protected final SearchBuilder<DcDetailVO> DetailSearch;
|
||||
|
||||
|
||||
protected DcDetailsDaoImpl() {
|
||||
DcSearch = createSearchBuilder();
|
||||
DcSearch.and("dcId", DcSearch.entity().getDcId(), SearchCriteria.Op.EQ);
|
||||
DcSearch.done();
|
||||
|
||||
|
||||
DetailSearch = createSearchBuilder();
|
||||
DetailSearch.and("dcId", DetailSearch.entity().getDcId(), SearchCriteria.Op.EQ);
|
||||
DetailSearch.and("name", DetailSearch.entity().getName(), SearchCriteria.Op.EQ);
|
||||
@ -49,7 +53,7 @@ public class DcDetailsDaoImpl extends GenericDaoBase<DcDetailVO, Long> implement
|
||||
SearchCriteria<DcDetailVO> sc = DetailSearch.create();
|
||||
sc.setParameters("dcId", dcId);
|
||||
sc.setParameters("name", name);
|
||||
|
||||
|
||||
return findOneIncludingRemovedBy(sc);
|
||||
}
|
||||
|
||||
@ -57,7 +61,7 @@ public class DcDetailsDaoImpl extends GenericDaoBase<DcDetailVO, Long> implement
|
||||
public Map<String, String> findDetails(long dcId) {
|
||||
SearchCriteria<DcDetailVO> sc = DcSearch.create();
|
||||
sc.setParameters("dcId", dcId);
|
||||
|
||||
|
||||
List<DcDetailVO> results = search(sc, null);
|
||||
Map<String, String> details = new HashMap<String, String>(results.size());
|
||||
for (DcDetailVO result : results) {
|
||||
@ -65,12 +69,12 @@ public class DcDetailsDaoImpl extends GenericDaoBase<DcDetailVO, Long> implement
|
||||
}
|
||||
return details;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void deleteDetails(long dcId) {
|
||||
SearchCriteria sc = DcSearch.create();
|
||||
sc.setParameters("dcId", dcId);
|
||||
|
||||
|
||||
List<DcDetailVO> results = search(sc, null);
|
||||
for (DcDetailVO result : results) {
|
||||
remove(result.getId());
|
||||
@ -84,7 +88,7 @@ public class DcDetailsDaoImpl extends GenericDaoBase<DcDetailVO, Long> implement
|
||||
SearchCriteria<DcDetailVO> sc = DcSearch.create();
|
||||
sc.setParameters("dcId", dcId);
|
||||
expunge(sc);
|
||||
|
||||
|
||||
for (Map.Entry<String, String> detail : details.entrySet()) {
|
||||
DcDetailVO vo = new DcDetailVO(dcId, detail.getKey(), detail.getValue());
|
||||
persist(vo);
|
||||
|
||||
@ -1,15 +1,19 @@
|
||||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by 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.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -1,15 +1,19 @@
|
||||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by 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.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db.dao;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
@ -35,7 +39,6 @@ import org.springframework.stereotype.Component;
|
||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||
import com.cloud.org.Grouping;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
import com.cloud.utils.db.GenericSearchBuilder;
|
||||
import com.cloud.utils.db.JoinBuilder;
|
||||
import com.cloud.utils.db.SearchBuilder;
|
||||
import com.cloud.utils.db.SearchCriteria;
|
||||
@ -98,13 +101,13 @@ public class EngineClusterDaoImpl extends GenericDaoBase<EngineClusterVO, Long>
|
||||
StateChangeSearch = createSearchBuilder();
|
||||
StateChangeSearch.and("id", StateChangeSearch.entity().getId(), SearchCriteria.Op.EQ);
|
||||
StateChangeSearch.and("state", StateChangeSearch.entity().getState(), SearchCriteria.Op.EQ);
|
||||
StateChangeSearch.done();
|
||||
StateChangeSearch.done();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EngineClusterVO> listByZoneId(long zoneId) {
|
||||
SearchCriteria<EngineClusterVO> sc = ZoneSearch.create();
|
||||
sc.setParameters("dataCenterId", zoneId);
|
||||
sc.setParameters("dataCenterId", zoneId);
|
||||
return listBy(sc);
|
||||
}
|
||||
|
||||
@ -254,9 +257,9 @@ public class EngineClusterDaoImpl extends GenericDaoBase<EngineClusterVO, Long>
|
||||
|
||||
@Override
|
||||
public boolean updateState(State currentState, Event event, State nextState, DataCenterResourceEntity clusterEntity, Object data) {
|
||||
|
||||
|
||||
EngineClusterVO vo = findById(clusterEntity.getId());
|
||||
|
||||
|
||||
Date oldUpdatedTime = vo.getLastUpdated();
|
||||
|
||||
SearchCriteria<EngineClusterVO> sc = StateChangeSearch.create();
|
||||
|
||||
@ -1,15 +1,19 @@
|
||||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by 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.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db.dao;
|
||||
|
||||
import java.util.List;
|
||||
@ -24,7 +28,7 @@ import com.cloud.utils.fsm.StateDao;
|
||||
|
||||
public interface EngineDataCenterDao extends GenericDao<EngineDataCenterVO, Long>, StateDao<DataCenterResourceEntity.State, DataCenterResourceEntity.State.Event, DataCenterResourceEntity> {
|
||||
EngineDataCenterVO findByName(String name);
|
||||
|
||||
|
||||
/**
|
||||
* @param id data center id
|
||||
* @return a pair of mac address strings. The first one is private and second is public.
|
||||
@ -39,13 +43,13 @@ public interface EngineDataCenterDao extends GenericDao<EngineDataCenterVO, Long
|
||||
|
||||
void loadDetails(EngineDataCenterVO zone);
|
||||
void saveDetails(EngineDataCenterVO zone);
|
||||
|
||||
|
||||
List<EngineDataCenterVO> listDisabledZones();
|
||||
List<EngineDataCenterVO> listEnabledZones();
|
||||
EngineDataCenterVO findByToken(String zoneToken);
|
||||
EngineDataCenterVO findByToken(String zoneToken);
|
||||
EngineDataCenterVO findByTokenOrIdOrName(String tokenIdOrName);
|
||||
|
||||
|
||||
|
||||
|
||||
List<EngineDataCenterVO> findZonesByDomainId(Long domainId, String keyword);
|
||||
|
||||
|
||||
@ -1,15 +1,19 @@
|
||||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by 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.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db.dao;
|
||||
|
||||
import java.util.Date;
|
||||
@ -75,7 +79,7 @@ public class EngineDataCenterDaoImpl extends GenericDaoBase<EngineDataCenterVO,
|
||||
return findOneBy(sc);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public EngineDataCenterVO findByToken(String zoneToken){
|
||||
SearchCriteria<EngineDataCenterVO> sc = TokenSearch.create();
|
||||
@ -87,7 +91,7 @@ public class EngineDataCenterDaoImpl extends GenericDaoBase<EngineDataCenterVO,
|
||||
public List<EngineDataCenterVO> findZonesByDomainId(Long domainId){
|
||||
SearchCriteria<EngineDataCenterVO> sc = ListZonesByDomainIdSearch.create();
|
||||
sc.setParameters("domainId", domainId);
|
||||
return listBy(sc);
|
||||
return listBy(sc);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -100,7 +104,7 @@ public class EngineDataCenterDaoImpl extends GenericDaoBase<EngineDataCenterVO,
|
||||
ssc.addOr("description", SearchCriteria.Op.LIKE, "%" + keyword + "%");
|
||||
sc.addAnd("name", SearchCriteria.Op.SC, ssc);
|
||||
}
|
||||
return listBy(sc);
|
||||
return listBy(sc);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -113,7 +117,7 @@ public class EngineDataCenterDaoImpl extends GenericDaoBase<EngineDataCenterVO,
|
||||
ssc.addOr("description", SearchCriteria.Op.LIKE, "%" + keyword + "%");
|
||||
sc.addAnd("name", SearchCriteria.Op.SC, ssc);
|
||||
}
|
||||
return listBy(sc);
|
||||
return listBy(sc);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,7 +130,7 @@ public class EngineDataCenterDaoImpl extends GenericDaoBase<EngineDataCenterVO,
|
||||
sc.addAnd("name", SearchCriteria.Op.SC, ssc);
|
||||
}
|
||||
//sc.setParameters("domainId", domainId);
|
||||
return listBy(sc);
|
||||
return listBy(sc);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -182,7 +186,7 @@ public class EngineDataCenterDaoImpl extends GenericDaoBase<EngineDataCenterVO,
|
||||
|
||||
PublicZonesSearch = createSearchBuilder();
|
||||
PublicZonesSearch.and("domainId", PublicZonesSearch.entity().getDomainId(), SearchCriteria.Op.NULL);
|
||||
PublicZonesSearch.done();
|
||||
PublicZonesSearch.done();
|
||||
|
||||
ChildZonesSearch = createSearchBuilder();
|
||||
ChildZonesSearch.and("domainid", ChildZonesSearch.entity().getDomainId(), SearchCriteria.Op.IN);
|
||||
|
||||
@ -1,15 +1,19 @@
|
||||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by 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.
|
||||
// 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
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db.dao;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@ -1,15 +1,19 @@
|
||||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by 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.
|
||||
// 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
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
// 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 org.apache.cloudstack.engine.datacenter.entity.api.db.dao;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
@ -32,7 +36,6 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import com.cloud.org.Grouping;
|
||||
import com.cloud.utils.db.GenericDaoBase;
|
||||
import com.cloud.utils.db.GenericSearchBuilder;
|
||||
import com.cloud.utils.db.SearchBuilder;
|
||||
import com.cloud.utils.db.SearchCriteria;
|
||||
import com.cloud.utils.db.UpdateBuilder;
|
||||
@ -63,7 +66,7 @@ public class EngineHostPodDaoImpl extends GenericDaoBase<EngineHostPodVO, Long>
|
||||
UUIDSearch = createSearchBuilder();
|
||||
UUIDSearch.and("uuid", UUIDSearch.entity().getUuid(), SearchCriteria.Op.EQ);
|
||||
UUIDSearch.done();
|
||||
|
||||
|
||||
StateChangeSearch = createSearchBuilder();
|
||||
StateChangeSearch.and("id", StateChangeSearch.entity().getId(), SearchCriteria.Op.EQ);
|
||||
StateChangeSearch.and("state", StateChangeSearch.entity().getState(), SearchCriteria.Op.EQ);
|
||||
@ -123,7 +126,7 @@ public class EngineHostPodDaoImpl extends GenericDaoBase<EngineHostPodVO, Long>
|
||||
txn.start();
|
||||
EngineHostPodVO pod = createForUpdate();
|
||||
pod.setName(null);
|
||||
|
||||
|
||||
update(id, pod);
|
||||
|
||||
boolean result = super.remove(id);
|
||||
@ -139,7 +142,7 @@ public class EngineHostPodDaoImpl extends GenericDaoBase<EngineHostPodVO, Long>
|
||||
podIdSearch.and("allocationState", podIdSearch.entity().getAllocationState(), Op.EQ);
|
||||
podIdSearch.done();
|
||||
|
||||
|
||||
|
||||
SearchCriteria<Long> sc = podIdSearch.create();
|
||||
sc.addAnd("dataCenterId", SearchCriteria.Op.EQ, zoneId);
|
||||
sc.addAnd("allocationState", SearchCriteria.Op.EQ, Grouping.AllocationState.Disabled);
|
||||
@ -149,9 +152,9 @@ public class EngineHostPodDaoImpl extends GenericDaoBase<EngineHostPodVO, Long>
|
||||
|
||||
@Override
|
||||
public boolean updateState(State currentState, Event event, State nextState, DataCenterResourceEntity podEntity, Object data) {
|
||||
|
||||
|
||||
EngineHostPodVO vo = findById(podEntity.getId());
|
||||
|
||||
|
||||
Date oldUpdatedTime = vo.getLastUpdated();
|
||||
|
||||
SearchCriteria<EngineHostPodVO> sc = StateChangeSearch.create();
|
||||
@ -163,7 +166,7 @@ public class EngineHostPodDaoImpl extends GenericDaoBase<EngineHostPodVO, Long>
|
||||
builder.set(vo, "lastUpdated", new Date());
|
||||
|
||||
int rows = update((EngineHostPodVO) vo, sc);
|
||||
|
||||
|
||||
if (rows == 0 && s_logger.isDebugEnabled()) {
|
||||
EngineHostPodVO dbDC = findByIdIncludingRemoved(vo.getId());
|
||||
if (dbDC != null) {
|
||||
@ -177,7 +180,7 @@ public class EngineHostPodDaoImpl extends GenericDaoBase<EngineHostPodVO, Long>
|
||||
}
|
||||
}
|
||||
return rows > 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user