Dover Framework
 All Classes Namespaces Functions Variables Properties Pages
Public Member Functions | List of all members
Dover.Framework.DAO.BusinessOneDAO Interface Reference

Business One DAO (Data Access Object) Implementation. More...

Inherited by Dover.Framework.DAO.BusinessOneDAOSQLImpl.

Public Member Functions

void SaveBOMIfNotExists (IBOM bom, INotifier notifier=null)
 Save a BOM XML if not presented in the DataBase. More...
 
void UpdateOrSaveBOMIfNotExists (IBOM BOM, INotifier notifier=null)
 Save a BOM if not exists and update it if exists. More...
 
string GetXMLBom< V > (object[] keys, BoObjectTypes objType)
 Return a BOM XML, containing various BO elements. More...
 
List< int > ListMissingBOMKeys (IBOM bom)
 List all elements that are not present on the database, from the specified BOM More...
 
List< int > ListOutdatedBOMKeys (IBOM bom)
 List all elements that are not present or outdated on the database, from the specified BOM More...
 
string GetNextCode (String udt)
 Return the next code for the specified user table. This method implements a code on the following format: XXXXXXXX, where X is an hex digit.; More...
 
string GetCurrentUser ()
 Return the current user code. More...
 
void ExecuteStatement (string sql)
 Execute an SQL statement with no return value (INSERT/UPDATE). More...
 
ExecuteSqlForObject< T > (string sql)
 Execute the SQL Statement and return the supplied object. For each statement selected value, a corresponding property must exists on the specified object. More...
 
List< T > ExecuteSqlForList< T > (string sql)
 Execute the SQL Statement and return a list of the supplied object type. For each statement selected value, a corresponding property must exists on the specified object. More...
 
GetBOMFromXML< T > (Stream resourceStream)
 Return a BOM object with the specified resourceStream. More...
 
void UpdateOrSavePermissionIfNotExists (Attribute.PermissionAttribute permissionAttribute)
 Update a permission attribute on the database if not exists. More...
 
bool IsSuperUser ()
 Return true if current iser us SuperUser. More...
 
void SaveBOM (IBOM doc, INotifier notifier=null)
 Saves BOM, without checking if it exists. More...
 
bool PermissionExists (Attribute.PermissionAttribute permissionAttribute)
 Check if the specified Permission exists. More...
 
dynamic GetBusinessObject (BoObjectTypes objType)
 Return the desired Business Object API from current Company More...
 
void UpdateBusinessObject (object b1Object)
 Call the Update() API on the desired object. On Error an exception is thrown and the Business Object is cleaned from memory (ReleaseComObject is called). More...
 
void SaveBusinessObject (object b1Object)
 Call the Save() API on the desired object. On Error an exception is thrown and the Business Object is cleaned from memory (ReleaseComObject is called). More...
 
void Release (object b1Object)
 Proper release of COM resources. More...
 

Detailed Description

Business One DAO (Data Access Object) Implementation.

Member Function Documentation

List<T> Dover.Framework.DAO.BusinessOneDAO.ExecuteSqlForList< T > ( string  sql)

Execute the SQL Statement and return a list of the supplied object type. For each statement selected value, a corresponding property must exists on the specified object.

Template Parameters
TObject type to wrap into the list.
Parameters
sqlSQL statement
Returns
List with an object for each row, with all values returned on the SQL statement.
T Dover.Framework.DAO.BusinessOneDAO.ExecuteSqlForObject< T > ( string  sql)

Execute the SQL Statement and return the supplied object. For each statement selected value, a corresponding property must exists on the specified object.

Template Parameters
TReturn object type
Parameters
sqlSQL statement
Returns
instantiated object with all values returned on the SQL statement.
void Dover.Framework.DAO.BusinessOneDAO.ExecuteStatement ( string  sql)

Execute an SQL statement with no return value (INSERT/UPDATE).

Parameters
sqlSQL Statement
T Dover.Framework.DAO.BusinessOneDAO.GetBOMFromXML< T > ( Stream  resourceStream)

Return a BOM object with the specified resourceStream.

Template Parameters
TBOM type
Parameters
resourceStreamStream containing XML data.
Returns
BOM Object representing the returned value.
dynamic Dover.Framework.DAO.BusinessOneDAO.GetBusinessObject ( BoObjectTypes  objType)

Return the desired Business Object API from current Company

Parameters
objTypeDesired ObjectType
Returns
string Dover.Framework.DAO.BusinessOneDAO.GetCurrentUser ( )

Return the current user code.

Returns
Return the current user code.
string Dover.Framework.DAO.BusinessOneDAO.GetNextCode ( String  udt)

Return the next code for the specified user table. This method implements a code on the following format: XXXXXXXX, where X is an hex digit.;

Parameters
udtUser Defined Table
Returns
next code on the default format.
string Dover.Framework.DAO.BusinessOneDAO.GetXMLBom< V > ( object[]  keys,
BoObjectTypes  objType 
)

Return a BOM XML, containing various BO elements.

Template Parameters
VSAP Business One DI API object type
Parameters
keyskeys to be fetched
objTypeSAP Business One DI API enum representing the object type
Returns
XML of SAP Business One object
bool Dover.Framework.DAO.BusinessOneDAO.IsSuperUser ( )

Return true if current iser us SuperUser.

Returns
bool value indicating the current user is SuperUser.
List<int> Dover.Framework.DAO.BusinessOneDAO.ListMissingBOMKeys ( IBOM  bom)

List all elements that are not present on the database, from the specified BOM

Parameters
bomBOM with all Business One objects
Returns
all index for the elements that are missing.
List<int> Dover.Framework.DAO.BusinessOneDAO.ListOutdatedBOMKeys ( IBOM  bom)

List all elements that are not present or outdated on the database, from the specified BOM

Parameters
bomBOM with all Business Obe objects
Returns
all index for the elements that are missing or outdated.
bool Dover.Framework.DAO.BusinessOneDAO.PermissionExists ( Attribute.PermissionAttribute  permissionAttribute)

Check if the specified Permission exists.

Parameters
permissionAttributePermission attribute to check for
Returns
true if exists
void Dover.Framework.DAO.BusinessOneDAO.Release ( object  b1Object)

Proper release of COM resources.

Parameters
b1ObjectCOM object that will be released
void Dover.Framework.DAO.BusinessOneDAO.SaveBOM ( IBOM  doc,
INotifier  notifier = null 
)

Saves BOM, without checking if it exists.

Parameters
docBOM object representing the BusinessOne data to be saved.
notifierIf present, for each attempt, a trigger event will happen. This is usefull when the calling need to knows the added ID, of to do some transaction related stuff OnError.
void Dover.Framework.DAO.BusinessOneDAO.SaveBOMIfNotExists ( IBOM  bom,
INotifier  notifier = null 
)

Save a BOM XML if not presented in the DataBase.

Parameters
bomBOM, containing the XML that will be added.
notifierIf present, for each attempt, a trigger event will happen. This is usefull when the calling need to knows the added ID, of to do some transaction related stuff OnError.
void Dover.Framework.DAO.BusinessOneDAO.SaveBusinessObject ( object  b1Object)

Call the Save() API on the desired object. On Error an exception is thrown and the Business Object is cleaned from memory (ReleaseComObject is called).

Parameters
b1ObjectCOM object that will have Save() call done.
void Dover.Framework.DAO.BusinessOneDAO.UpdateBusinessObject ( object  b1Object)

Call the Update() API on the desired object. On Error an exception is thrown and the Business Object is cleaned from memory (ReleaseComObject is called).

Parameters
b1ObjectCOM object that will have Update() call done.
void Dover.Framework.DAO.BusinessOneDAO.UpdateOrSaveBOMIfNotExists ( IBOM  BOM,
INotifier  notifier = null 
)

Save a BOM if not exists and update it if exists.

Parameters
udoBOM
notifier
void Dover.Framework.DAO.BusinessOneDAO.UpdateOrSavePermissionIfNotExists ( Attribute.PermissionAttribute  permissionAttribute)

Update a permission attribute on the database if not exists.

Parameters
permissionAttributePermissionAttribute

The documentation for this interface was generated from the following file: