Modify Code
From Taylor
Contents |
Overview
Feel free to modify the code to your hearts content. Eclipse JMerge is used to merge re-generated Java code with modified Java code. The @generated JavaDoc annotation is used to flag generated code.
Non-Java files are renamed with a timestamp suffix to avoid overwriting modifications.
@generated Tag
Change the tag to @NOT generated to prevent overwriting modified code. Also all code without the tag will be left as is.
/**
* @NOT generated
*/
@WebMethod
public List<ChangeRequest> query(ChangeRequest example) {
log.debug(this);
Query qry = manager.createQuery("from ChangeRequest c");
return qry.getResultList();
}
What Not to Modify
Do not modify the signatures of generated methods. These need to be modified in the model and regenerated.
Facelets Customization
The generated facelets are meant to be customized. Generating an Entity bean is very straight forward because there are well defined rules and only so many variations. On the other hand, the user interface is the place where different applications can differentiate themselves.
To this end, the generated facelets are meant to give you a jump start. The following sections outline possible modifications.
Descriptors
You will find all the necessary deployment descriptors generated in the location that maven expects to find them.
Most descriptors are only generated if they do not exist. So you can and are expected to modify them. Otherwise they are backed up before regeneration so you can manually merge your changes.

