Class DTO

  • All Implemented Interfaces:
    org.wurbelizer.wurblet.Wurblet

    public class DTO
    extends DTOWurblet
    (@wurblet) DTO creates code for a data transfer object.

    usage:
    @wurblet <tag> DTO [--builder] [--bindable] <filename>

    arguments:

    • --builder: option to generate code according to the builder pattern.
    • --bindable: add @Bindable annotation to getter and setter (if not explicitly added via square brackets).
    • filename: the file holding the DTO model.
    For more options, see 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 counter
     
    If the line is prefixed with "^", the property is passed to the super entity within the constructor.
    This option is ignored in builder pattern mode.
    Example:
     ^String name   the name
     
    If the line is prefixed with "=", the property is mutable and a setter is generated.
    Example:
     =String name   the name
     
    The comment may contain optional annotations enclosed in square brackets.
     String name   the name [@Bindable(MAXCOL=20)] [@MyAnno]
     

    If the builder pattern is used and the class extends a superclass, the builder is created as an extension of the superclass'es builder.

    • Constructor Summary

      Constructors 
      Constructor Description
      DTO()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()  
      • Methods inherited from class org.wurbelizer.wurblet.AbstractWurblet

        cleanup, getClassName, getConfiguration, getContainer, getGuardName, getPackageName, getPhase, getSuperClassName, process, setConfiguration, setContainer, setPhase, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DTO

        public DTO()
    • Method Detail

      • run

        public void run()
                 throws org.wurbelizer.wurbel.WurbelException
        Specified by:
        run in interface org.wurbelizer.wurblet.Wurblet
        Overrides:
        run in class DTOWurblet
        Throws:
        org.wurbelizer.wurbel.WurbelException