// 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 package com.cloud.storage.dao; import java.util.List; import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.storage.Storage.ImageFormat; import com.cloud.storage.Volume; import com.cloud.storage.VolumeVO; import com.cloud.utils.Pair; import com.cloud.utils.db.GenericDao; import com.cloud.utils.fsm.StateDao; public interface VolumeDao extends GenericDao, StateDao { List findDetachedByAccount(long accountId); List findByAccount(long accountId); Pair getCountAndTotalByPool(long poolId); Pair getNonDestroyedCountAndTotalByPool(long poolId); List findByInstance(long id); List findByInstanceAndType(long id, Volume.Type vType); List findByInstanceIdDestroyed(long vmId); List findByAccountAndPod(long accountId, long podId); List findByTemplateAndZone(long templateId, long zoneId); void deleteVolumesByInstance(long instanceId); void attachVolume(long volumeId, long vmId, long deviceId); void detachVolume(long volumeId); boolean isAnyVolumeActivelyUsingTemplateOnPool(long templateId, long poolId); List findCreatedByInstance(long id); List findByPoolId(long poolId); List findByInstanceAndDeviceId(long instanceId, long deviceId); List findUsableVolumesForInstance(long instanceId); Long countAllocatedVolumesForAccount(long accountId); HypervisorType getHypervisorType(long volumeId); List listVolumesToBeDestroyed(); ImageFormat getImageFormat(Long volumeId); List findReadyRootVolumesByInstance(long instanceId); List listPoolIdsByVolumeCount(long dcId, Long podId, Long clusterId, long accountId); }