I still dont get your needs.
However, if you would like a example how to use hibernate and dont want to learn the basics try to figure out how this works:
http://www.hibernate.org/hib_docs/v3/reference/en/html/example-weblog.html
Once your application works you could use this to dump your association informations: (works with hibernate3)
Code:
ClassMetadata cm = session.getSessionFactory().getClassMetadata(Mdart.class);
Type[] types = cm.getPropertyTypes();
for (int i = 0; i<types.length; i++)
{
Type type = types[i];
if (type instanceof ManyToOneType)
{
ManyToOneType mtot = (ManyToOneType) type;
System.err.print("the association between " + cm.getEntityName() + " and " + mtot.getAssociatedEntityName() + " is: ");
if (mtot.isOneToOne())
{
System.err.println("oneToOne");
}
else
{
System.err.println("manyToOne");
}
}
else if (type instanceof SetType)
{
SetType st = (SetType) type;
SessionFactoryImplementor sfi = (SessionFactoryImplementor) session.getSessionFactory();
System.err.print("the association between " + cm.getEntityName() + " and " + st.getAssociatedEntityName(sfi) + " is:");
System.err.println("oneToMany");
}
}