Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/11/08 16:50:12 (16 years ago)
Author:
svonolfe
Message:

Added Job Adapter (#372)

Location:
trunk/sources/HeuristicLab.Hive.Server.Core
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.Core/DbTestApp.cs

    r965 r971  
    170170      client.Name = "Stefan";
    171171      client.ClientId = Guid.NewGuid();
     172      client.Login = DateTime.Now;
    172173
    173174      ClientInfo client2 =
     
    175176      client2.Name = "Martin";
    176177      client2.ClientId = Guid.NewGuid();
     178      client2.Login = DateTime.Now;
    177179
    178180      ClientInfo client3 =
     
    180182      client3.Name = "Heinz";
    181183      client3.ClientId = Guid.NewGuid();
     184      client3.Login = DateTime.Now;
    182185
    183186      ClientGroup group =
     
    223226      clientAdapter.DeleteClient(client);
    224227      clientAdapter.DeleteClient(client2);
     228    }
     229
     230    private void TestJobAdapter() {
     231      IJobAdapter jobAdapter = ServiceLocator.GetJobAdapter();
     232
     233      Job job = new Job();
     234
     235      ClientInfo client = new ClientInfo();
     236      client.ClientId = Guid.NewGuid();
     237      client.Login = DateTime.Now;
     238
     239      job.Client = client;
     240      jobAdapter.UpdateJob(job);
     241
     242      ICollection<Job> jobs = jobAdapter.GetAllJobs();
     243
     244      jobAdapter.DeleteJob(job);
     245
     246      jobs = jobAdapter.GetAllJobs();
    225247    }
    226248
     
    230252      TestUserGroupAdapter();
    231253      TestClientGroupAdapter();
     254      TestJobAdapter();
    232255
    233256      ITransactionManager transactionManager =
  • trunk/sources/HeuristicLab.Hive.Server.Core/InternalInterfaces/DataAccess/IClientAdapter.cs

    r965 r971  
    4545
    4646    /// <summary>
     47    /// Get the client with the specified name
     48    /// </summary>
     49    /// <param name="clientId"></param>
     50    /// <returns></returns>
     51    ClientInfo GetClientByName(string name);
     52
     53    /// <summary>
    4754    /// Get the client with the specified ID
    4855    /// </summary>
  • trunk/sources/HeuristicLab.Hive.Server.Core/InternalInterfaces/DataAccess/IClientGroupAdapter.cs

    r965 r971  
    4545
    4646    /// <summary>
     47    /// Get the client group with the specified name
     48    /// </summary>
     49    /// <param name="clientId"></param>
     50    /// <returns></returns>
     51    ClientGroup GetClientGroupByName(string name);
     52
     53    /// <summary>
    4754    /// Get all client groups
    4855    /// </summary>
  • trunk/sources/HeuristicLab.Hive.Server.Core/InternalInterfaces/DataAccess/IJobAdapter.cs

    r963 r971  
    4848
    4949    /// <summary>
     50    /// Gets all subjobs of the specified job
     51    /// </summary>
     52    /// <returns></returns>
     53    ICollection<Job> GetAllSubjobs(Job job);
     54
     55    /// <summary>
     56    /// Gets the result of a job
     57    /// </summary>
     58    /// <param name="job"></param>
     59    /// <returns></returns>
     60    JobResult GetResult(Job job);
     61
     62    /// <summary>
     63    /// Gets all jobs of the client
     64    /// </summary>
     65    /// <param name="client"></param>
     66    /// <returns></returns>
     67    ICollection<Job> GetJobsOf(ClientInfo client);
     68
     69    /// <summary>
     70    /// Gets all jobs of the user
     71    /// </summary>
     72    /// <param name="user"></param>
     73    /// <returns></returns>
     74    ICollection<Job> GetJobsOf(User user);
     75
     76    /// <summary>
    5077    /// Deletes the job
    5178    /// </summary>
  • trunk/sources/HeuristicLab.Hive.Server.Core/InternalInterfaces/DataAccess/IResourceAdapter.cs

    r925 r971  
    4545
    4646    /// <summary>
     47    /// Get the resource with the specified name
     48    /// </summary>
     49    /// <param name="clientId"></param>
     50    /// <returns></returns>
     51    Resource GetResourceByName(string name);
     52
     53    /// <summary>
    4754    /// Gets the resource and updates the values of the object
    4855    /// </summary>
  • trunk/sources/HeuristicLab.Hive.Server.Core/InternalInterfaces/DataAccess/IUserGroupAdapter.cs

    r939 r971  
    4545
    4646    /// <summary>
     47    /// Get the user group with the specified name
     48    /// </summary>
     49    /// <param name="clientId"></param>
     50    /// <returns></returns>
     51    UserGroup GetUserGroupByName(string name);
     52
     53    /// <summary>
    4754    /// Get all user groups
    4855    /// </summary>
Note: See TracChangeset for help on using the changeset viewer.