breeze-client / EntityAction
Class: EntityAction
Defined in: src/entity/entity-action.ts:7
EntityAction is an 'Enum' containing all of the valid actions that can occur to an 'Entity'.
Extends
Constructors
Constructor
new EntityAction(
propertiesObj?):EntityAction
Defined in: src/core/enum.ts:72
Creates a symbol, copying each property of propertiesObj onto it. Used to declare the symbols of an enum, as static members of its class; its name is set when the class calls BreezeEnum.resolveSymbols.
Parameters
propertiesObj?
Object
Returns
EntityAction
Inherited from
Properties
_$typeName
_$typeName:
string
Defined in: src/core/enum.ts:60
Type of the enum; set in prototype of each enum
Inherited from
name
name:
string
Defined in: src/core/enum.ts:58
The name of this symbol
Inherited from
AcceptChanges
staticAcceptChanges:EntityAction
Defined in: src/entity/entity-action.ts:33
AcceptChanges was called on the entity, or its entityState was set to Unmodified.
Attach
staticAttach:EntityAction
Defined in: src/entity/entity-action.ts:10
Entity was attached via an AttachEntity call.
AttachOnImport
staticAttachOnImport:EntityAction
Defined in: src/entity/entity-action.ts:14
Entity was attached as a result of an import.
AttachOnQuery
staticAttachOnQuery:EntityAction
Defined in: src/entity/entity-action.ts:12
Entity was attached as a result of a query.
Clear
staticClear:EntityAction
Defined in: src/entity/entity-action.ts:38
The EntityManager was cleared. All entities detached.
Detach
staticDetach:EntityAction
Defined in: src/entity/entity-action.ts:17
Entity was detached
EntityStateChange
staticEntityStateChange:EntityAction
Defined in: src/entity/entity-action.ts:30
The EntityState of the entity was changed.
MergeOnImport
staticMergeOnImport:EntityAction
Defined in: src/entity/entity-action.ts:22
Properties on the entity were merged as a result of an import.
MergeOnQuery
staticMergeOnQuery:EntityAction
Defined in: src/entity/entity-action.ts:20
Properties on the entity were merged as a result of a query.
MergeOnSave
staticMergeOnSave:EntityAction
Defined in: src/entity/entity-action.ts:24
Properties on the entity were merged as a result of a save
PropertyChange
staticPropertyChange:EntityAction
Defined in: src/entity/entity-action.ts:27
A property on the entity was changed.
RejectChanges
staticRejectChanges:EntityAction
Defined in: src/entity/entity-action.ts:35
RejectChanges was called on the entity.
Methods
isAttach()
isAttach():
boolean
Defined in: src/entity/entity-action.ts:47
Is this an 'attach' operation? ( Attach, AttachOnQuery or AttachOnImport)
Returns
boolean
isDetach()
isDetach():
boolean
Defined in: src/entity/entity-action.ts:51
Is this a 'detach' operation? ( Detach, Clear)
Returns
boolean
isModification()
isModification():
boolean
Defined in: src/entity/entity-action.ts:55
Is this a 'modification' operation? ( PropertyChange, MergeOnQuery, MergeOnSave, MergeOnImport, RejectChanges)
Returns
boolean
toJSON()
toJSON():
object
Defined in: src/core/enum.ts:180
Return enum name and symbol name
Returns
_$typeName
_$typeName:
any
The name of the enum, such as "EntityState".
name
name:
string
The name of the symbol, such as "Added".
Inherited from
toString()
toString():
string
Defined in: src/core/enum.ts:175
Returns the string name of this Enum
Returns
string
Inherited from
contains()
staticcontains(sym):boolean
Defined in: src/core/enum.ts:154
Returns whether an Enum contains a specified symbol.
let symbol = DayOfWeek.Friday;
if (DayOfWeek.contains(symbol)) {
// do something
}Parameters
sym
Object or symbol to test.
Returns
boolean
Whether this Enum contains the specified symbol.
Inherited from
fromName()
staticfromName(name):any
Defined in: src/core/enum.ts:113
Returns an Enum symbol given its name.
let dayOfWeek = DayOfWeek.from("Thursday");
// nowdayOfWeek === DayOfWeek.ThursdayParameters
name
string
Name for which an enum symbol should be returned.
Returns
any
The symbol that matches the name or 'undefined' if not found.
Inherited from
getNames()
staticgetNames():string[]
Defined in: src/core/enum.ts:100
Returns the names of all of the symbols contained within this Enum.
let symbols = DayOfWeek.getNames();Returns
string[]
All of the names of the symbols contained within this Enum.
Inherited from
getSymbols()
staticgetSymbols<T>(this):InstanceType<T>[]
Defined in: src/core/enum.ts:86
Returns all of the symbols contained within this Enum.
let symbols = DayOfWeek.getSymbols();Type Parameters
T
T extends typeof BreezeEnum
Parameters
this
T
Returns
InstanceType<T>[]
All of the symbols contained within this Enum.
Inherited from
resolveSymbols()
staticresolveSymbols():object[]
Defined in: src/core/enum.ts:124
Seals this enum so that no more symbols may be added to it. This should only be called after all symbols have already been added to the Enum. This method also sets the 'name' property on each of the symbols.
DayOfWeek.resolveSymbols();