Skip to content

Single Entity Class Definition

EntitySpaces edited this page Jan 22, 2012 · 3 revisions
es.EsEntity = function () {

	// Public Methods
	acceptChanges();    // rarely used
	rejectChanges();    // rollback any changes
	applyDefaults();    // override to assign defaults to columns
	customize();        // override to add extra columns to your entity
	isDirty();          // does this entity have changes
	isDirtyGraph();     // does this entire object graph have changes
	loadByPrimaryKey(); // load this entity by the primary key
	markAsDeleted();    // mark this entity as deleted
	save();             // save this entity

	// Protected Methods
	load();             // called by your custom load methods
	populateEntity();   // load by passing in data (not recommended)

	// Properties
	RowState();         // es.RowState.ADDED/DELETED/MODIFIED/UNCHANGED
	ModifiedColumns[];  // contains the columns that are dirty
};

Clone this wiki locally