001/*
002 * openwms.org, the Open Warehouse Management System.
003 * Copyright (C) 2014 Heiko Scherrer
004 *
005 * This file is part of openwms.org.
006 *
007 * openwms.org is free software: you can redistribute it and/or modify
008 * it under the terms of the GNU General Public License as 
009 * published by the Free Software Foundation; either version 2 of the
010 * License, or (at your option) any later version.
011 *
012 * openwms.org is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
015 * GNU General Public License for more details.
016 *
017 * You should have received a copy of the GNU General Public License
018 * along with this software. If not, write to the Free Software
019 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021 */
022package org.openwms.common.integration.jpa;
023
024import org.openwms.common.domain.TransportUnitType;
025import org.openwms.common.integration.TransportUnitTypeDao;
026import org.openwms.core.integration.jpa.AbstractGenericJpaDao;
027import org.springframework.stereotype.Repository;
028import org.springframework.transaction.annotation.Propagation;
029import org.springframework.transaction.annotation.Transactional;
030
031/**
032 * A TransportUnitTypeDaoImpl.
033 * 
034 * @author <a href="mailto:scherrer@openwms.org">Heiko Scherrer</a>
035 * @version $Revision$
036 * @since 0.1
037 * @see org.openwms.core.integration.jpa.AbstractGenericJpaDao
038 * @see org.openwms.common.integration.TransportUnitTypeDao
039 */
040@Transactional(propagation = Propagation.MANDATORY)
041@Repository(TransportUnitTypeDaoImpl.COMPONENT_NAME)
042public class TransportUnitTypeDaoImpl extends AbstractGenericJpaDao<TransportUnitType, Long> implements
043        TransportUnitTypeDao {
044
045    /** Springs component name. */
046    public static final String COMPONENT_NAME = "transportUnitTypeDao";
047
048    /**
049     * {@inheritDoc}
050     * 
051     * @see org.openwms.core.integration.jpa.AbstractGenericJpaDao#getFindAllQuery()
052     */
053    @Override
054    protected String getFindAllQuery() {
055        return TransportUnitType.NQ_FIND_ALL;
056    }
057
058    /**
059     * {@inheritDoc}
060     * 
061     * @see org.openwms.core.integration.jpa.AbstractGenericJpaDao#getFindByUniqueIdQuery()
062     */
063    @Override
064    protected String getFindByUniqueIdQuery() {
065        return TransportUnitType.NQ_FIND_BY_NAME;
066    }
067
068    /**
069     * {@inheritDoc}
070     * 
071     * @see org.openwms.core.integration.jpa.AbstractGenericJpaDao#getPersistentClass()
072     */
073    @Override
074    protected Class<TransportUnitType> getPersistentClass() {
075        return TransportUnitType.class;
076    }
077}