new ManagedFactory(propertiesopt, …args) → {T}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
properties |
Object |
<optional> |
initial properties to set on the instance |
args |
* |
<repeatable> |
Additional constructor params passed through the type constructor |
- Source:
Returns:
The new managed instance
- Type
- T
Extends
Members
(protected, readonly) db :EntityManager
The owning EntityManager where this factory belongs to
Type:
- Source:
(protected, readonly) managedType :metamodel.ManagedType
The managed type of this factory
Type:
- Source:
methods :Object.<string, function()>
Methods that are added to object instances
This property is an alias for this factory type prototype
Type:
- Object.<string, function()>
- Source:
Methods
addMethod(name, fn) → {void}
Add a method to instances of this factories type
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The method name to add |
fn |
function | The Method to add |
- Source:
Returns:
- Type
- void
addMethods(methods) → {void}
Adds methods to instances of this factories type
Parameters:
Name | Type | Description |
---|---|---|
methods |
Object.<string, function()> | The methods to add |
- Source:
Returns:
- Type
- void
fromJSON(json) → {T}
Creates a new instance and sets the Managed Object to the given json
Parameters:
Name | Type | Description |
---|---|---|
json |
json |
- Source:
Returns:
instance
- Type
- T
new(properties) → {T}
Creates a new instance of the of this type
Parameters:
Name | Type | Description |
---|---|---|
properties |
Object.<string, *> | Additional properties which will be applied to the created instance |
- Overrides:
- Source:
Returns:
A new created instance of this class
- Type
- T
newInstance(argsopt) → {T}
Creates a new instance of the factory type
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
Array.<*> |
<optional> |
Constructor arguments used for instantiation, the constructor will not be called |
- Overrides:
- Source:
Returns:
A new created instance of T
- Type
- T