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

org.jinq.jpa.transform.ScalaJoinTransform Maven / Gradle / Ivy

The newest version!
package org.jinq.jpa.transform;

import org.jinq.jpa.jpqlquery.RowReader;
import org.jinq.jpa.jpqlquery.ScalaTupleRowReader;

public class ScalaJoinTransform extends JoinTransform
{
   public ScalaJoinTransform(JPQLQueryTransformConfiguration config, boolean withSource, boolean joinAsPairs)
   {
      super(config, withSource, joinAsPairs, true, false);
   }
   
   public ScalaJoinTransform(JPQLQueryTransformConfiguration config)
   {
      this(config, false, true);
   }

   @Override
   protected  RowReader createPairReader(RowReader a, RowReader b)
   {
      return ScalaTupleRowReader.createReaderForTuple(ScalaTupleRowReader.TUPLE2_CLASS, a, b);
   }
   
   @Override 
   public String getTransformationTypeCachingTag()
   {
      return ScalaJoinTransform.class.getName();
   }
}