new EmbeddableType(ref, typeConstructoropt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
ref |
string | ||
typeConstructor |
Class.<binding.Entity> |
<optional> |
- Source:
Extends
Members
declaredAttributes :Array.<metamodel.Attribute>
Type:
- Array.<metamodel.Attribute>
- Inherited From:
- Source:
enhancer :binding.Enhancer
Type:
- Inherited From:
- Source:
(readonly) isBasic :boolean
Type:
- boolean
- Inherited From:
- Source:
(readonly) isEmbeddable :boolean
Type:
- boolean
- Inherited From:
- Source:
(readonly) isEntity :boolean
Type:
- boolean
- Inherited From:
- Source:
(readonly) isMappedSuperclass :boolean
Type:
- boolean
- Inherited From:
- Source:
metadata :Object.<string, string>|null
Type:
- Object.<string, string> | null
- Inherited From:
- Source:
name :string
Type:
- string
- Inherited From:
- Source:
(readonly) persistenceType :number
The persistent type of this type
Type:
- number
- Overrides:
- Source:
ref :string
Type:
- string
- Inherited From:
- Source:
schemaAddPermission :util.Permission
Type:
- Inherited From:
- Source:
schemaReplacePermission :util.Permission
Type:
- Inherited From:
- Source:
typeConstructor :Class.<binding.Managed>
The Managed class
Type:
- Class.<binding.Managed>
- Overrides:
- Source:
validationCode :function
Type:
- function
- Overrides:
- Source:
Methods
addAttribute(attr, orderopt) → {void}
Adds an attribute to this type
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
attr |
metamodel.Attribute | The attribute to add |
|
order |
number |
<optional> |
Position of the attribute |
- Inherited From:
- Source:
Returns:
- Type
- void
attributes() → {Iterator.<metamodel.Attribute>}
An iterator which returns all attributes declared by this type and inherited form all super types
- Inherited From:
- Source:
Returns:
- Type
- Iterator.<metamodel.Attribute>
create() → {object}
Creates a new instance of the managed type, without invoking any constructors
This method is used to create object instances which are loaded form the backend.
- Inherited From:
- Source:
Returns:
The created instance
- Type
- object
createObjectFactory(db) → {binding.ManagedFactory.<*>}
Creates an ObjectFactory for this type and the given EntityManager
Parameters:
Name | Type | Description |
---|---|---|
db |
EntityManager | The created instances will be attached to this EntityManager |
- Overrides:
- Source:
Returns:
the crated object factory for the given EntityManager
createProxyClass() → {Class.<*>}
Creates an ProxyClass for this type
- Overrides:
- Source:
Returns:
the crated proxy class for this type
- Type
- Class.<*>
fromJsonValue(state, jsonValue, currentValue, options) → {*}
Merge the json data into the current object instance and returns the merged object
Parameters:
Name | Type | Description | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
state |
util.Metadata | The root object state |
|||||||||||
jsonValue |
json | The json data to merge |
|||||||||||
currentValue |
* | The object where the jsonObject will be merged into, if the current object is null, |
|||||||||||
options |
Object | additional options which are applied through the conversion |
|||||||||||
Properties
|
- Overrides:
- Source:
Returns:
The merged object instance
- Type
- *
getAttribute(namenon-null) → {metamodel.Attribute}
Parameters:
Name | Type | Description |
---|---|---|
name |
string |
- Inherited From:
- Source:
Returns:
- Type
- metamodel.Attribute
getDeclaredAttribute(val) → {metamodel.Attribute}
Parameters:
Name | Type | Description |
---|---|---|
val |
string | number | Name or order of the attribute |
- Inherited From:
- Source:
Returns:
- Type
- metamodel.Attribute
getMetadata(key) → {null|string}
Gets some metadata of this type
Parameters:
Name | Type | Description |
---|---|---|
key |
string |
- Inherited From:
- Source:
Returns:
- Type
- null | string
hasMetadata(key) → {boolean}
Retrieves whether this type has specific metadata
Parameters:
Name | Type | Description |
---|---|---|
key |
string |
- Inherited From:
- Source:
Returns:
- Type
- boolean
init(enhancer) → {void}
Initialize this type
Parameters:
Name | Type | Description |
---|---|---|
enhancer |
binding.Enhancer | The class enhancer used to instantiate an instance of this managed class |
- Inherited From:
- Source:
Returns:
- Type
- void
references() → {Iterator.<EntityType>}
Returns iterator to get all referenced entities
- Inherited From:
- Source:
Returns:
- Type
- Iterator.<EntityType>
removeAttribute(name) → {void}
Removes an attribute from this type
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The Name of the attribute which will be removed |
- Inherited From:
- Source:
Returns:
- Type
- void
toJSON() → {json}
Converts ths type schema to json
- Inherited From:
- Source:
Returns:
- Type
- json
toJsonValue(state, object, options) → {json}
Converts the given object to json
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
state |
util.Metadata | The root object state |
||||||||||||||||
object |
* | The object to convert |
||||||||||||||||
options |
Object | additional options which are applied through the conversion |
||||||||||||||||
Properties
|
- Overrides:
- Source:
Returns:
The converted object as json
- Type
- json