com.taggercat.metadata
Class MetaDataLoader

java.lang.Object
  extended by com.taggercat.metadata.MetaDataLoader

public class MetaDataLoader
extends java.lang.Object

This is a utility function to load Hibernate meta data into the runtime SQL tables. The Hibernate meta data is read form the Hibernate configuration object; and not directly from the Hibernate mapping files. You can use this utility to both initially load the runtime metadata SQL tables, as well as use it add incremental changes to the Hibernate meta data.

 

Constructor Summary
MetaDataLoader()
           
 
Method Summary
static void main(java.lang.String[] args)
          Main
static void runLoader(org.hibernate.cfg.Configuration hbn8Config, org.hibernate.SessionFactory sessionFactory, java.lang.String codeTablePrefix, java.lang.String tenantName, java.lang.Boolean deleteOrphans)
          Runs the metadata loading process using an existing configuration and session factory
static void runLoader(java.lang.String codeTablePrefix, java.lang.String tenantName, java.lang.Boolean deleteOrphans)
          Runs the metadata loading process
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaDataLoader

public MetaDataLoader()
Method Detail

runLoader

public static void runLoader(java.lang.String codeTablePrefix,
                             java.lang.String tenantName,
                             java.lang.Boolean deleteOrphans)
                      throws java.lang.Exception
Runs the metadata loading process

Throws:
java.lang.Exception
Parameters:
codeTablePrefix - the prefix used to indicate a code table
deleteOrphans - set true to delete orphaned items in the database

runLoader

public static void runLoader(org.hibernate.cfg.Configuration hbn8Config,
                             org.hibernate.SessionFactory sessionFactory,
                             java.lang.String codeTablePrefix,
                             java.lang.String tenantName,
                             java.lang.Boolean deleteOrphans)
                      throws java.lang.Exception
Runs the metadata loading process using an existing configuration and session factory

Throws:
java.lang.Exception
Parameters:
hbn8Config - the hibernate configuration object
sessionFactory - the hibernate session factory
codeTablePrefix - the prefix used to indicate a code table
deleteOrphans - set true to delete orphaned items in the database

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main

Throws:
java.lang.Exception