Sha256: 0026b25d3448f4d82ac34026aa045cad9d2d3e240db6a16b3456be9c75388744
Contents?: true
Size: 791 Bytes
Versions: 1
Compression:
Stored size: 791 Bytes
Contents
class RepositoryGenerator < BaseScaffold def build define_source_paths template("repository.erb", Configuration.main_class_path(Configuration.repositories_package, "#{repository_class_name}.java")) template("repository_test.erb", Configuration.test_class_path(Configuration.repositories_package, "#{repository_test_class_name}.java")) end def template_path "src/templates/repositories" end def orm_import return "org.hibernate.SessionFactory" if Configuration.hibernate? "javax.persistence.EntityManager" end def orm_parameter_name return "sessionFactory" if Configuration.hibernate? "entityManager" end def orm_class orm_parameter_name.camelize end def source_root File.join(File.dirname(__FILE__), "templates") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
springmvc-scaffold-1.0.1 | lib/springmvc-scaffold/generators/scaffold/repository/repository_generator.rb |