EDMI: Add 3-tier database access in DatabaseWithFallback, add client config,
EDMI Service: Version 2.4.0.0 EDMI: API: Version 1.4.0.0
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Services.EDMIService.Methods.IDB.GetAttributeValue
|
||||
|
||||
Namespace Methods.IDB.GetAttributeValue
|
||||
Public Class GetAttributeValueMethod
|
||||
Inherits BaseMethod
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pDatabaseIDB As MSSQLServer, pDatabaseECM As MSSQLServer, pGlobalState As GlobalState)
|
||||
MyBase.New(pLogConfig, pDatabaseIDB, pDatabaseECM, pGlobalState)
|
||||
End Sub
|
||||
|
||||
Public Function Run(pData As GetAttributeValueRequest) As GetAttributeValueResponse
|
||||
Try
|
||||
If Helpers.TestObjectIdExists(pData.ObjectId) = False Then
|
||||
LogAndThrow("ObjectId does not exist!")
|
||||
End If
|
||||
|
||||
Dim oValue As Object
|
||||
' TODO: Implement GetAttributeValue
|
||||
|
||||
Return New GetAttributeValueResponse(pData.ObjectId, oValue)
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Error occurred while getting attribute value!")
|
||||
Return New GetAttributeValueResponse(ex)
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
@@ -0,0 +1,5 @@
|
||||
Namespace Methods.IDB.GetAttributeValue
|
||||
Public Class GetAttributeValueRequest
|
||||
Public Property ObjectId As Long
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -0,0 +1,26 @@
|
||||
Imports System.Runtime.Serialization
|
||||
|
||||
Namespace Methods.IDB.GetAttributeValue
|
||||
|
||||
<Serializable>
|
||||
<DataContract>
|
||||
Public Class GetAttributeValueResponse
|
||||
Inherits Messages.BaseResponse
|
||||
|
||||
<DataMember>
|
||||
Public Property ObjectId As Long
|
||||
Public Property Value As Object
|
||||
|
||||
Public Sub New(pObjectId As Long, pValue As Object)
|
||||
MyBase.New()
|
||||
ObjectId = pObjectId
|
||||
Value = pValue
|
||||
End Sub
|
||||
|
||||
Public Sub New(pException As Exception, Optional pDetails As String = "")
|
||||
MyBase.New(pException, pDetails)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
||||
Reference in New Issue
Block a user