RefactoringHbm

The Hibernate mapping files can be referenced by the Hibernate configuration files in the mapping elements as <mapping resource="somemapping.hbm.xml">. When a mapping file is renamed or moved into a different package, the referred mapping entries in the configuration files are changed accordingly.

Rename and Move a Hibernate mapping file

  • To Rename a mapping file, right click on the mapping file node in the Projects window and select Refactor > Rename...
  • To Move a mapping file, right click on the mapping file node in the Projects window and select Refactor > Move...

The dialogs for renaming and moving are pretty much like the ones for refactoring a Java class. They prompt the user for new filenames and packages. The Preview action allows the user to preview the potential diffs. The Refactor action modifies all the configuration files that reference to this mapping file.

Find Usages

To find the usage of a certain mapping file, right click on the mapping file node in the Projects window and select Find Usages. The result contains all the Hibernate configuration files that reference this mapping file.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo