Index: branches/3.2/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/HiveDataContext.xml
===================================================================
--- branches/3.2/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/HiveDataContext.xml	(revision 3808)
+++ branches/3.2/sources/HeuristicLab.Hive.Server.LINQDataAccess/3.2/HiveDataContext.xml	(revision 3808)
@@ -0,0 +1,130 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Database Name="HeuristicLab.Hive.Linq" Class="HiveDataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
+  <Table Name="dbo.AssignedResources" Member="AssignedResources">
+    <Type Name="AssignedResource">
+      <Column Name="ResourceId" Member="ResourceId" DbType="UniqueIdentifier NOT NULL" Type="System.Guid"/>
+      <Column Name="JobId" Member="JobId" DbType="UniqueIdentifier NOT NULL" Type="System.Guid" />
+      <Column Name="AssignedRessourcesId" Member="AssignedRessourcesId" DbType="UniqueIdentifier NOT NULL" Type="System.Guid" IsPrimaryKey="true" IsDbGenerated="true" AutoSync="OnInsert" />
+      <Association Name="Resource_AssignedResource" Member="Resource" ThisKey="ResourceId" OtherKey="ResourceId" DeleteRule="CASCADE" DeleteOnNull="true" IsForeignKey="true" Type="Resource"/>
+      <Association Name="Job_AssignedResource" Member="Job" ThisKey="JobId" OtherKey="JobId" DeleteRule="CASCADE" DeleteOnNull="true" IsForeignKey="true" Type="Job"/>
+    </Type>
+  </Table>
+  <Table Name="dbo.UptimeStatistics" Member="UptimeStatistics">
+    <Type Name="UptimeStatistic">
+      <Column Name="UptimeStatisticsId" Member="UptimeStatisticsId" DbType="UniqueIdentifier NOT NULL" Type="System.Guid" IsPrimaryKey="true" IsDbGenerated="true" AutoSync="OnInsert" />
+      <Column Name="Login" Member="Login" DbType="DateTime" Type="System.DateTime" />
+      <Column Name="Logout" Member="Logout" DbType="DateTime" Type="System.DateTime" />
+      <Column Name="ResourceId" Member="ResourceId" DbType="UniqueIdentifier" Type="System.Guid" />
+      <Association Name="Client_UptimeStatistic" Member="Client" ThisKey="ResourceId" OtherKey="ResourceId" DeleteRule="SET NULL" IsForeignKey="true" Type="Client"/>
+    </Type>
+  </Table>
+  <Table Name="dbo.ClientConfig" Member="ClientConfigs">
+    <Type Name="ClientConfig">
+      <Column Name="ClientConfigId" Member="ClientConfigId" DbType="UniqueIdentifier NOT NULL" Type="System.Guid" IsPrimaryKey="true" IsDbGenerated="true" AutoSync="OnInsert" />
+      <Column Name="UpDownTimeCalendar" Member="UpDownTimeCalendar" DbType="Xml" UpdateCheck="Never" Type="System.Xml.Linq.XElement"/>
+      <Column Name="HeartBeatIntervall" Member="HeartBeatIntervall" DbType="Int" Type="System.Int32"/>
+      <Association Name="ClientConfig_Client" Member="Clients"  ThisKey="ClientConfigId" OtherKey="ClientConfigId" Type="Client"/>
+    </Type>
+  </Table>
+
+  <Table Name="dbo.ClientGroup_Resource" Member="ClientGroup_Resources">
+    <Type Name="ClientGroup_Resource">
+      <Column Name="ClientGroup_RessourceId" Member="ClientGroup_RessourceId" DbType="UniqueIdentifier NOT NULL" Type="System.Guid" IsPrimaryKey="true" IsDbGenerated="true" AutoSync="OnInsert" />
+      <Column Name="ClientGroupId" Member="ClientGroupId" DbType="UniqueIdentifier NOT NULL" Type="System.Guid" />
+      <Column Name="ResourceId" Member="ResourceId" DbType="UniqueIdentifier NOT NULL" Type="System.Guid" />
+    
+      <Association Name="ClientGroup_ClientGroup_Resource" Member="ClientGroup" ThisKey="ClientGroupId" OtherKey="ResourceId" IsForeignKey="true" Type="ClientGroup" />
+      <Association Name="Resource_ClientGroup_Resource" Member="Resource" ThisKey="ResourceId" OtherKey="ResourceId" DeleteRule="CASCADE" DeleteOnNull="true" IsForeignKey="true" Type="Resource"/>
+    </Type>
+  </Table>
+  <Table Name="dbo.PluginInfo" Member="PluginInfos">
+    <Type Name="PluginInfo">
+      <Column Name="PluginId" Member="PluginId" DbType="UniqueIdentifier NOT NULL" Type="System.Guid" IsPrimaryKey="true" IsDbGenerated="true" AutoSync="OnInsert" />
+      <Column Name="Name" Member="Name" DbType="VarChar(MAX)" Type="System.String" />
+      <Column Name="Version" Member="Version" DbType="VarChar(MAX)" Type="System.String"/>
+      <Column Name="BuildDate" Member="BuildDate" DbType="VarChar(20)" Type="System.String" />
+      <Association Name="PluginInfo_RequiredPlugin" Member="RequiredPlugins" ThisKey="PluginId" OtherKey="PluginId" Type="RequiredPlugin"/>
+    </Type>
+  </Table>
+  <Table Name="dbo.Project" Member="Projects">
+    <Type Name="Project">
+      <Column Name="ProjectId" Member="ProjectId" DbType="UniqueIdentifier NOT NULL" Type="System.Guid" IsPrimaryKey="true" IsDbGenerated="true" AutoSync="OnInsert" />
+      <Column Name="Name" Member="Name" DbType="VarChar(MAX)" Type="System.String"/>
+      <Association Name="Project_Job" Member="Jobs" ThisKey="ProjectId" OtherKey="ProjectId" Type="Job" />
+    </Type>
+  </Table>
+  <Table Name="dbo.RequiredPlugins" Member="RequiredPlugins">
+    <Type Name="RequiredPlugin">
+      <Column Name="RequiredPluginId" Member="RequiredPluginId" DbType="UniqueIdentifier NOT NULL" Type="System.Guid" IsPrimaryKey="true" IsDbGenerated="true" UpdateCheck="Never" AutoSync="OnInsert" />
+      <Column Name="JobId" Member="JobId" DbType="UniqueIdentifier NOT NULL" Type="System.Guid" />
+      <Column Name="PluginId" Member="PluginId" DbType="UniqueIdentifier NOT NULL" Type="System.Guid" />
+      <Association Name="PluginInfo_RequiredPlugin" Member="PluginInfo" ThisKey="PluginId" OtherKey="PluginId" DeleteRule="CASCADE" DeleteOnNull="true" IsForeignKey="true" Type="PluginInfo"/>
+      <Association Name="Job_RequiredPlugin" Member="Job" ThisKey="JobId" OtherKey="JobId" IsForeignKey="true" Type="Job"/>
+    </Type>
+  </Table>
+  <Table Name="dbo.Resource" Member="Resources">
+    <Type Name="Resource" InheritanceCode="RESOURCE">
+      <Column Name="ResourceId" Member="ResourceId" DbType="UniqueIdentifier NOT NULL" Type="System.Guid" IsPrimaryKey="true" AutoSync="OnInsert" />
+      <Column Name="Name" Member="Name" DbType="VarChar(MAX)" Type="System.String" />
+      <Column Name="ResourceType" Member="ResourceType" IsDiscriminator="true" Type="System.String"/>
+      <Association Name="Resource_AssignedResource" Member="AssignedResources" ThisKey="ResourceId" OtherKey="ResourceId" Type="AssignedResource"/>      
+      <Association Name="Resource_ClientGroup_Resource" Member="ClientGroup_Resources" ThisKey="ResourceId" OtherKey="ResourceId" Type="ClientGroup_Resource" />
+      <Association Name="Resource_UptimeCalendar" Member="UptimeCalendars" ThisKey="ResourceId" OtherKey="ResourceId" Type="UptimeCalendar" />      
+      <Type Name="Client" InheritanceCode="CLIENT" IsInheritanceDefault="true">        
+        <Column Name="CPUSpeed" Member="CPUSpeed" DbType="Int NOT NULL" Type="System.Int32" />
+        <Column Name="Memory" Member="Memory" DbType="Int NOT NULL" Type="System.Int32" />
+        <Column Name="Login" Member="Login" DbType="DateTime NOT NULL" Type="System.DateTime" />
+        <Column Name="Status" Member="Status" DbType="VarChar(MAX)" Type="System.String" />
+        <Column Name="CalendarSyncStatus" Member="CalendarSyncStatus" DbType="VarChar(MAX)" Type="System.String" />
+        <Column Name="UseCalendarFromResourceId" Member="UseCalendarFromResourceId" DbType="UniqueIdentifier" Type="System.Guid"/>
+        <Column Name="ClientConfigId" Member="ClientConfigId" DbType="UniqueIdentifier" Type="System.Guid"/>
+        <Column Name="NumberOfCores" Member="NumberOfCores" DbType="Int NOT NULL" Type="System.Int32" />
+        <Column Name="NumberOfFreeCores" Member="NumberOfFreeCores" DbType="Int NOT NULL" Type="System.Int32"/>
+        <Column Name="FreeMemory" Member="FreeMemory" DbType="Int NOT NULL" Type="System.Int32"/>
+        <Association Name="Client_UptimeStatistic" Member="UptimeStatistics" ThisKey="ResourceId" OtherKey="ResourceId" Type="UptimeStatistic"/>
+        <Association Name="Client_Job" Member="Jobs" ThisKey="ResourceId" OtherKey="ResourceId" Type="Job"/>        
+        <Association Name="ClientConfig_Client" Member="ClientConfig" ThisKey="ClientConfigId" OtherKey="ClientConfigId" DeleteRule="SET NULL" IsForeignKey="true" Type="ClientConfig"/>
+      </Type>
+      <Type Name="ClientGroup" InheritanceCode="GROUP" IsInheritanceDefault="false">
+        <Association Name="ClientGroup_ClientGroup_Resource" Member="ClientGroup_Resources" ThisKey="ResourceId" OtherKey="ClientGroupId" Type="ClientGroup_Resource" />
+      </Type>
+    </Type>
+  </Table>
+  
+  <Table Name="dbo.Job" Member="Jobs">
+    <Type Name="Job">
+      <Column Name="JobId" Member="JobId" DbType="UniqueIdentifier NOT NULL" Type="System.Guid" IsPrimaryKey="true" IsDbGenerated="true" AutoSync="OnInsert" />
+      <Column Name="ParentJobId" Member="ParentJobId" DbType="UniqueIdentifier" Type="System.Guid" />
+      <Column Name="JobState" Member="JobState" DbType="VarChar(MAX)" Type="System.String"/>
+      <Column Name="ResourceId" Member="ResourceId" DbType="UniqueIdentifier" Type="System.Guid"/>
+      <Column Name="Percentage" Member="Percentage" DbType="Float" Type="System.Double"/>
+      <Column Name="SerializedJob" Member="SerializedJob" DbType="VarBinary(MAX)" UpdateCheck="Never" Type="System.Data.Linq.Binary"/>
+      <Column Name="DateCreated" Member="DateCreated" DbType="DateTime" Type="System.DateTime"/>
+      <Column Name="DateCalculated" Member="DateCalculated" DbType="DateTime" Type="System.DateTime"/>
+      <Column Name="DateFinished" Member="DateFinished" DbType="DateTime" Type="System.DateTime"/>
+      <Column Name="Priority" Member="Priority" DbType="Int NOT NULL" Type="System.Int32"/>
+      <Column Name="ProjectId" Member="ProjectId" DbType="UniqueIdentifier" Type="System.Guid"/>
+      <Column Name="UserId" Member="UserId" DbType="UniqueIdentifier" Type="System.Guid"/>
+      <Column Name="CoresNeeded" Member="CoresNeeded" DbType="Int NOT NULL" Type="System.Int32"/>
+      <Column Name="MemoryNeeded" Member="MemoryNeeded" DbType="Int NOT NULL" Type="System.Int32"/>
+      <Association Name="Job_AssignedResource" Member="AssignedResources" ThisKey="JobId" OtherKey="JobId" Type="AssignedResource"/>
+      <Association Name="Job_RequiredPlugin" Member="RequiredPlugins" ThisKey="JobId" OtherKey="JobId" Type="RequiredPlugin" />
+      <Association Name="Job_Job" Member="Jobs" ThisKey="JobId" OtherKey="ParentJobId" Type="Job"/>
+      <Association Name="Job_Job" Member="Job1" ThisKey="ParentJobId" OtherKey="JobId" IsForeignKey="true" Type="Job" />
+      <Association Name="Project_Job" Member="Project" ThisKey="ProjectId" OtherKey="ProjectId" DeleteRule="SET NULL" IsForeignKey="true" Type="Project"/>
+      <Association Name="Client_Job" Member="Client" ThisKey="ResourceId" OtherKey="ResourceId" DeleteRule="SET NULL" IsForeignKey="true" Type="Client"/>
+    </Type>
+  </Table>
+  <Table Name="dbo.UptimeCalendar" Member="UptimeCalendars">
+    <Type Name="UptimeCalendar">
+      <Column Name="UptimeCalendarId" Member="UptimeCalendarId" DbType="UniqueIdentifier NOT NULL" Type="System.Guid" IsPrimaryKey="true" IsDbGenerated="true" AutoSync="OnInsert" />
+      <Column Name="ResourceId" Member="ResourceId" DbType="UniqueIdentifier NOT NULL" Type="System.Guid" />
+      <Column Name="StartDate" Member="StartDate" DbType="DateTime NOT NULL" Type="System.DateTime" />
+      <Column Name="EndDate" Member="EndDate" DbType="DateTime NOT NULL" Type="System.DateTime"/>
+      <Column Name="AllDayEvent" Member="AllDayEvent" DbType="Bit NOT NULL" Type="System.Boolean"/>
+      <Column Name="Recurring" Member="Recurring" DbType="Bit NOT NULL" Type="System.Boolean"/>
+      <Column Name="RecurringId" Member="RecurringId" DbType="UniqueIdentifier" Type="System.Guid"/>
+      <Association Name="Resource_UptimeCalendar" Member="Resource" ThisKey="ResourceId" OtherKey="ResourceId" DeleteRule="CASCADE" DeleteOnNull="true" IsForeignKey="true" Type="Resource"/>
+    </Type>
+  </Table>
+</Database>
