ComplexType Class
Container for all of the metadata about a specific type of Complex object.
Item Index
Methods
Methods
<ctor> ComplexType
-
config
Parameters:
-
config
ObjectConfiguration settings
-
shortName
String -
[namespace=""]
String optional -
[dataProperties]
Array of DataProperties optional -
[custom]
Object optional
-
Example:
var complexType = new ComplexType( {
shortName: "address",
namespace: "myAppNamespace"
});
addValidator
-
validator
-
[property]
See EntityType.addValidator
Parameters:
-
validator
ValidatorValidator to add.
-
[property]
Object optionalProperty to add this validator to. If omitted, the validator is assumed to be an entity level validator and is added to the EntityType's 'validators'.
createInstance
-
initialValues
Creates a new non-attached instance of this ComplexType.
Parameters:
-
initialValues
ObjectConfiguration object containing initial values for the instance.
getCtor
()
See EntityType.getEntityCtor
getProperty
()
See EntityType.getProperty
getPropertyNames
()
See EntityType.getPropertyNames
setProperties
-
config
General purpose property set method
Parameters:
-
config
Object[object]
-
[custom]
Object optional
-
Example:
// assume em1 is an EntityManager
var addresstType = em1.metadataStore.getEntityType("Address");
addressType.setProperties( {
custom: { foo: 7, bar: "test" }
});
Properties
complexProperties
Array of DataProperty
The DataProperties for this ComplexType that contain instances of a ComplexType (see ComplexType).
readOnly
custom
Object
A free form object that can be used to define any custom metadata for this ComplexType.
readOnly
dataProperties
Array of DataProperty
The DataProperties (see DataProperty) associated with this ComplexType.
readOnly
name
String
The fully qualifed name of this ComplexType.
readOnly
namespace
String
The namespace for this ComplexType.
readOnly
shortName
String
The short, unqualified, name for this ComplexType.
readOnly
unmappedProperties
Array of DataProperty
The DataProperties associated with this ComplexType that are not mapped to any backend datastore. These are effectively free standing properties.
readOnly
validators
Array of Validator
The entity level validators associated with this ComplexType. Validators can be added and removed from this collection.
readOnly