Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6553541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:35:39+00:00 2026-05-25T12:35:39+00:00

I am attempting to make custom reverse engineering templates for Hibernate. In many of

  • 0

I am attempting to make custom reverse engineering templates for Hibernate. In many of the templates I see online, I see variables such as pojo, class, c2j. My question is where are these variable coming from ? I can tell that the oft-mentioned pojo is a BasicPOJOClass entity but I can’t seem to be able to find all of the variables available to a template.

For example, here is a ftl found on the web from some version of hibernatetools.

<#if ejb3>
<#if pojo.hasIdentifierProperty()>
<#if property.equals(clazz.identifierProperty)>
${pojo.generateAnnIdGenerator()}
<#-- if this is the id property (getter)-->
<#-- explicitly set the column name for this property-->
</#if>
</#if>
<#if c2h.isManyToOne(property)>
<#--TODO support @OneToOne true and false-->    
${pojo.generateManyToOneAnnotation(property)}
<#--TODO support optional and targetEntity-->    
${pojo.generateJoinColumnsAnnotation(property, cfg)}
<#elseif c2h.isCollection(property)>
${pojo.generateCollectionAnnotation(property, cfg)}
 <#else>
${pojo.generateBasicAnnotation(property)}
${pojo.generateAnnColumnAnnotation(property)}
</#if>
</#if>

Just by reading the template, you know there are variables available to you such as cfg, clazz, c2h and ejb3 but you have no idea of what they are and what methods on them are available to you. Any help is greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:35:40+00:00Added an answer on May 25, 2026 at 12:35 pm

    I think most of the FreeMarker root context setup is handled in the AbstractExporter and GenericExporter classes. It looks like there are a couple of variables available, e.g.

    • artifacts
    • c2h
    • c2j
    • cfg
    • clazz
    • exporter
    • outputdir
    • pojo
    • template_path

    If everything else fails you’ll have to dig through those source files in order to find out about their meanings…

    HTH.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

You can see my project here - http://www.inluxphoto.com/custom/jsgallery/index.php I am attempting to make the
I am attempting to make a custom GLWindow class that includes all of my
I'm attempting to make a custom ContentProvider so that more than one application (activity?)
I'm attempting to make a drop shadow for a custom NSView subclass. So far,
I'm attempting to write a custom MarkupExtension to make my life easier by giving
So I'm extending a custom SurfaceView and am attempting to make it have pinch-zoom
I am attempting make a simulator class that will use a Queue to add
Attempting to make a NSObject called 'Person' that will hold the login details for
I'm attempting to make a StateMachine execute some database action between states. So I
I am attempting to make a program in C which presents a GUI and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.