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

net.nan21.dnet.module.md.acc.business.serviceimpl.AccJournalService Maven / Gradle / Ivy

The newest version!
/* 
 * DNet eBusiness Suite
 * Copyright: 2010-2013 Nan21 Electronics SRL. All rights reserved.
 * Use is subject to license terms.
 */

package net.nan21.dnet.module.md.acc.business.serviceimpl;

import javax.persistence.EntityManager;
import net.nan21.dnet.core.api.session.Session;
import net.nan21.dnet.core.business.service.entity.AbstractEntityService;
import net.nan21.dnet.module.md.acc.business.service.IAccJournalService;
import net.nan21.dnet.module.md.acc.domain.entity.AccJournal;

/**
 * Repository functionality for {@link AccJournal} domain entity. It contains
 * finder methods based on unique keys as well as reference fields.
 * 
 */
public class AccJournalService extends AbstractEntityService
		implements
			IAccJournalService {

	public AccJournalService() {
		super();
	}

	public AccJournalService(EntityManager em) {
		super();
		this.setEntityManager(em);
	}

	@Override
	public Class getEntityClass() {
		return AccJournal.class;
	}

	/**
	 * Find by unique key
	 */
	public AccJournal findByName(String name) {
		return (AccJournal) this.getEntityManager()
				.createNamedQuery(AccJournal.NQ_FIND_BY_NAME)
				.setParameter("pClientId", Session.user.get().getClientId())
				.setParameter("pName", name).getSingleResult();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy