// Path: core/src/main/java/com/cosium/spring/data/jpa/entity/graph/domain/EntityGraph.java
// public interface EntityGraph {
// 
//   /** @return The type of the entity graph. May be null. */
//   EntityGraphType getEntityGraphType();
// 
//   /** @return The name to use to retrieve the EntityGraph. May be null. */
//   String getEntityGraphName();
// 
//   /** @return The attribute paths. May be null. */
//   List<String> getEntityGraphAttributePaths();
// 
//   /**
//    * @return True if the EntityGraph is optional.<br>
//    *     Passing an optional EntityGraph to an unsupported method will not fail.
//    */
//   boolean isOptional();
// }
// 
// Path: core/src/main/java/com/cosium/spring/data/jpa/entity/graph/domain/EntityGraphType.java
// public enum EntityGraphType {
//   LOAD("javax.persistence.loadgraph"),
//   FETCH("javax.persistence.fetchgraph");
// 
//   private final String key;
// 
//   EntityGraphType(String value) {
//     this.key = value;
//   }
// 
//   public String getKey() {
//     return key;
//   }
// }


import com.cosium.spring.data.jpa.entity.graph.domain.EntityGraph;
import com.cosium.spring.data.jpa.entity.graph.domain.EntityGraphType;
import org.springframework.data.jpa.domain.Specification;
import java.util.List;
package com.cosium.spring.data.jpa.entity.graph.repository.sample;



/**
 * Created on 23/11/16.
 *
 * @author Reda.Housni-Alaoui
 */
public abstract class EntityGraphSpecification<T> implements Specification<T>, EntityGraph {

  private final String entityGraphName;
  private final boolean optional;

  public EntityGraphSpecification(String entityGraphName, boolean optional) {
    this.entityGraphName = entityGraphName;
    this.optional = optional;
  }

  public EntityGraphSpecification(String entityGraphName) {
    this(entityGraphName, false);
  }

  @Override
  public String getEntityGraphName() {
    return entityGraphName;
  }

  @Override
  public EntityGraphType getEntityGraphType() {
    return EntityGraphType.LOAD;
  }

  @Override
// Path: core/src/main/java/com/cosium/spring/data/jpa/entity/graph/domain/EntityGraph.java
// public interface EntityGraph {
// 
//   /** @return The type of the entity graph. May be null. */
//   EntityGraphType getEntityGraphType();
// 
//   /** @return The name to use to retrieve the EntityGraph. May be null. */
//   String getEntityGraphName();
// 
//   /** @return The attribute paths. May be null. */
//   List<String> getEntityGraphAttributePaths();
// 
//   /**
//    * @return True if the EntityGraph is optional.<br>
//    *     Passing an optional EntityGraph to an unsupported method will not fail.
//    */
//   boolean isOptional();
// }
// 
// Path: core/src/main/java/com/cosium/spring/data/jpa/entity/graph/domain/EntityGraphType.java
// public enum EntityGraphType {
//   LOAD("javax.persistence.loadgraph"),
//   FETCH("javax.persistence.fetchgraph");
// 
//   private final String key;
// 
//   EntityGraphType(String value) {
//     this.key = value;
//   }
// 
//   public String getKey() {
//     return key;
//   }
// }


// Path: core/src/test/java/com/cosium/spring/data/jpa/entity/graph/repository/sample/EntityGraphSpecification.java
import com.cosium.spring.data.jpa.entity.graph.domain.EntityGraph;
import com.cosium.spring.data.jpa.entity.graph.domain.EntityGraphType;
import org.springframework.data.jpa.domain.Specification;
import java.util.List;

package com.cosium.spring.data.jpa.entity.graph.repository.sample;



/**
 * Created on 23/11/16.
 *
 * @author Reda.Housni-Alaoui
 */
public abstract class EntityGraphSpecification<T> implements Specification<T>, EntityGraph {

  private final String entityGraphName;
  private final boolean optional;

  public EntityGraphSpecification(String entityGraphName, boolean optional) {
    this.entityGraphName = entityGraphName;
    this.optional = optional;
  }

  public EntityGraphSpecification(String entityGraphName) {
    this(entityGraphName, false);
  }

  @Override
  public String getEntityGraphName() {
    return entityGraphName;
  }

  @Override
  public EntityGraphType getEntityGraphType() {
    return EntityGraphType.LOAD;
  }

  @Override
  public List<String> getEntityGraphAttributePaths() {