예제 #1
0
 /// <summary>
 /// PersistenceCommand for CRUD operations and concurrency support based on the command type. Support multiple objects
 /// for process identified with a string ID.
 /// </summary>
 /// <param name="map"></param>
 /// <param name="cmdType"></param>
 /// <param name="providerCommand"></param>
 /// <param name="objectsForProcess"></param>
 public PersistenceCommand(Map map, CRUD cmdType, object providerCommand, IDictionary<string,object> objectsForProcess)
 {
     _appObjs = objectsForProcess;
     _providerCommand = providerCommand;
     _cmdMap = map.GetCommandMap(cmdType.ToString());
     SetConcurrencySupport(cmdType);
 }
예제 #2
0
        /// <summary>
        /// PersistentSupport for CRUD(insert) operations.
        /// </summary>
        /// <param name="map"></param>
        /// <param name="objectForProcess"></param>
        /// <param name="providerCommand"></param>
        public PersistenceCommand(Map map, object objectForProcess, object providerCommand)
        {
            _providerCommand = providerCommand;

            _objectForProcess = objectForProcess; //the new object
            _cmdMap = map.GetCommandMap(CRUD.Create.ToString()); //must get the proper command instructions from the map
        }
예제 #3
0
 //TEST
 /// <summary>
 /// PersistentCommand for new records with identifier.
 /// </summary>
 /// <param name="map"></param>
 /// <param name="oid"></param>
 /// <param name="objectForProcess"></param>
 /// <param name="providerCommand"></param>
 public PersistenceCommand(Map map, ObjectIdentifier oid,object objectForProcess, object providerCommand)
 {
     _providerCommand = providerCommand;
     _objectForProcess = objectForProcess;
     _pObj = MakePersistable(objectForProcess, oid);
     _cmdMap = map.GetCommandMap(CRUD.Create.ToString());
 }
예제 #4
0
 /// <summary>
 /// PersistenceCommand for CRUD operations and concurrency support based on the command type.
 /// </summary>
 /// <param name="map"></param>
 /// <param name="cmdType"></param>
 /// <param name="providerCommand"></param>
 public PersistenceCommand(Map map, CRUD cmdType, object providerCommand)
 {
     _providerCommand = providerCommand;
     _cmdMap = map.GetCommandMap(cmdType.ToString());
     SetConcurrencySupport(cmdType);
 }
예제 #5
0
        /// <summary>
        /// PersistentCommand for custom commands, concurrency, collection and multiple processed objects support
        /// </summary>
        /// <param name="map"></param>
        /// <param name="cmdTypeIdentifier"></param>
        /// <param name="providerCommand"></param>
        /// <param name="concurrency"></param>
        /// <param name="returnCollection"></param>
        /// <param name="objectsForProcess"></param>
        public PersistenceCommand(Map map, string cmdTypeIdentifier, object providerCommand, ConcurrencySupportType concurrency, bool returnCollection, IDictionary<string,object> objectsForProcess)
        {
            _providerCommand = providerCommand;
            _cmdMap = map.GetCommandMap(cmdTypeIdentifier);   //get the custom command instruction from the map

            if(!returnCollection)
                _pObj = MakePersistable();
            _appObjs = objectsForProcess;
            SetConcurrencySupport(concurrency);
        }
예제 #6
0
        /// <summary>
        /// PersistentObject for retrieve operations, custom command and concurrency support.
        /// </summary>
        /// <param name="map"></param>
        /// <param name="oid"></param>
        /// <param name="providerCommand"></param>
        /// <param name="cmdType"></param>
        /// <param name="concurrency"></param>
        public PersistenceCommand(Map map, ObjectIdentifier oid, object providerCommand, string cmdType, ConcurrencySupportType concurrency)
        {
            _providerCommand = providerCommand;
            _pObj = MakePersistable(null, oid);// Retrieve operations need only the OID
            _cmdMap = map.GetCommandMap(cmdType);   //must get the proper command instruction from the map

            SetConcurrencySupport(concurrency);
        }
예제 #7
0
        /// <summary>
        /// PersistentObject for CRUD (Update and delete) operations, custom command and concurrency support.
        /// </summary>
        /// <param name="map"></param>
        /// <param name="objectForProcess"></param>
        /// <param name="providerCommand"></param>
        /// <param name="cmdType"></param>
        /// <param name="concurrency"></param>
        public PersistenceCommand(Map map, IPersistable objectForProcess, object providerCommand, string cmdType, ConcurrencySupportType concurrency)
        {
            _providerCommand = providerCommand;

            _cmdMap = map.GetCommandMap(cmdType); //must get the proper command instruction from the map
            _pObj = objectForProcess;

            SetConcurrencySupport(concurrency);
        }
예제 #8
0
        /// <summary>
        /// PersistentSupport for CRUD (update and delete) operations and possible concurrency support
        /// </summary>
        /// <param name="map"></param>
        /// <param name="objectForProcess"></param>
        /// <param name="providerCommand"></param>
        /// <param name="cmdType"></param>
        public PersistenceCommand(Map map, IPersistable objectForProcess, object providerCommand, CRUD cmdType)
        {
            _providerCommand = providerCommand;

            _pObj = objectForProcess; //insert,updates and delete need the object for processing. Retrieve operations need only the OID
            _cmdMap = map.GetCommandMap(cmdType.ToString()); //must get the proper command instructions from the map

            SetConcurrencySupport(cmdType);
        }