static public ArchiveQueue Load(IPersistenceContext read, ServerEntityKey key)
        {
            var          broker    = read.GetBroker <IArchiveQueueEntityBroker>();
            ArchiveQueue theObject = broker.Load(key);

            return(theObject);
        }
 static public ArchiveQueue Insert(ArchiveQueue entity)
 {
     using (var update = PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush))
     {
         ArchiveQueue newEntity = Insert(update, entity);
         update.Commit();
         return(newEntity);
     }
 }
        static public ArchiveQueue Insert(IUpdateContext update, ArchiveQueue entity)
        {
            var broker        = update.GetBroker <IArchiveQueueEntityBroker>();
            var updateColumns = new ArchiveQueueUpdateColumns();

            updateColumns.PartitionArchiveKey    = entity.PartitionArchiveKey;
            updateColumns.ScheduledTime          = entity.ScheduledTime;
            updateColumns.StudyStorageKey        = entity.StudyStorageKey;
            updateColumns.ArchiveQueueStatusEnum = entity.ArchiveQueueStatusEnum;
            updateColumns.ProcessorId            = entity.ProcessorId;
            updateColumns.FailureDescription     = entity.FailureDescription;
            ArchiveQueue newEntity = broker.Insert(updateColumns);

            return(newEntity);
        }