Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/08/11 10:38:36 (13 years ago)
Author:
ascheibe
Message:

#1233

  • moved DTO's to Services.Hive project
  • removed Services.Hive.Common project
  • some cleanups
  • added DTO's for enums
Location:
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3
Files:
1 added
7 edited
7 copied

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Enums/Command.cs

    r6703 r6717  
    2222using System;
    2323
    24 namespace HeuristicLab.Services.Hive.Common.DataTransfer {
     24namespace HeuristicLab.Services.Hive.DataAccess {
     25
    2526  [Serializable]
    2627  public enum Command {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Enums/CpuArchitecture.cs

    r6703 r6717  
    2020#endregion
    2121
     22using System;
    2223
    23 namespace HeuristicLab.Services.Hive.Common.DataTransfer {
    24   public enum SlaveState {
    25     Idle,
    26     Calculating,
    27     Offline
     24namespace HeuristicLab.Services.Hive.DataAccess {
     25
     26  [Serializable]
     27  public enum CpuArchitecture {
     28    x86, x64
    2829  };
    2930}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Enums/JobState.cs

    r6703 r6717  
    2222using System;
    2323
    24 namespace HeuristicLab.Services.Hive.Common.DataTransfer {
     24namespace HeuristicLab.Services.Hive.DataAccess {
    2525  [Serializable]
    2626  public enum JobState {
     
    6565    Failed
    6666  };
    67 
    68   public static class JobStateExtensions {
    69     /// <summary>
    70     /// This job is not yet done
    71     /// </summary>
    72     public static bool IsActive(this JobState jobState) {
    73       return !jobState.IsDone();
    74     }
    75 
    76     /// <summary>
    77     /// This job is Waiting
    78     /// </summary>
    79     public static bool IsWaiting(this JobState jobState) {
    80       return jobState == JobState.Waiting;
    81     }
    82 
    83     /// <summary>
    84     /// This job is Finished || Failed || Aborted
    85     /// </summary>
    86     public static bool IsDone(this JobState jobState) {
    87       return jobState == JobState.Finished ||
    88         jobState == JobState.Aborted ||
    89         jobState == JobState.Failed;
    90     }
    91   }
    9267}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Enums/Permission.cs

    r6703 r6717  
    2020#endregion
    2121
    22 namespace HeuristicLab.Services.Hive.Common.DataTransfer {
     22using System;
     23namespace HeuristicLab.Services.Hive.DataAccess {
     24
     25  [Serializable]
    2326  public enum Permission {
    2427    /// <summary>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Enums/SlaveState.cs

    r6703 r6717  
    2020#endregion
    2121
     22using System;
    2223
    23 namespace HeuristicLab.Services.Hive.Common.DataTransfer {
     24namespace HeuristicLab.Services.Hive.DataAccess {
     25
     26  [Serializable]
    2427  public enum SlaveState {
    2528    Idle,
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLab.Services.Hive.DataAccess-3.3.csproj

    r6701 r6717  
    9494  </ItemGroup>
    9595  <ItemGroup>
    96     <Compile Include="Convert.cs" />
    9796    <None Include="HeuristicLabServicesHiveDataAccessPlugin.cs.frame" />
     97    <Compile Include="Enums\Command.cs" />
     98    <Compile Include="Enums\CpuArchitecture.cs" />
    9899    <Compile Include="HeuristicLabServicesHiveDataAccessPlugin.cs" />
    99     <Compile Include="HiveDao.cs" />
    100100    <Compile Include="HiveDataContext.cs">
    101101      <DependentUpon>HiveDataContext.dbml</DependentUpon>
     
    106106      <DependentUpon>HiveDataContext.dbml</DependentUpon>
    107107    </Compile>
    108     <Compile Include="Interfaces\IHiveDao.cs" />
     108    <Compile Include="ITransactionManager.cs" />
     109    <Compile Include="Enums\JobState.cs" />
     110    <Compile Include="Logger.cs" />
     111    <Compile Include="Enums\Permission.cs" />
    109112    <Compile Include="Properties\AssemblyInfo.cs" />
    110113    <None Include="Properties\AssemblyInfo.cs.frame" />
     
    114117      <DependentUpon>Settings.settings</DependentUpon>
    115118    </Compile>
     119    <Compile Include="Enums\SlaveState.cs" />
    116120    <Compile Include="TransactionManager.cs" />
    117121  </ItemGroup>
     
    130134    </None>
    131135    <None Include="Settings.settings">
    132       <Generator>SettingsSingleFileGenerator</Generator>
     136      <Generator>PublicSettingsSingleFileGenerator</Generator>
    133137      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
    134138    </None>
     
    138142      <DependentUpon>HiveDataContext.dbml</DependentUpon>
    139143    </None>
    140   </ItemGroup>
    141   <ItemGroup>
    142     <ProjectReference Include="..\..\HeuristicLab.Services.Hive.Common\3.3\HeuristicLab.Services.Hive.Common-3.3.csproj">
    143       <Project>{14424A16-48D4-445E-80BF-DDF617548BBB}</Project>
    144       <Name>HeuristicLab.Services.Hive.Common-3.4</Name>
    145     </ProjectReference>
    146144  </ItemGroup>
    147145  <ItemGroup>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLabServicesHiveDataAccessPlugin.cs.frame

    r6701 r6717  
    3131  [PluginDependency("HeuristicLab.Common", "3.3")]
    3232  [PluginDependency("HeuristicLab.Core", "3.3")]
    33   [PluginDependency("HeuristicLab.Persistence", "3.3")]
    34   [PluginDependency("HeuristicLab.Services.Hive.Common", "3.3")]
     33  [PluginDependency("HeuristicLab.Persistence", "3.3")] 
    3534  public class HeuristicLabServicesHiveDataAccessPlugin : PluginBase {
    3635  }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml

    r6698 r6717  
    11<?xml version="1.0" encoding="utf-8"?><Database Name="HeuristicLab.Hive" Class="HiveDataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
    2   <Connection Mode="AppSettings" ConnectionString="Data Source=localhost;Initial Catalog=HeuristicLab.Hive-3.4;Integrated Security=True" SettingsObjectName="HeuristicLab.Services.Hive.DataAccess.Settings" SettingsPropertyName="HeuristicLab_Hive_LinqConnectionString" Provider="System.Data.SqlClient" />
     2  <Connection Mode="AppSettings" ConnectionString="Data Source=localhost;Initial Catalog=HeuristicLab.Hive-3.3;Integrated Security=True" SettingsObjectName="HeuristicLab.Services.Hive.DataAccess.Settings" SettingsPropertyName="HeuristicLab_Hive_LinqConnectionString" Provider="System.Data.SqlClient" />
    33  <Table Name="dbo.AssignedResources" Member="AssignedResources">
    44    <Type Name="AssignedResource">
     
    4545        <Column Name="Memory" Type="System.Int32" DbType="Int" CanBeNull="true" />
    4646        <Column Name="Login" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
    47         <Column Name="SlaveState" Storage="_Status" Type="global::HeuristicLab.Services.Hive.Common.DataTransfer.SlaveState" DbType="VarChar(15)" CanBeNull="true" />
     47        <Column Name="SlaveState" Storage="_Status" Type="global::HeuristicLab.Services.Hive.DataAccess.SlaveState" DbType="VarChar(15)" CanBeNull="true" />
    4848        <Column Name="Cores" Storage="_NumberOfCores" Type="System.Int32" DbType="Int" CanBeNull="true" />
    4949        <Column Name="FreeCores" Storage="_NumberOfFreeCores" Type="System.Int32" DbType="Int" CanBeNull="true" />
    5050        <Column Name="FreeMemory" Type="System.Int32" DbType="Int" CanBeNull="true" />
    5151        <Column Name="IsAllowedToCalculate" Type="System.Boolean" DbType="Bit" CanBeNull="false" />
    52         <Column Name="CpuArchitecture" Type="global::HeuristicLab.Services.Hive.Common.DataTransfer.CpuArchitecture" DbType="VarChar(3)" CanBeNull="false" />
     52        <Column Name="CpuArchitecture" Type="global::HeuristicLab.Services.Hive.DataAccess.CpuArchitecture" DbType="VarChar(3)" CanBeNull="false" />
    5353        <Column Name="OperatingSystem" Type="System.String" DbType="VarChar(MAX)" CanBeNull="false" UpdateCheck="Never" />
    5454        <Column Name="LastHeartbeat" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
     
    6161    <Type Name="Job">
    6262      <Column Name="JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
    63       <Column Name="JobState" Member="State" Type="global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState" DbType="VarChar(30)" CanBeNull="false" />
     63      <Column Name="JobState" Member="State" Type="global::HeuristicLab.Services.Hive.DataAccess.JobState" DbType="VarChar(30)" CanBeNull="false" />
    6464      <Column Name="ExecutionTimeMs" Storage="_ExecutionTime" Type="System.Double" DbType="float" CanBeNull="false" />
    6565      <Column Name="LastHeartbeat" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
     
    7070      <Column Name="IsParentJob" Type="System.Boolean" DbType="Bit" CanBeNull="false" />
    7171      <Column Name="FinishWhenChildJobsFinished" Type="System.Boolean" DbType="Bit" CanBeNull="false" />
    72       <Column Name="Command" Type="global::HeuristicLab.Services.Hive.Common.DataTransfer.Command?" DbType="VarChar(30)" CanBeNull="true" />
     72      <Column Name="Command" Type="global::HeuristicLab.Services.Hive.DataAccess.Command?" DbType="VarChar(30)" CanBeNull="true" />
    7373      <Column Name="HiveExperimentId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
    7474      <Column Name="IsPrivileged" Type="System.Boolean" DbType="Bit" CanBeNull="false" />
     
    128128    <Type Name="StateLog">
    129129      <Column Name="StateLogId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
    130       <Column Name="State" Type="global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState" DbType="VarChar(30) NOT NULL" CanBeNull="false" />
     130      <Column Name="State" Type="global::HeuristicLab.Services.Hive.DataAccess.JobState" DbType="VarChar(30) NOT NULL" CanBeNull="false" />
    131131      <Column Name="DateTime" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
    132132      <Column Name="JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
     
    143143      <Column Name="GrantedUserId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
    144144      <Column Name="GrantedByUserId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
    145       <Column Name="Permission" Type="global::HeuristicLab.Services.Hive.Common.DataTransfer.Permission" DbType="VarChar(15) NOT NULL" CanBeNull="false" />
     145      <Column Name="Permission" Type="global::HeuristicLab.Services.Hive.DataAccess.Permission" DbType="VarChar(15) NOT NULL" CanBeNull="false" />
    146146      <Association Name="HiveExperiment_HiveExperimentPermission" Member="HiveExperiment" ThisKey="HiveExperimentId" OtherKey="HiveExperimentId" Type="HiveExperiment" IsForeignKey="true" />
    147147    </Type>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout

    r6698 r6717  
    6969      </nodes>
    7070    </inheritanceConnector>
    71     <associationConnector edgePoints="[(11.9843735 : 2.57859537760417); (11.9843735 : 4.59699625651042); (10.875 : 4.59699625651042)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     71    <associationConnector edgePoints="[(11.9843735 : 2.57859537760417); (11.9843735 : 4.59699625651042); (10.875 : 4.59699625651042)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    7272      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedResource" />
    7373      <nodes>
     
    7676      </nodes>
    7777    </associationConnector>
    78     <associationConnector edgePoints="[(7.5 : 4.30930826822917); (7.5 : 4.751650890625); (8.875 : 4.751650890625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     78    <associationConnector edgePoints="[(7.5 : 4.30930826822917); (7.5 : 4.751650890625); (8.875 : 4.751650890625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    7979      <AssociationMoniker Name="/HiveDataContext/Job/Job_AssignedResource" />
    8080      <nodes>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs

    r6698 r6717  
    11371137    private System.Nullable<System.DateTime> _Login;
    11381138   
    1139     private global::HeuristicLab.Services.Hive.Common.DataTransfer.SlaveState _Status;
     1139    private global::HeuristicLab.Services.Hive.DataAccess.SlaveState _Status;
    11401140   
    11411141    private System.Nullable<int> _NumberOfCores;
     
    11471147    private bool _IsAllowedToCalculate;
    11481148   
    1149     private global::HeuristicLab.Services.Hive.Common.DataTransfer.CpuArchitecture _CpuArchitecture;
     1149    private global::HeuristicLab.Services.Hive.DataAccess.CpuArchitecture _CpuArchitecture;
    11501150   
    11511151    private string _OperatingSystem;
     
    11651165    partial void OnLoginChanging(System.Nullable<System.DateTime> value);
    11661166    partial void OnLoginChanged();
    1167     partial void OnSlaveStateChanging(global::HeuristicLab.Services.Hive.Common.DataTransfer.SlaveState value);
     1167    partial void OnSlaveStateChanging(global::HeuristicLab.Services.Hive.DataAccess.SlaveState value);
    11681168    partial void OnSlaveStateChanged();
    11691169    partial void OnCoresChanging(System.Nullable<int> value);
     
    11751175    partial void OnIsAllowedToCalculateChanging(bool value);
    11761176    partial void OnIsAllowedToCalculateChanged();
    1177     partial void OnCpuArchitectureChanging(global::HeuristicLab.Services.Hive.Common.DataTransfer.CpuArchitecture value);
     1177    partial void OnCpuArchitectureChanging(global::HeuristicLab.Services.Hive.DataAccess.CpuArchitecture value);
    11781178    partial void OnCpuArchitectureChanged();
    11791179    partial void OnOperatingSystemChanging(string value);
     
    12511251   
    12521252    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="VarChar(15)", CanBeNull=true)]
    1253     public global::HeuristicLab.Services.Hive.Common.DataTransfer.SlaveState SlaveState
     1253    public global::HeuristicLab.Services.Hive.DataAccess.SlaveState SlaveState
    12541254    {
    12551255      get
     
    13511351   
    13521352    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CpuArchitecture", DbType="VarChar(3)", CanBeNull=false)]
    1353     public global::HeuristicLab.Services.Hive.Common.DataTransfer.CpuArchitecture CpuArchitecture
     1353    public global::HeuristicLab.Services.Hive.DataAccess.CpuArchitecture CpuArchitecture
    13541354    {
    13551355      get
     
    14541454    private System.Guid _JobId;
    14551455   
    1456     private global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState _State;
     1456    private global::HeuristicLab.Services.Hive.DataAccess.JobState _State;
    14571457   
    14581458    private double _ExecutionTime;
     
    14721472    private bool _FinishWhenChildJobsFinished;
    14731473   
    1474     private global::HeuristicLab.Services.Hive.Common.DataTransfer.Command? _Command;
     1474    private global::HeuristicLab.Services.Hive.DataAccess.Command? _Command;
    14751475   
    14761476    private System.Guid _HiveExperimentId;
     
    14981498    partial void OnJobIdChanging(System.Guid value);
    14991499    partial void OnJobIdChanged();
    1500     partial void OnStateChanging(global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState value);
     1500    partial void OnStateChanging(global::HeuristicLab.Services.Hive.DataAccess.JobState value);
    15011501    partial void OnStateChanged();
    15021502    partial void OnExecutionTimeMsChanging(double value);
     
    15161516    partial void OnFinishWhenChildJobsFinishedChanging(bool value);
    15171517    partial void OnFinishWhenChildJobsFinishedChanged();
    1518     partial void OnCommandChanging(global::HeuristicLab.Services.Hive.Common.DataTransfer.Command? value);
     1518    partial void OnCommandChanging(global::HeuristicLab.Services.Hive.DataAccess.Command? value);
    15191519    partial void OnCommandChanged();
    15201520    partial void OnHiveExperimentIdChanging(System.Guid value);
     
    15571557   
    15581558    [global::System.Data.Linq.Mapping.ColumnAttribute(Name="JobState", Storage="_State", DbType="VarChar(30)", CanBeNull=false)]
    1559     public global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState State
     1559    public global::HeuristicLab.Services.Hive.DataAccess.JobState State
    15601560    {
    15611561      get
     
    17411741   
    17421742    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Command", DbType="VarChar(30)", CanBeNull=true)]
    1743     public global::HeuristicLab.Services.Hive.Common.DataTransfer.Command? Command
     1743    public global::HeuristicLab.Services.Hive.DataAccess.Command? Command
    17441744    {
    17451745      get
     
    28892889    private System.Guid _StateLogId;
    28902890   
    2891     private global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState _State;
     2891    private global::HeuristicLab.Services.Hive.DataAccess.JobState _State;
    28922892   
    28932893    private System.DateTime _DateTime;
     
    29112911    partial void OnStateLogIdChanging(System.Guid value);
    29122912    partial void OnStateLogIdChanged();
    2913     partial void OnStateChanging(global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState value);
     2913    partial void OnStateChanging(global::HeuristicLab.Services.Hive.DataAccess.JobState value);
    29142914    partial void OnStateChanged();
    29152915    partial void OnDateTimeChanging(System.DateTime value);
     
    29532953   
    29542954    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="VarChar(30) NOT NULL", CanBeNull=false)]
    2955     public global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState State
     2955    public global::HeuristicLab.Services.Hive.DataAccess.JobState State
    29562956    {
    29572957      get
     
    31813181    private System.Guid _GrantedByUserId;
    31823182   
    3183     private global::HeuristicLab.Services.Hive.Common.DataTransfer.Permission _Permission;
     3183    private global::HeuristicLab.Services.Hive.DataAccess.Permission _Permission;
    31843184   
    31853185    private EntityRef<HiveExperiment> _HiveExperiment;
     
    31953195    partial void OnGrantedByUserIdChanging(System.Guid value);
    31963196    partial void OnGrantedByUserIdChanged();
    3197     partial void OnPermissionChanging(global::HeuristicLab.Services.Hive.Common.DataTransfer.Permission value);
     3197    partial void OnPermissionChanging(global::HeuristicLab.Services.Hive.DataAccess.Permission value);
    31983198    partial void OnPermissionChanged();
    31993199    #endregion
     
    32703270   
    32713271    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Permission", DbType="VarChar(15) NOT NULL", CanBeNull=false)]
    3272     public global::HeuristicLab.Services.Hive.Common.DataTransfer.Permission Permission
     3272    public global::HeuristicLab.Services.Hive.DataAccess.Permission Permission
    32733273    {
    32743274      get
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/ITransactionManager.cs

    r6703 r6717  
    2222using System;
    2323
    24 namespace HeuristicLab.Services.Hive {
     24namespace HeuristicLab.Services.Hive.DataAccess {
    2525  public interface ITransactionManager {
    2626    void UseTransaction(Action call, bool serializable = false, bool longRunning = false);
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Logger.cs

    r6703 r6717  
    2525using System.Threading;
    2626
    27 namespace HeuristicLab.Services.Hive.Common {
     27namespace HeuristicLab.Services.Hive.DataAccess {
    2828  public class LogFactory {
    2929    public static ILogger GetLogger(string source) {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Settings.Designer.cs

    r6712 r6717  
    1414    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    1515    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
    16     internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
     16    public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
    1717       
    1818        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/TransactionManager.cs

    r6452 r6717  
    2222using System;
    2323using System.Transactions;
    24 using HeuristicLab.Services.Hive.Common;
     24using HeuristicLab.Services.Hive.DataAccess;
    2525
    2626namespace HeuristicLab.Services.Hive.DataAccess { 
Note: See TracChangeset for help on using the changeset viewer.