The initial version of the class is generated from a template. It's pretty simple, but it is important to understand it too:
package com.wavemaker.example;
The package name comes directly from the package name we specified in the creation dialog.
In Chapter 2, Digging into the Architecture, we learned that a service class must extend JavaServiceSuperClass
or use the @ExposeToClient
annotation in order to be able to expose methods to the client. The template does both, and there are two imports: one for the super class and the other for the annotation:
import com.wavemaker.runtime.javaservice.JavaServiceSuperClass;
import com.wavemaker.runtime.service.annotations.ExposeToClient;
In between two comments, the first noting the class as client-facing and the second using the log command, is the class declaration:
@ExposeToClient
public class DbOpsSvc extends JavaServiceSuperClass {
In the preceding code, we can see the use of the annotation and the extension of the...