The refactoring support allows you
to easily rename or move JPA
entities.
Procedure
Select
the entity. - To rename the entity
- Right-click
the entity
and select .
- Type the new name, select and then click Next.
- On the Rename Compilation Unit page, click items in the nested
list of
changes to be performed to view a comparison of the original source
file and
the refactored source file. You should see any references to the class
file
in the persistence.xml file and orm.xml file listed under Maintain
references to entity bean in JPA classes and files. Clear
changes
that you do not want made.
- Click Finish.
- To move the entity
- Right-click the entity
and select .
- Select the new location for the entity and
then click Preview.
- On the Move page,
click items in the nested list of changes to be performed
to view a comparison of the original source file and the refactored
source
file. You should see any references to the class file in the persistence.xml
file and orm.xml file listed under Maintain references
to entity
bean in JPA classes and files. Clear changes that you
do not want
made. If you want to make the changes, click OK.