de.micromata.genome.jpa.WrappedQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of de.micromata.mgc.jpa.emgr Show documentation
Show all versions of de.micromata.mgc.jpa.emgr Show documentation
JPA Wrapper to manage local transaction.
The newest version!
//
// Copyright (C) 2010-2016 Micromata GmbH
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
package de.micromata.genome.jpa;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.persistence.FlushModeType;
import javax.persistence.LockModeType;
import javax.persistence.Parameter;
import javax.persistence.Query;
import javax.persistence.TemporalType;
/**
* Wrapps a Query.
*
* @author Roger Rene Kommer ([email protected])
*
*/
public class WrappedQuery implements Query
{
protected Query nested;
public WrappedQuery(Query nested)
{
super();
this.nested = nested;
}
@Override
public List getResultList()
{
return nested.getResultList();
}
@Override
public Object getSingleResult()
{
return nested.getSingleResult();
}
@Override
public int executeUpdate()
{
return nested.executeUpdate();
}
@Override
public Query setMaxResults(int maxResult)
{
return nested.setMaxResults(maxResult);
}
@Override
public int getMaxResults()
{
return nested.getMaxResults();
}
@Override
public Query setFirstResult(int startPosition)
{
return nested.setFirstResult(startPosition);
}
@Override
public int getFirstResult()
{
return nested.getFirstResult();
}
@Override
public Query setHint(String hintName, Object value)
{
return nested.setHint(hintName, value);
}
@Override
public Map getHints()
{
return nested.getHints();
}
@Override
public Query setParameter(Parameter param, T value)
{
return nested.setParameter(param, value);
}
@Override
public Query setParameter(Parameter param, Calendar value, TemporalType temporalType)
{
return nested.setParameter(param, value, temporalType);
}
@Override
public Query setParameter(Parameter param, Date value, TemporalType temporalType)
{
return nested.setParameter(param, value, temporalType);
}
@Override
public Query setParameter(String name, Object value)
{
return nested.setParameter(name, value);
}
@Override
public Query setParameter(String name, Calendar value, TemporalType temporalType)
{
return nested.setParameter(name, value, temporalType);
}
@Override
public Query setParameter(String name, Date value, TemporalType temporalType)
{
return nested.setParameter(name, value, temporalType);
}
@Override
public Query setParameter(int position, Object value)
{
return nested.setParameter(position, value);
}
@Override
public Query setParameter(int position, Calendar value, TemporalType temporalType)
{
return nested.setParameter(position, value, temporalType);
}
@Override
public Query setParameter(int position, Date value, TemporalType temporalType)
{
return nested.setParameter(position, value, temporalType);
}
@Override
public Set> getParameters()
{
return nested.getParameters();
}
@Override
public Parameter> getParameter(String name)
{
return nested.getParameter(name);
}
@Override
public Parameter getParameter(String name, Class type)
{
return nested.getParameter(name, type);
}
@Override
public Parameter> getParameter(int position)
{
return nested.getParameter(position);
}
@Override
public Parameter getParameter(int position, Class type)
{
return nested.getParameter(position, type);
}
@Override
public boolean isBound(Parameter> param)
{
return nested.isBound(param);
}
@Override
public T getParameterValue(Parameter param)
{
return nested.getParameterValue(param);
}
@Override
public Object getParameterValue(String name)
{
return nested.getParameterValue(name);
}
@Override
public Object getParameterValue(int position)
{
return nested.getParameterValue(position);
}
@Override
public Query setFlushMode(FlushModeType flushMode)
{
return nested.setFlushMode(flushMode);
}
@Override
public FlushModeType getFlushMode()
{
return nested.getFlushMode();
}
@Override
public Query setLockMode(LockModeType lockMode)
{
return nested.setLockMode(lockMode);
}
@Override
public LockModeType getLockMode()
{
return nested.getLockMode();
}
@Override
public T unwrap(Class cls)
{
return nested.unwrap(cls);
}
}