public class DTO extends DTOWurblet
@wurblet) DTO creates code for a data transfer object.
usage:
@wurblet <tag> DTO [--builder] <filename>
arguments:
AbstractWurblet.
The model is usually stored in a heap-file such as ".$filename" created as a here-document within the leading comment
block of the DTO-file.
Each line describes a property.
Example:
String name the object's name int count the counterIf the line is prefixed with "^", the property is passed to the super entity within the constructor.
^String name the nameIf the line is prefixed with "=" or "~", the property is mutable and a setter is generated. "~" marks the property transient as well.
=String name the nameOnly for builder mode: lines prefixed with "!" are considered as required and a TentackleRuntimeException is thrown by the build-method, if a required attribute was not configured. Notice that a required attribute is always immutable.
!String name the nameThe comment may contain optional annotations enclosed in square brackets.
String name the name [@Bindable(MAXCOL=20)] [@MyAnno]
Annotations not belonging to a property are applied to all properties, if not already defined in the comment. Global annotations can be rmoved from a property with a leading dash or exclamation mark.
[@Bindable] String blah the blah String blue the blue not bindable [-@Bindable] ...
If the builder pattern is used and the class extends a superclass, the builder is created as an extension of the superclass'es builder.
DTOWurblet.Propertyannotations, extendsWithBuilder, filename, needConstructor, properties, withBuilder| Constructor and Description |
|---|
DTO() |
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
getClassName, getPackageName, getSuperClassName, isAbstract, isFinal, isPrivate, isProtected, isPublic, toStringpublic void run()
throws org.wurbelizer.wurbel.WurbelException
run in interface org.wurbelizer.wurblet.Wurbletrun in class DTOWurbletorg.wurbelizer.wurbel.WurbelExceptionTentackle - distributed, domain- and model-driven