FDO API Reference | Feature Data Objects |
00001 #ifndef _IACQUIRELOCK_H_ 00002 #define _IACQUIRELOCK_H_ 00003 // 00004 00005 // 00006 // Copyright (C) 2004-2006 Autodesk, Inc. 00007 // 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of version 2.1 of the GNU Lesser 00010 // General Public License as published by the Free Software Foundation. 00011 // 00012 // This library is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 // Lesser General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU Lesser General Public 00018 // License along with this library; if not, write to the Free Software 00019 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00020 // 00021 00022 #ifdef _WIN32 00023 #pragma once 00024 #endif 00025 00026 #include <FdoStd.h> 00027 #include <Fdo/Commands/IFeatureCommand.h> 00028 #include <Fdo/Connections/IConnection.h> 00029 #include <Fdo/Commands/Locking/LockType.h> 00030 #include <Fdo/Commands/Locking/LockStrategy.h> 00031 #include <Fdo/Commands/Locking/ILockConflictReader.h> 00032 00033 /// \brief 00034 /// The FdoIAcquireLock interface locks feature instances of a given class 00035 /// that match the specified criteria. Input to the acquire lock command 00036 /// includes the name of the class, the lock type, the lock strategy, and 00037 /// filter criteria by which to identify the instances to be locked. The 00038 /// filter may be specified either as text or as an expression tree (most 00039 /// likely produced by a query builder). The lock type value is one of 00040 /// <p> - FdoLockType_Shared 00041 /// <p> - FdoLockType_Exclusive 00042 /// <p> - FdoLockType_Transaction 00043 /// <p> - FdoLockType_LongTransactionExclusive 00044 /// <p> - FdoLockType_AllLongTransactionExclusive 00045 /// \remarks 00046 /// If the lock strategy has a value of all and at least one of the feature 00047 /// instances specified in the filter is locked by someone else, the command 00048 /// returns an FdoILockConflictReader list which contains all of the feature 00049 /// instances specified in the filter. 00050 /// <p>If the lock strategy has a value of partial, the command returns an 00051 /// FdoILockConflictReader list which contains all of the feature instances 00052 /// specified in the filter that are already locked by someone else. 00053 /// The command returns an empty FdoILockConflictReader list if all of the 00054 /// feature instances specified in the filter were successfully locked. 00055 class FdoIAcquireLock : public FdoIFeatureCommand 00056 { 00057 friend class FdoIConnection; 00058 00059 public: 00060 /// \brief 00061 /// Gets the FdoLockType value. 00062 /// 00063 /// \return 00064 /// Returns the lock type. 00065 /// 00066 FDO_API virtual FdoLockType GetLockType() = 0; 00067 00068 /// \brief 00069 /// Sets the FdoLockType value. 00070 /// 00071 /// \param value 00072 /// Input the lock type 00073 /// 00074 /// \return 00075 /// Returns nothing 00076 /// 00077 FDO_API virtual void SetLockType(FdoLockType value) = 0; 00078 00079 /// \brief 00080 /// Gets the FdoLockStrategy value. 00081 /// 00082 /// \return 00083 /// Returns the strategy value (all or partial). 00084 /// 00085 FDO_API virtual FdoLockStrategy GetLockStrategy() = 0; 00086 00087 /// \brief 00088 /// Sets the FdoLockStrategy value (all or partial). 00089 /// 00090 /// \param value 00091 /// Input the lock strategy used for locking objects 00092 /// 00093 /// \return 00094 /// Returns nothing 00095 /// 00096 FDO_API virtual void SetLockStrategy(FdoLockStrategy value) = 0; 00097 00098 /// \brief 00099 /// Executes the AcquireLock command, returning an FdoILockConflictReader. 00100 /// 00101 /// \return 00102 /// Returns a list of feature instances which could not be locked. 00103 /// The list could be empty indicating that all of the feature instances 00104 /// specified in the filter have been locked, or it could contain the list 00105 /// of feature instances that could not be locked because they are already 00106 /// locked by someone or because the locking strategy is all and at least 00107 /// one of the feature instances specified in the filter is already locked 00108 /// by someone else. 00109 /// 00110 FDO_API virtual FdoILockConflictReader* Execute() = 0; 00111 }; 00112 #endif 00113 00114
Comments or suggestions? Send us feedback. |