Show:

EntityState Class

Module: breeze

EntityState is an 'Enum' containing all of the valid states for an 'Entity'.

Methods

isAdded

() Boolean

Returns:

Boolean:

Whether an entityState instance is EntityState.Added.

Example:

var es = anEntity.entityAspect.entityState;
return es.isAdded();

is the same as

return es === EntityState.Added;

isAddedModifiedOrDeleted

() Boolean

Returns:

Boolean:

Whether an entityState instance is EntityState.Unchanged or EntityState.Modified or EntityState.Deleted.

Example:

var es = anEntity.entityAspect.entityState;
return es.isAddedModifiedOrDeleted();

is the same as

return es === EntityState.Added || es === EntityState.Modified || es === EntityState.Deleted

isDeleted

() Boolean

Returns:

Boolean:

Whether an entityState instance is EntityState.Deleted.

Example:

var es = anEntity.entityAspect.entityState;
return es.isDeleted();

is the same as

return es === EntityState.Deleted;

isDetached

() Boolean

Returns:

Boolean:

Whether an entityState instance is EntityState.Detached.

Example:

var es = anEntity.entityAspect.entityState;
return es.isDetached();

is the same as

return es === EntityState.Detached;

isModified

() Boolean

Returns:

Boolean:

Whether an entityState instance is EntityState.Modified.

Example:

var es = anEntity.entityAspect.entityState;
return es.isModified();

is the same as

return es === EntityState.Modified;

isUnchanged

() Boolean

Returns:

Boolean:

Whether an entityState instance is EntityState.Unchanged.

Example:

var es = anEntity.entityAspect.entityState;
return es.isUnchanged();

is the same as

return es === EntityState.Unchanged;

isUnchangedOrModified

() Boolean

Returns:

Boolean:

Whether an entityState instance is EntityState.Unchanged or EntityState.Modified.

Example:

var es = anEntity.entityAspect.entityState;
return es.isUnchangedOrModified();

is the same as

return es === EntityState.Unchanged || es === EntityState.Modified

Properties

Added

EntityState final static

The 'Added' state.

Deleted

EntityState final static

The 'Deleted' state.

Detached

EntityState final static

The 'Detached' state.

Modified

EntityState final static

The 'Modified' state.

Unchanged

EntityState final static

The 'Unchanged' state.