01.03.03 Basic UI - Roo 03 - Sample Use Case - Sample 03 Many to Many

Sample Use Case - Sample 03 Many to Many

Now to the complicated example

entity jpa --class ~.model.Artifact --testAutomatically 
field string --fieldName name --notNull 
enum type --class ~.model.DeploymentStatus
enum constant --class ~.model.DeploymentStatus --name SCHEDULLED
enum constant --class ~.model.DeploymentStatus --name DEPLOYED
enum constant --class ~.model.DeploymentStatus --name REMOVED
enum constant --class ~.model.DeploymentStatus --name CANCELED
entity jpa --class ~.model.Deployment --testAutomatically 
field string --fieldName name --notNull 
field date --fieldName schedulledDate --type java.util.Date 
field enum --fieldName status --type ~.model.DeploymentStatus --notNull 
entity jpa --class ~.model.Server --testAutomatically 
field string --fieldName name --notNull 
field reference --fieldName artifact --type ~.model.Artifact --class ~.model.Deployment --notNull 
field reference --fieldName server --type ~.model.Server --class ~.model.Deployment --notNull 
finder list
web jsf all --package mx.rmm.simpleconcise.roo.web

One big difference with Forge is the date picker by default on schedulled date field.

Status has Autocomplete enabled

And both artifact and server also have autocomplete

List all deployments contains only name and schedulled date but no Status which is not what I would like.

And on the detail page we see the ID for server and artifact instead of the name we selected on creation.

Current metrics are

.css
.js
.aj
  5619 total
.java
  618 total
.xml
  593 total
.xhtml
  710 total

Here we see a lot of aspectJ code which is always overwritten by roo and the way that we can customize appearance and behaviour is by implementing on the .java files; roo will delete the code on the aspectj files whenever it detects changes on the java sources.

For example

privileged aspect Artifact_Roo_ToString {
    
    public String Artifact.toString() {
        return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }
    
}

If we implement a toString method roo will delete those lines on Artifact_Roo_ToString.

You can find sourcecode here

Previous   |    Up   |    Index    |   Next