public bool ResetExternalRequestQueueItem(ExternalRequestQueue item)
	    {
		    if (!item.ExternalRequestQueueStatusEnum.Equals(ExternalRequestQueueStatusEnum.Failed))
			    return false;
		    var update = new ExternalRequestQueueUpdateColumns
			    {
				    ExternalRequestQueueStatusEnum = ExternalRequestQueueStatusEnum.Pending,
					Revision = item.Revision + 1
			    };
		    var criteria = new ExternalRequestQueueSelectCriteria();
			criteria.Key.EqualTo(item.Key);
		    criteria.Revision.EqualTo(item.Revision);
		    return _adaptor.Update(criteria, update);
	    }
 static public ExternalRequestQueue Insert(IUpdateContext update, ExternalRequestQueue entity)
 {
     var broker = update.GetBroker<IExternalRequestQueueEntityBroker>();
     var updateColumns = new ExternalRequestQueueUpdateColumns();
     updateColumns.RequestType = entity.RequestType;
     updateColumns.RequestXml = entity.RequestXml;
     updateColumns.InsertTime = entity.InsertTime;
     updateColumns.Revision = entity.Revision;
     updateColumns.ScheduledTime = entity.ScheduledTime;
     updateColumns.DeletionTime = entity.DeletionTime;
     updateColumns.StateXml = entity.StateXml;
     updateColumns.OperationToken = entity.OperationToken;
     updateColumns.RequestId = entity.RequestId;
     updateColumns.ExternalRequestQueueStatusEnum = entity.ExternalRequestQueueStatusEnum;
     ExternalRequestQueue newEntity = broker.Insert(updateColumns);
     return newEntity;
 }