All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.tool.ant.Hbm2CfgXmlExporterTask Maven / Gradle / Ivy

There is a newer version: 5.6.15.Final
Show newest version
/*
 * Created on 25-Feb-2005
 *
 */
package org.hibernate.tool.ant;

import org.hibernate.tool.hbm2x.Exporter;
import org.hibernate.tool.hbm2x.HibernateConfigurationExporter;

public class Hbm2CfgXmlExporterTask extends ExporterTask {

	private boolean ejb3;

	public Hbm2CfgXmlExporterTask(HibernateToolTask parent) {
		super(parent);
	}

	public Exporter createExporter() {
		return new HibernateConfigurationExporter();
	}

	public void setEjb3(boolean ejb3) {
		this.ejb3 = ejb3;
	}
	
	public String getName() {
		return "hbm2cfgxml (Generates hibernate.cfg.xml)";
	}
	
	protected Exporter configureExporter(Exporter exporter) {
		HibernateConfigurationExporter hce = (HibernateConfigurationExporter)super.configureExporter( exporter );
        hce.getProperties().setProperty("ejb3", ""+ejb3);
		return hce;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy