C# 클래스 Sage.Integration.Northwind.Application.Entities.Account.Account

The AccountEntity presents an account object of the application in the integration space. The entity supports: - GetDocument, GetDocumentTemplate - Insert, Update and Delete verb (to support execute transcation) - FillChangeLog and FillAll (to Support getChangelog and getAll)
상속: Sage.Integration.Northwind.Application.Base.EntityBase
파일 보기 프로젝트 열기: Sage/SData-Contracts 1 사용 예제들

공개 메소드들

메소드 설명
Account ( ) : System

Constructor. The method initializes the base class.

Add ( Document doc, NorthwindConfig config, List &result ) : void

The Add verb inserts an account and all subentities in the underlying data-store. On success, the identity of the newly inserted instances will added to the document and all subdocuments.

Delete ( Document doc, NorthwindConfig config, List &result ) : void

The Delete verb deletes existing account and all subentities in the underlying data-store. Should no account instance be found in the data-store that matches the id of the document, the transaction result will set accordingly.

FillChangeLog ( DataTable &table, NorthwindConfig config, Token lastToken ) : int

fill up a datatable with the next 11 id's of inserted, modified and deleted accounts since the given token.

GetAll ( NorthwindConfig config, string whereExpression, System.Data.OleDb.OleDbParameter oleDbParameters ) : List
GetAll ( NorthwindConfig config, string whereExpression, int startIndex, int count ) : List
GetDocument ( Identity identity, Token lastToken, NorthwindConfig config ) : Document

The GetDocument verb retuns an complete AccountDocument containing the data associated with an existing account instance. Should no account instance be found in the data-store that matches the identity passed as a parameter it will return an empty account document marked as deleted within the given identity.

Update ( Document doc, NorthwindConfig config, List &result ) : void

The Update verb ammends an existing account and all subentities (Person, Email, Address, Phone) in the underlying data-store. The data as it should be stored is found in the parameter document. Should no account instance be found in the data-store that matches the id of the document, the transaction result will set accordingly.

비공개 메소드들

메소드 설명
GetDocument ( AccountDataset row, Token lastToken, NorthwindConfig config ) : AccountDocument
GetDocument ( string accountId, NorthwindConfig config ) : Document

returns a complete account document without using a token

GetEmailsCollectionFromCustomer ( Emails emails, DeleteHistoryDataset history, Token lastToken, string crmUser ) : EmailsDocumentCollection
GetEmailsCollectionFromCustomer ( string customerId, Token lastToken, NorthwindConfig config ) : EmailsDocumentCollection
GetNewCustomerID ( string customerName, NorthwindConfig config ) : string
GetRow ( AccountDocument accDoc, NorthwindConfig config, bool newAccount ) : AccountDataset.AccountsRow

get a northwind account row, which is a union of customers and suppliers, from the given account document and set the transaction status on the documents

SetIdentitiesForAccounts ( string accountID, AccountDocument account ) : void

ste the Identies of the account sub entities address, phone and person

StoreCustomer ( AccountDocument accDoc, AccountDataset accountRow, NorthwindConfig config, List &result ) : void

StoreSupplier ( AccountDocument accDoc, AccountDataset accountRow, NorthwindConfig config, List &result ) : void
UpdateEmailsCollectionFromCustomer ( string customerId, EmailsDocumentCollection emailCollection, NorthwindConfig config, List &result ) : void

메소드 상세

Account() 공개 메소드

Constructor. The method initializes the base class.
public Account ( ) : System
리턴 System

Add() 공개 메소드

The Add verb inserts an account and all subentities in the underlying data-store. On success, the identity of the newly inserted instances will added to the document and all subdocuments.
public Add ( Document doc, NorthwindConfig config, List &result ) : void
doc Sage.Integration.Northwind.Application.Base.Document Document (without ID) containing the data to be stored
config NorthwindConfig The configuration object
result List
리턴 void

Delete() 공개 메소드

The Delete verb deletes existing account and all subentities in the underlying data-store. Should no account instance be found in the data-store that matches the id of the document, the transaction result will set accordingly.
public Delete ( Document doc, NorthwindConfig config, List &result ) : void
doc Sage.Integration.Northwind.Application.Base.Document Document (incl. ID) containing the data to be stored
config NorthwindConfig The configuration object
result List
리턴 void

FillChangeLog() 공개 메소드

fill up a datatable with the next 11 id's of inserted, modified and deleted accounts since the given token.
public FillChangeLog ( DataTable &table, NorthwindConfig config, Token lastToken ) : int
table System.Data.DataTable tha DataTable to filled up. The first column contains the identity
config NorthwindConfig The configuration object
lastToken Sage.Integration.Northwind.Application.API.Token the last token
리턴 int

GetAll() 공개 메소드

public GetAll ( NorthwindConfig config, string whereExpression, System.Data.OleDb.OleDbParameter oleDbParameters ) : List
config NorthwindConfig
whereExpression string
oleDbParameters System.Data.OleDb.OleDbParameter
리턴 List

GetAll() 공개 메소드

public GetAll ( NorthwindConfig config, string whereExpression, int startIndex, int count ) : List
config NorthwindConfig
whereExpression string
startIndex int
count int
리턴 List

GetDocument() 공개 메소드

The GetDocument verb retuns an complete AccountDocument containing the data associated with an existing account instance. Should no account instance be found in the data-store that matches the identity passed as a parameter it will return an empty account document marked as deleted within the given identity.
public GetDocument ( Identity identity, Token lastToken, NorthwindConfig config ) : Document
identity Identity Identity of the account
lastToken Sage.Integration.Northwind.Application.API.Token the last given Token to mark the account status as updated or created
config NorthwindConfig The configuration object
리턴 Sage.Integration.Northwind.Application.Base.Document

Update() 공개 메소드

The Update verb ammends an existing account and all subentities (Person, Email, Address, Phone) in the underlying data-store. The data as it should be stored is found in the parameter document. Should no account instance be found in the data-store that matches the id of the document, the transaction result will set accordingly.
public Update ( Document doc, NorthwindConfig config, List &result ) : void
doc Sage.Integration.Northwind.Application.Base.Document Document (incl. ID) containing the data to be stored
config NorthwindConfig The configuration object
result List
리턴 void