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.LocationType; 025import org.openwms.common.integration.LocationTypeDao; 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 LocationTypeDaoImpl. 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.LocationTypeDao 039 */ 040@Transactional(propagation = Propagation.MANDATORY) 041@Repository(LocationTypeDaoImpl.COMPONENT_NAME) 042public class LocationTypeDaoImpl extends AbstractGenericJpaDao<LocationType, Long> implements LocationTypeDao { 043 044 /** Springs component name. */ 045 public static final String COMPONENT_NAME = "locationTypeDao"; 046 047 /** 048 * {@inheritDoc} 049 * 050 * @see org.openwms.core.integration.jpa.AbstractGenericJpaDao#getFindAllQuery() 051 */ 052 @Override 053 protected String getFindAllQuery() { 054 return LocationType.NQ_FIND_ALL; 055 } 056 057 /** 058 * {@inheritDoc} 059 * 060 * @see org.openwms.core.integration.jpa.AbstractGenericJpaDao#getFindByUniqueIdQuery() 061 */ 062 @Override 063 protected String getFindByUniqueIdQuery() { 064 return LocationType.NQ_FIND_BY_UNIQUE_QUERY; 065 } 066 067 /** 068 * {@inheritDoc} 069 * 070 * @see org.openwms.core.integration.jpa.AbstractGenericJpaDao#getPersistentClass() 071 */ 072 @Override 073 protected Class<LocationType> getPersistentClass() { 074 return LocationType.class; 075 } 076}