OnCreate Hook

Overview

Event fired before entity is created.

Note that this kind of hooks is called before performing any entity validation 

Common Attributes

name

type

required

default value

description

class

string

yes

none

Name of the class defining hook.

method

string

yes

none

Name of the method defining hook.

Example

<onCreate class="com.sample.SampleHook" method="generateNumber" />

Hook method signature

public void hookName(final DataDefinition dataDefinition, final Entity entity) {
    // ...
}