Class ServiceGenerator
java.lang.Object
nl.datasteel.crudcraft.codegen.writer.stubs.ServiceGenerator
- All Implemented Interfaces:
Generator
,StubGenerator
Generates a service stub for the given model descriptor,
with hooks to fix and clear bidirectional links.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.squareup.javapoet.JavaFile
build
(ModelDescriptor modelDescriptor, WriteContext ctx) Generates the service class for the given model descriptor.int
order()
Determines the execution order within the generator group (basic or CRUD).boolean
Indicates whether this generator should only be applied to models that are marked as CrudCraft entities.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface nl.datasteel.crudcraft.codegen.writer.stubs.StubGenerator
generate, write
-
Constructor Details
-
ServiceGenerator
public ServiceGenerator()
-
-
Method Details
-
build
Generates the service class for the given model descriptor.- Specified by:
build
in interfaceStubGenerator
-
requiresCrudEntity
public boolean requiresCrudEntity()Description copied from interface:Generator
Indicates whether this generator should only be applied to models that are marked as CrudCraft entities. Generators returningtrue
are executed only when the model descriptor reportsModelDescriptor.isCrudCraftEntity()
astrue
.- Specified by:
requiresCrudEntity
in interfaceGenerator
- Returns:
true
if the generator requires a CrudCraft entity
-
order
public int order()Description copied from interface:Generator
Determines the execution order within the generator group (basic or CRUD). Lower values run first.
-