Trace:
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Last revision Both sides next revision | ||
jvx:server:storage:trigger [2018/02/02 09:09] admin created |
jvx:server:storage:trigger [2020/06/15 11:39] cduncan |
||
---|---|---|---|
Line 1: | Line 1: | ||
~~Title: Server-Side Trigger for Storages~~ | ~~Title: Server-Side Trigger for Storages~~ | ||
- | With JVx, the business logic can be developed in either the database or the middle tier. For the development of the business logic entirely in the middle tier so-called Server-Side Triggers are required. These triggers work just like the [[jvx:client:model:databook:events|DataBook Events]] at the client. | + | With JVx, the business logic can be developed in either the database or the middle tier. For the development of the business logic entirely in the middle tier, so-called server-side triggers are required. These triggers work just like the [[jvx:client:model:databook:events|DataBook Events]] at the client. |
- | For example, a Server-Side Trigger is called when a new record was inserted, modified or deleted. | + | For example, a server-side trigger is called when a new record was inserted, modified, or deleted. |
== Example == | == Example == | ||
- | We use a RemoteDataBook at the client for the creation of user accounts. A user is defined by username, password, first and last name. The password, however, has to be encrypted before it is stored in the database. | + | We use a RemoteDataBook at the client for the creation of user accounts. A user is defined by username, password, first name, and last name. The password, however, has to be encrypted before it is stored in the database. |
We define the storage: | We define the storage: | ||
Line 60: | Line 60: | ||
</file> | </file> | ||
- | In our example we use IBean to access the properties. The event also allows the use of POJOs, as shown in the following example: | + | In our example, we use IBean to access the properties. The event also allows the use of POJOs, as shown in the following example: |
<file java> | <file java> | ||
Line 78: | Line 78: | ||
**<fs 20px>Note</fs>** | **<fs 20px>Note</fs>** | ||
- | Any POJO can be used. The implemented mechanism attempts to align the properties via the database´s column identifiers. In our previous example we could also use an Address POJO, as long as it contains the relevant properties. Only feasible properties are aligned. | + | Any POJO can be used. The implemented mechanism attempts to align the properties via the database´s column identifiers. In our previous example, we could also use an Address POJO, as long as it contains the relevant properties. Only feasible properties are aligned. |