Class: Entry

olympe.dc.registry. Entry

Sync directory entry, associates a model tag with a sync constructor


new Entry(tag, syncConstructor [, args])

Parameters:
Name Type Argument Description
tag string

Model tag

syncConstructor function

Sync constructor function

args Array <optional>
<nullable>

Sync constructor extra arguments

Implements:

Methods


addOtherSide(relation)

Adds the opposite side of a relation

Parameters:
Name Type Description
relation olympe.dc.registry.Relation
Returns:
Type
olympe.dc.transformers.Related

addProperty(tag)

Adds a model property to the entry Note: for now the added property is not stored in the entry, this method acts only as a helper to create a new model property entry (which is actually just a string)

Parameters:
Name Type Description
tag string

Model property tag

Returns:

Model property

Type
olympe.dc.registry.Property

addRelation(tag [, direction])

Adds a model relation Note: for now the added relation is not stored in the entry, this method acts only as a helper to create a new Related transformer

Parameters:
Name Type Argument Default Description
tag string

Model relation tag

direction olympe.dc.Direction <optional>
olympe.dc.Direction.DESTINATION

Relation direction

Returns:
Type
olympe.dc.transformers.Related

getConstructor()

Gets the entry's sync constructor

Returns:
Type
function

getInstanceConstructor()

Gets the entry's instance constructor

Returns:
Type
olympe.dc.registry.InstanceConstructor

getSyncConstructorArgs()

Gets the entry's instance constructor

Returns:
Type
Array.<olympe.di.Service>

getTag()

Gets the entry's tag

Implements:
Returns:
Type
string

instantiate(tag, container)

Creates and returns an instance of the sync identified by this entry

Parameters:
Name Type Description
tag string
container olympe.di.Container
Returns:
Type
olympe.dc.CloudObject

isAbstract()

Checks if the class is set as being abstract

Returns:
Type
boolean

setAbstract()

Set Class as abstract

Returns:
Type
olympe.dc.registry.Entry

setInstanceConstructor(instanceConstructor)

Sets the entry's instance constructor

Parameters:
Name Type Description
instanceConstructor olympe.dc.registry.InstanceConstructor