// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
package test.hibshard.std;

import java.io.File;
import java.util.logging.Level;
import java.util.logging.Logger;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

import test.hibshard.common.BaseTest;


/*
CREATE TABLE country (
    name VARCHAR(20) NOT NULL,
    continent VARCHAR(20) NOT NULL,
    capital VARCHAR(20),
    PRIMARY KEY(name)
);
INSERT INTO country VALUES('Canada', 'North America', 'Ottawa');
INSERT INTO country VALUES('USA', 'North America', 'Washington');
INSERT INTO country VALUES('UK', 'Europe', 'London');
INSERT INTO country VALUES('France', 'Europe', 'Paris');
INSERT INTO country VALUES('Germany', 'Europe', 'Berlin');
 */

public class Test {
	public static void main(String[] args) {
        Logger.getLogger("org.hibernate").setLevel(Level.SEVERE);
        BaseTest tst = new StdTest();
        tst.execute();
	}
}

class StdTest extends BaseTest {
	@Override
	protected SessionFactory getSessionFactory() {
		Configuration cfg = new Configuration();
		File f = new File("bin/test/hibshard/std/hibernateconfig.xml");
		cfg.configure(f);
        SessionFactory sf = cfg.buildSessionFactory();
        return sf;
	}
}
