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

net.nan21.dnet.module.md._businessdelegates.Setup_MD Maven / Gradle / Ivy

The newest version!
package net.nan21.dnet.module.md._businessdelegates;

import java.util.ArrayList;

import net.nan21.dnet.core.api.setup.ISetupParticipant;
import net.nan21.dnet.core.api.setup.ISetupTask;
import net.nan21.dnet.core.business.service.setup.AbstractBusinessSetupParticipant;
import net.nan21.dnet.module.md.bp.domain.entity.Bank;

public class Setup_MD extends AbstractBusinessSetupParticipant implements
		ISetupParticipant {

	@Override
	protected void onExecute() throws Exception {
	}

	@Override
	protected void init() {
		this.targetName = "DNet-MD";
		this.createTasks();
	}

	private void createTasks() {
		this.tasks = new ArrayList();

		// There is nothing to setup here, this one is run to enforce that the
		// database objects are created in the right order
		// in case the object creation is managed by eclipselink

		this.getEntityManager()
				.createQuery(
						"select count(e) from " + Bank.class.getSimpleName()
								+ " e").getResultList().get(0);

	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy