Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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()
Ejemplo n.º 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()