Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/HeuristicLab.Hive.Server.DataAccess-3.3.csproj
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/HeuristicLab.Hive.Server.DataAccess-3.3.csproj	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/HeuristicLab.Hive.Server.DataAccess-3.3.csproj	(revision 4074)
@@ -0,0 +1,138 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{4D5A2A16-66C2-431D-9AA3-BD3041E64B84}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Hive.Server.DataAccess</RootNamespace>
+    <AssemblyName>HeuristicLab.Hive.Server.DataAccess-3.2</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <StartupObject>
+    </StartupObject>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <ItemGroup>
+    <Compile Include="IClientConfigAdapter.cs" />
+    <Compile Include="IClientConfigDao.cs" />
+    <Compile Include="IClientDao.cs" />
+    <Compile Include="IClientGroupDao.cs" />
+    <Compile Include="IGenericDao.cs" />
+    <Compile Include="IJobDao.cs" />
+    <Compile Include="IPluginInfoAdapter.cs" />
+    <Compile Include="IPluginInfoDao.cs" />
+    <Compile Include="IProjectAdapter.cs" />
+    <Compile Include="IUptimeCalendarDao.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="HiveServerDataAccessPlugin.cs" />
+    <Compile Include="IClientAdapter.cs" />
+    <Compile Include="IClientGroupAdapter.cs" />
+    <Compile Include="IJobAdapter.cs" />
+    <Compile Include="IJobResultsAdapter.cs" />
+    <Compile Include="IResourceAdapter.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.DataAccess\3.3\HeuristicLab.DataAccess-3.3.csproj">
+      <Project>{9076697B-C151-46CD-95BC-1D059492B478}</Project>
+      <Name>HeuristicLab.DataAccess-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Hive.Contracts\3.3\HeuristicLab.Hive.Contracts-3.3.csproj">
+      <Project>{134F93D7-E7C8-4ECD-9923-7F63259A60D8}</Project>
+      <Name>HeuristicLab.Hive.Contracts-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd</PreBuildEvent>
+  </PropertyGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Transactions" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+</Project>
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/HiveServerDataAccessPlugin.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/HiveServerDataAccessPlugin.cs	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/HiveServerDataAccessPlugin.cs	(revision 4074)
@@ -0,0 +1,35 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Hive.DataAccess {
+  [Plugin("HeuristicLab.Hive.Server.DataAccess-3.2")]
+  [PluginFile("HeuristicLab.Hive.Server.DataAccess-3.2.dll", PluginFileType.Assembly)]  
+  [PluginDependency("HeuristicLab.Core-3.2")]
+  [PluginDependency("HeuristicLab.DataAccess-3.2")]
+  [PluginDependency("HeuristicLab.Hive.Contracts-3.2")]
+  public class HiveServerDataAccessPlugin : PluginBase {
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientAdapter.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientAdapter.cs	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientAdapter.cs	(revision 4074)
@@ -0,0 +1,46 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Hive.Contracts.BusinessObjects;
+using HeuristicLab.DataAccess.Interfaces;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  /// <summary>
+  /// The client database adapter
+  /// </summary>
+  public interface IClientAdapter : IDataAdapter<ClientDto> {
+    /// <summary>
+    /// Get the client with the specified name
+    /// </summary>
+    /// <param name="clientId"></param>
+    /// <returns></returns>
+    ClientDto GetByName(string name);
+
+    /// <summary>
+    /// Gets all clients that are not in a group
+    /// </summary>
+    /// <returns></returns>
+    ICollection<ClientDto> GetGrouplessClients();
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientConfigAdapter.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientConfigAdapter.cs	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientConfigAdapter.cs	(revision 4074)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Hive.Contracts.BusinessObjects;
+using HeuristicLab.DataAccess.Interfaces;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  public interface IClientConfigAdapter: IDataAdapter<ClientConfigDto> {
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientConfigDao.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientConfigDao.cs	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientConfigDao.cs	(revision 4074)
@@ -0,0 +1,10 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Hive.Contracts.BusinessObjects;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  public interface IClientConfigDao: IGenericDao<ClientConfigDto> {
+
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientDao.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientDao.cs	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientDao.cs	(revision 4074)
@@ -0,0 +1,12 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Hive.Contracts.BusinessObjects;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  public interface IClientDao: IGenericDao<ClientDto> {
+    IEnumerable<ClientDto> FindAllClientsWithoutGroup();
+    ClientDto GetClientForJob(Guid jobId);
+    void SetServerSideCalendar(ClientDto client, Guid clientGroupId);    
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientGroupAdapter.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientGroupAdapter.cs	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientGroupAdapter.cs	(revision 4074)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Hive.Contracts.BusinessObjects;
+using HeuristicLab.DataAccess.Interfaces;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  /// <summary>
+  /// The client group database adapter
+  /// </summary>
+  public interface IClientGroupAdapter: IDataAdapter<ClientGroupDto> {
+    /// <summary>
+    /// Get the client group with the specified name
+    /// </summary>
+    /// <param name="clientId"></param>
+    /// <returns></returns>
+    ClientGroupDto GetByName(string name);
+
+    /// <summary>
+    /// Gets all client groups where the resource is member of
+    /// </summary>
+    /// <param name="permOwner"></param>
+    /// <returns></returns>
+    ICollection<ClientGroupDto> MemberOf(ResourceDto resource);
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientGroupDao.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientGroupDao.cs	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IClientGroupDao.cs	(revision 4074)
@@ -0,0 +1,18 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Hive.Contracts.BusinessObjects;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  public interface IClientGroupDao: IGenericDao<ClientGroupDto> {
+    void AddRessourceToClientGroup(Guid ressource, Guid clientGroupId);
+    void RemoveRessourceFromClientGroup(Guid ressource, Guid clientGroupId);
+
+    IEnumerable<ClientGroupDto> MemberOf(ClientDto client);
+
+    IEnumerable<ClientGroupDto> FindAllWithSubGroupsAndClients();
+    IEnumerable<Guid> FindAllGroupAndParentGroupIdsForClient(Guid clientId);
+
+    IEnumerable<ClientGroupDto> FindByName(string res);
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IExecutableJobAdapter.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IExecutableJobAdapter.cs	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IExecutableJobAdapter.cs	(revision 4074)
@@ -0,0 +1,43 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Hive.Contracts.BusinessObjects;
+using HeuristicLab.DataAccess.Interfaces;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  public interface IExecutableJobAdapter: IDataAdapter<ExecutableJob> {
+    /// <summary>
+    /// Finds a job with the specified criterias 
+    /// </summary>
+    /// <param name="state">all jobs with the specified state</param>
+    /// <param name="cores">all jobs which require less or equal cores</param>
+    /// <param name="memory">all jobs which require less or equal memory</param>
+    /// <param name="resourceId">all jobs that can be calculated by that resource</param>
+    /// <returns></returns>
+    ICollection<ExecutableJob> FindJobs(State state,
+      int cores,
+      int memory,
+      Guid resourceId);
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IGenericDao.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IGenericDao.cs	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IGenericDao.cs	(revision 4074)
@@ -0,0 +1,15 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  public interface IGenericDao<TBusiness> {
+    TBusiness FindById(Guid id);
+    IEnumerable<TBusiness> FindAll();
+    TBusiness Insert(TBusiness bObj);
+    
+    void Delete(TBusiness bObj);
+
+    void Update(TBusiness bObj);
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobAdapter.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobAdapter.cs	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobAdapter.cs	(revision 4074)
@@ -0,0 +1,104 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Hive.Contracts.BusinessObjects;
+using HeuristicLab.DataAccess.Interfaces;
+using System.IO;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  public interface IJobAdapter: IDataAdapter<JobDto> {
+    /// <summary>
+    /// Gets all subjobs of the specified job
+    /// </summary>
+    /// <returns></returns>
+    ICollection<JobDto> GetAllSubjobs(JobDto job);
+
+    /// <summary>
+    /// Gets all Jobs with the specified state
+    /// </summary>
+    /// <returns></returns>
+    ICollection<JobDto> GetJobsByState(State state);
+
+    /// <summary>
+    /// Finds a job with the specified criterias 
+    /// </summary>
+    /// <param name="state">all jobs with the specified state</param>
+    /// <param name="cores">all jobs which require less or equal cores</param>
+    /// <param name="memory">all jobs which require less or equal memory</param>
+    /// <param name="resourceId">all jobs that can be calculated by that resource</param>
+    /// <returns></returns>
+    ICollection<JobDto> FindJobs(State state, 
+      int cores, 
+      int memory, 
+      Guid resourceId);
+
+    /// <summary>
+    /// Gets all jobs of the client
+    /// </summary>
+    /// <param name="client"></param>
+    /// <returns></returns>
+    ICollection<JobDto> GetJobsOf(ClientDto client);
+
+    /// <summary>
+    /// Gets all active jobs of the client
+    /// </summary>
+    /// <param name="client"></param>
+    /// <returns></returns>
+    ICollection<JobDto> GetActiveJobsOf(ClientDto client);
+
+    /// <summary>
+    /// Gets all jobs of the user
+    /// </summary>
+    /// <param name="user"></param>
+    /// <returns></returns>
+    ICollection<JobDto> GetJobsOf(Guid userId);
+
+    /// <summary>
+    /// Gets all jobs of the project
+    /// </summary>
+    /// <param name="user"></param>
+    /// <returns></returns>
+    ICollection<JobDto> GetJobsByProject(Guid projectId);
+
+    /// <summary>
+    /// Gets the computable job with the secified jobId
+    /// </summary>
+    /// <param name="jobId"></param>
+    /// <returns></returns>
+    SerializedJob GetSerializedJob(Guid jobId);
+
+    /// <summary>
+    /// Gets a stream object for the large serialized job data
+    /// </summary>
+    /// <param name="jobId"></param>
+    /// <returns></returns>
+    Stream GetSerializedJobStream(Guid jobId, bool useExistingConnection);
+
+    /// <summary>
+    /// Saves or update the computable job
+    /// </summary>
+    /// <param name="jobId"></param>
+    void UpdateSerializedJob(SerializedJob job);
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobDao.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobDao.cs	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobDao.cs	(revision 4074)
@@ -0,0 +1,28 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Hive.Contracts.BusinessObjects;
+using System.IO;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  public interface IJobDao: IGenericDao<JobDto> {
+    IEnumerable<JobDto> FindActiveJobsOfClient(ClientDto client);
+
+    IEnumerable<JobDto> GetJobsByState(State state);
+
+    void AssignClientToJob(Guid clientId, Guid jobId);
+
+    void SetJobOffline(JobDto job);
+
+    SerializedJob InsertWithAttachedJob(SerializedJob job);
+
+    byte[] GetBinaryJobFile(Guid jobId); 
+
+    IEnumerable<JobDto> FindFittingJobsForClient(State state, int freeCores, int freeMemory, Guid clientGuid);
+    Stream GetSerializedJobStream(Guid jobId);
+
+    IEnumerable<JobDto> FindWithLimitations(State jobState, int offset, int count);
+
+    void SetBinaryJobFile(Guid jobId, byte[] data);
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobResultsAdapter.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobResultsAdapter.cs	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IJobResultsAdapter.cs	(revision 4074)
@@ -0,0 +1,65 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Hive.Contracts.BusinessObjects;
+using HeuristicLab.DataAccess.Interfaces;
+using System.IO;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  public interface IJobResultsAdapter: IDataAdapter<JobResult> {
+    /// <summary>
+    /// Gets all results for the specified job
+    /// </summary>
+    /// <param name="job"></param>
+    /// <returns></returns>
+    ICollection<JobResult> GetResultsOf(Guid jobId);
+
+    /// <summary>
+    /// Gets the last result for the specified job
+    /// </summary>
+    /// <param name="job"></param>
+    /// <returns></returns>
+    JobResult GetLastResultOf(Guid jobId);
+
+    /// <summary>
+    /// Gets the computable job result with the secified jobResultId
+    /// </summary>
+    /// <param name="jobId"></param>
+    /// <returns></returns>
+    SerializedJobResult GetSerializedJobResult(Guid jobResultId);
+
+    /// <summary>
+    /// Gets a stream object for the large serialized job result data
+    /// </summary>
+    /// <param name="jobId"></param>
+    /// <returns></returns>
+    Stream GetSerializedJobResultStream(Guid jobResultId, bool useExistingConnection);
+
+    /// <summary>
+    /// Saves or update the computable job result
+    /// </summary>
+    /// <param name="jobId"></param>
+    void UpdateSerializedJobResult(SerializedJobResult jobResult);
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IPluginInfoAdapter.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IPluginInfoAdapter.cs	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IPluginInfoAdapter.cs	(revision 4074)
@@ -0,0 +1,37 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Hive.Contracts.BusinessObjects;
+using HeuristicLab.DataAccess.Interfaces;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  /// <summary>
+  /// The plugin info database adapter
+  /// </summary>
+  public interface IPluginInfoAdapter : IDataAdapter<HivePluginInfoDto> {
+    HivePluginInfoDto GetByNameVersionBuilddate(String name, String version, DateTime buildDate);
+
+    ICollection<HivePluginInfoDto> GetOrphanedPluginInfos();
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IPluginInfoDao.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IPluginInfoDao.cs	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IPluginInfoDao.cs	(revision 4074)
@@ -0,0 +1,11 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Hive.Contracts.BusinessObjects;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  public interface IPluginInfoDao: IGenericDao<HivePluginInfoDto> {    
+    void InsertPluginDependenciesForJob(JobDto jobDto);
+    List<HivePluginInfoDto> GetPluginDependenciesForJob(JobDto jobDto);
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IProjectAdapter.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IProjectAdapter.cs	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IProjectAdapter.cs	(revision 4074)
@@ -0,0 +1,10 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Hive.Contracts.BusinessObjects;
+using HeuristicLab.DataAccess.Interfaces;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  public interface IProjectAdapter : IDataAdapter<ProjectDto> {
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IResourceAdapter.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IResourceAdapter.cs	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IResourceAdapter.cs	(revision 4074)
@@ -0,0 +1,47 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Hive.Contracts.BusinessObjects;
+using HeuristicLab.DataAccess.Interfaces;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  /// <summary>
+  /// The resource database adapter
+  /// </summary>
+  public interface IResourceAdapter: IPolymorphicDataAdapter<ResourceDto> {
+    /// <summary>
+    /// Gets the resource and updates the values of the object
+    /// </summary>
+    /// <param name="resource"></param>
+    /// <returns></returns>
+    bool GetById(ResourceDto resource);
+
+    /// <summary>
+    /// Get the resource with the specified name
+    /// </summary>
+    /// <param name="clientId"></param>
+    /// <returns></returns>
+    ResourceDto GetByName(string name);
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IUptimeCalendarDao.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IUptimeCalendarDao.cs	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IUptimeCalendarDao.cs	(revision 4074)
@@ -0,0 +1,13 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Hive.Contracts.BusinessObjects;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  public interface IUptimeCalendarDao: IGenericDao<AppointmentDto> {
+    IEnumerable<AppointmentDto> GetUptimeCalendarForResource(Guid resourceId);
+    void SetUptimeCalendarForResource(Guid resourceId, IEnumerable<AppointmentDto> appointments);
+    void NotifyClientsOfNewCalendar(Guid groupId, bool forcePush);
+    IEnumerable<AppointmentDto> GetCalendarForClient(ClientDto client);
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/Properties/AssemblyInfo.frame
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/Properties/AssemblyInfo.frame	(revision 4074)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/Properties/AssemblyInfo.frame	(revision 4074)
@@ -0,0 +1,59 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using HeuristicLab.PluginInfrastructure;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Hive.Server.DataAccess")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2008 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("258B3848-8048-4c22-A52F-24C7E823A5B1")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("3.2.0.$WCREV$")]
+[assembly: AssemblyFileVersion("3.2.0.$WCREV$")]
+[assembly: AssemblyBuildDate("$WCNOW$")]
