001package net.sf.jkniv.whinstone.commands;
002/* 
003 * JKNIV, whinstone one contract to access your database.
004 * 
005 * Copyright (C) 2017, the original author or authors.
006 *
007 * This library is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License.
011 * 
012 * This library 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 GNU
015 * Lesser General Public License for more details.
016 * 
017 * You should have received a copy of the GNU Lesser General Public
018 * License along with this library; if not, write to the Free Software Foundation, Inc., 
019 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
020 */
021import net.sf.jkniv.exception.HandleableException;
022
023/**
024 * Dummy/Empty implementation for {@link Command}
025 * 
026 * @author Alisson Gomes
027 * @since 0.6.0
028 *
029 */
030public class NoCommand implements Command
031{
032    private static final Command NO_COMMAND = new NoCommand();
033    
034    public static Command getInstance()
035    {
036        return NO_COMMAND;
037    }
038    
039    @Override
040    public Command with(HandleableException handleableException)
041    {
042        return this;
043    }
044    
045    @Override
046    public Command with(CommandHandler commandHandler)
047    {
048        return this;
049    }
050    
051    @Override
052    public <T> T execute()
053    {
054        return null;
055    }
056
057    @Override
058    public <T> Command with(T stmt)
059    {
060        return this;
061    }
062}