@Test public void testGetDefaultQuotaForStoragePool() { Quota quota = dao.getDefaultQuotaForStoragePool(FixturesTool.STORAGE_POOL_NFS); assertNotNull(quota); assertEquals(FixturesTool.STORAGE_POOL_NFS, quota.getStoragePoolId()); assertTrue(quota.isDefault()); }
private MapSqlParameterSource createQuotaMetaDataParameterMapper(Quota quota) { return createQuotaIdParameterMapper(quota.getId()).addValue("storage_pool_id", quota.getStoragePoolId()) .addValue("quota_name", quota.getQuotaName()) .addValue("description", quota.getDescription()) .addValue("threshold_cluster_percentage", quota.getThresholdClusterPercentage()) .addValue("threshold_storage_percentage", quota.getThresholdStoragePercentage()) .addValue("grace_cluster_percentage", quota.getGraceClusterPercentage()) .addValue("grace_storage_percentage", quota.getGraceStoragePercentage()) .addValue("is_default", quota.isDefault()); }