Example #1
0
def getDb(*args):
    global app
    if len(args)>0:
        huConf = HibernateDbConf.newHibernateConf(args[0])
    else:
        huConf = HibernateDbConf.newHibernateConf(utils.conf_file)
    app = HuApp()
    app.setDbMap(huConf)
    return app
Example #2
0
def getDb(*args):
    global app
    if len(args) > 0:
        huConf = HibernateDbConf.newHibernateConf(args[0])
    else:
        huConf = HibernateDbConf.newHibernateConf(utils.conf_file)
    app = HuApp()
    app.setDbMap(huConf)
    return app
Example #3
0
def buildClassImportFile(outfile,infile):
    fp = open(utils.fullPath(outfile),"w")
    fp.write("#!/usr/bin/env jython\n")
    for className in HibernateDbConf.getHibernateClasses(infile):
        fp.write("import %s as %s\n"%(className,className.split(".")[-1]))
    fp.close()
Example #4
0
def buildClassImportFile(outfile, infile):
    fp = open(utils.fullPath(outfile), "w")
    fp.write("#!/usr/bin/env jython\n")
    for className in HibernateDbConf.getHibernateClasses(infile):
        fp.write("import %s as %s\n" % (className, className.split(".")[-1]))
    fp.close()