C# Class Sage.Integration.Northwind.Application.Base.EntityBase

显示文件 Open project: Sage/SData-Contracts

Public Methods

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

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

EntityBase ( string entityName ) : System

Initiate an Entity with its name

EntityBase ( string entityName, string delimiterClause ) : System
ExecuteTransactions ( Transaction TransactionData, NorthwindConfig config ) : Sage.Integration.Northwind.Application.API.TransactionResult[]

ExecuteTransaction is for the CRM system to send all create, update, and delete information from CRM to the ERP system.

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

get the next changes from an entity

GetAll ( NorthwindConfig config, string whereExpression, System.Data.OleDb.OleDbParameter oleDbParameters ) : List
GetAll ( NorthwindConfig config, string whereExpression, int startIndex, int count ) : List
GetChangelog ( Token lastToken, NorthwindConfig config ) : ChangeLog

GetChangeLog is a request to the ERP system for changes to a specific named entity instance for specified time durations. A change can be either create, update, or delete.

GetDocument ( Identity identity, Token lastToken, NorthwindConfig config ) : Document

returns a filled document by the identity

GetDocumentTemplate ( ) : Document

Returns an empty document

GetLastChanges ( Token lastToken, NorthwindConfig config, Token &nextToken ) : Identity[]
Update ( Document doc, NorthwindConfig config, List &result ) : void

does an update for one entity entry

Protected Methods

Method Description
GetDeletedDocument ( Identity identity ) : Document

returns a deleted document

HandleDelimiterClause ( string &whereExpression ) : void

Private Methods

Method Description
ExecuteTransaction ( Document doc, NorthwindConfig config, List &result ) : void

dispatch the transaction between Add, Update,Delete

Method Details

Add() public method

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

Delete() public method

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

EntityBase() public method

Initiate an Entity with its name
public EntityBase ( string entityName ) : System
entityName string
return System

EntityBase() public method

public EntityBase ( string entityName, string delimiterClause ) : System
entityName string
delimiterClause string
return System

ExecuteTransactions() public method

ExecuteTransaction is for the CRM system to send all create, update, and delete information from CRM to the ERP system.
public ExecuteTransactions ( Transaction TransactionData, NorthwindConfig config ) : Sage.Integration.Northwind.Application.API.TransactionResult[]
TransactionData Sage.Integration.Northwind.Application.API.Transaction
config NorthwindConfig the configuration object
return Sage.Integration.Northwind.Application.API.TransactionResult[]

FillChangeLog() public abstract method

get the next changes from an entity
public abstract FillChangeLog ( DataTable &table, NorthwindConfig config, Token lastToken ) : int
table System.Data.DataTable the datatable to fill
config NorthwindConfig the configuration object
lastToken Sage.Integration.Northwind.Application.API.Token the last token to get the next 10 changelog entries
return int

GetAll() public abstract method

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

GetAll() public abstract method

public abstract GetAll ( NorthwindConfig config, string whereExpression, int startIndex, int count ) : List
config NorthwindConfig
whereExpression string
startIndex int
count int
return List

GetChangelog() public method

GetChangeLog is a request to the ERP system for changes to a specific named entity instance for specified time durations. A change can be either create, update, or delete.
public GetChangelog ( Token lastToken, NorthwindConfig config ) : ChangeLog
lastToken Sage.Integration.Northwind.Application.API.Token the last passed token
config NorthwindConfig the configuration object
return Sage.Integration.Northwind.Application.API.ChangeLog

GetDeletedDocument() protected method

returns a deleted document
protected GetDeletedDocument ( Identity identity ) : Document
identity Identity the identity
return Document

GetDocument() public abstract method

returns a filled document by the identity
public abstract GetDocument ( Identity identity, Token lastToken, NorthwindConfig config ) : Document
identity Identity the identity
lastToken Sage.Integration.Northwind.Application.API.Token the last token to set the logstate
config NorthwindConfig the configuration object
return Document

GetDocumentTemplate() public method

Returns an empty document
public GetDocumentTemplate ( ) : Document
return Document

GetLastChanges() public method

public GetLastChanges ( Token lastToken, NorthwindConfig config, Token &nextToken ) : Identity[]
lastToken Sage.Integration.Northwind.Application.API.Token
config NorthwindConfig
nextToken Sage.Integration.Northwind.Application.API.Token
return Identity[]

HandleDelimiterClause() protected method

protected HandleDelimiterClause ( string &whereExpression ) : void
whereExpression string
return void

Update() public method

does an update for one entity entry
public Update ( Document doc, NorthwindConfig config, List &result ) : void
doc Document
config NorthwindConfig
result List
return void