Skip to content

trajano/jpa-apt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JPA Annotation Processor

Annotation processor that create support classes for JPA annotated classes.

Table Module

The processor creates a Stateless Session Bean that represents the table module class. The table module design pattern represents a single instance that handles the business logic for all rows in a database table or view.

In the traditional design pattern, a table module represents a single model; as generated by this processor, the table module represents a single entity graph that may span one or more tables.

The generated class provides support for CRUD operations via

  • save(EntityType) which creates or updates an entity
  • remove(EntityType) which removes an entity from the database
  • getById(EntityIdType) which reads a single entity from the database

In addition, it creates a new method for each @NamedQuery to ensure the method is called correctly at compile time rather than at run-time.

For non-standard operations, any public static method that has an EntityManager as it's first parameter will have a mapping in the generated code where the entity manager is passed in. Annotations are not copied over for the non-standard operations.

About

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages