Class BusinessObject

This class is an abstract business object class.
It's purpose is to be subclassed into individual business objects.

System.Object
  EPS.Business.BusinessObjects.BusinessObject

public abstract class BusinessObject : object, IBusinessObject,
   IDisposable

Class Members

MemberDescription
AddNew Creates a new master entity record.
public virtual DataSet AddNew();
DataSetHasViolations Checks whether a certain dataset has business rules violations.
public virtual bool DataSetHasViolations( DataSet currentDataSet );

public virtual bool DataSetHasViolations( DataSet currentDataSet,
RuleViolationType violationType );

Delete Deletes a single item from the master entity based on its PK
public virtual bool Delete( string entityPK );

public virtual bool Delete( Guid entityPK );

public virtual bool Delete( int entityPK );

Dispose Implementation of IDisposable, in particular the Dispose() method.
public sealed void Dispose();
ExecuteStoredProcedure Executes a stored procedure
public virtual bool ExecuteStoredProcedure( IDbCommand command );
ExecuteStoredProcedureQuery Executes a stored procedure using the current data service and returns the result as a dataset
public virtual DataSet ExecuteStoredProcedureQuery( IDbCommand command );

public virtual DataSet ExecuteStoredProcedureQuery( IDbCommand command,
string entityName );

public virtual DataSet ExecuteStoredProcedureQuery( IDbCommand command,
string entityName,
DataSet existingDataSet );

GetList This method retrieves all records and all fields for the main entity
public virtual DataSet GetList();
GetNewIntegerKey This method creates a new key for integer-key rows.
public virtual int GetNewIntegerKey( string entityName,
DataSet dataSetWithNewRecord );
GetNewStringKey This method creates a new key for string-key rows.
public virtual string GetNewStringKey( string entityName,
DataSet dataSetWithNewRecords );
GetPrimaryKeyType Returns the configured primary key type for the specified table
public virtual KeyType GetPrimaryKeyType( string tableName );

public virtual KeyType GetPrimaryKeyType();

LoadEntity This method can be used to load a single record dataset based on an entity PK.
public virtual DataSet LoadEntity( string entityPK );

public virtual DataSet LoadEntity( Guid entityPK );

public virtual DataSet LoadEntity( int entityPK );

LoadSecondaryTablesAsync This method can be overridden in subclasses to load additional/secondary tables
public virtual void LoadSecondaryTablesAsync( string tableName,
Guid parentPK,
DataSet existingDataSet,
AsyncCallback callback );

public virtual void LoadSecondaryTablesAsync( string tableName,
int parentPK,
DataSet existingDataSet,
AsyncCallback callback );

public virtual void LoadSecondaryTablesAsync( string tableName,
string parentPK,
DataSet existingDataSet,
AsyncCallback callback );

LoadSecondaryTablesOnDemand This method can be overridden in subclasses to load additional/secondary tables
public virtual void LoadSecondaryTablesOnDemand( string tableName,
Guid parentPK,
DataSet existingDataSet );

public virtual void LoadSecondaryTablesOnDemand( string tableName,
int parentPK,
DataSet existingDataSet );

public virtual void LoadSecondaryTablesOnDemand( string tableName,
string parentPK,
DataSet existingDataSet );

LogBusinessRuleViolation This method can be used to log business rule violations.
public virtual void LogBusinessRuleViolation( DataSet currentDataSet,
string tableName,
string fieldName,
int rowIndex,
RuleViolationType violationType,
string message,
string ruleClass );
PrimaryKeyValueChanged This method is called whenever the primary key value changes, as it may be the
public virtual void PrimaryKeyValueChanged( DataSet updatedDataSet,
string tableName,
int oldKey,
int newKey );
Save This method verifies and saves the passed dataset.
public virtual bool Save( DataSet masterDataSet );

public sealed bool Save( IBusinessEntity entity );

public sealed bool Save( IBusinessEntity[] entities );

public sealed bool Save( DataSet[] masterDataSets );

ShareDataContext Shares a data context with another business object
public bool ShareDataContext( BusinessObject primaryDataBusinessObject );

public bool ShareDataContext( BusinessEntity primaryDataBusinessEntity );

public bool ShareDataContext( BusinessObject primaryDataBusinessObject,
ContextSharingRestriction restriction );

public bool ShareDataContext( SharedDataContext dataContext );

UnshareDataContext Sets the current business object to use its own data context,
public bool UnshareDataContext();
Verify This method verifies a data set
public virtual bool Verify( DataSet masterDataSet );

public virtual bool Verify( DataSet masterDataSet,
Type ruleType );

AppRole Application Role used by this business object
AppRolePassword Application Role Password used by this business object.
DataConfigurationPrefix Configuration prefix used to instantiate the data service
DefaultFields Default fields returned by GetList()
DefaultOrder Default order returned by GetList()
DeleteMethod Defines how the data base back end is to be updated (sql commands, stored procs,...)
LastErrorMessage Can be used to retrieve the last error message that occured.
MasterEntity This is the main database entity this business object relates to.
PrimaryKeyField Proeprty that exposes the field name of the primary key field
PrimaryKeyType Returns the type of the primary key field.
QueryMethod Defines the method used to query records on the database back end (for automated queries)
SharedDataContext Returns a reference to a data context object
UpdateMethod Defines how the data base back end is to be updated (sql commands, stored procs,...)
UpdateMode Defines whether only changed fields (default) or the complete record will be written

Requirements

Namespace: EPS.Business.BusinessObjects
Assembly: BUSINESSOBJECTS.DLL


  Last Updated: 5/23/2007 | © , 2007