net.sourceforge.domian.specification
Class Specification2JpqlConverter

java.lang.Object
  extended by net.sourceforge.domian.specification.Specification2JpqlConverter

public final class Specification2JpqlConverter
extends java.lang.Object


Field Summary
private static org.slf4j.Logger log
           
 
Constructor Summary
Specification2JpqlConverter()
           
 
Method Summary
private static void buildJpqlFromCompositeSpecification(CompositeSpecification<? extends Entity> compositeSpecification, net.sourceforge.domian.specification.ParameterizedSpecification originalParameterizedSpecification, boolean negated, java.lang.StringBuilder jpqlExpression, java.util.Map<java.lang.String,java.lang.Object> parameterMap)
           
private static void buildJpqlFromCompositeSpecification(CompositeSpecification<? extends Entity> specification, java.lang.StringBuilder jpqlExpression, java.util.Map<java.lang.String,java.lang.Object> parameterMap)
           
private static boolean classNameCorrelates2TableName(java.lang.String tableName, java.lang.String simpleName)
           
static java.util.List<java.lang.String> convert2DeleteStatement(Specification specification, java.util.List<java.lang.String> validTableNameList)
           
static JpqlQueryHolder convertJpaMappedSpecificationType2PreparedJpqlQuery(CompositeSpecification<? extends Entity> specification, java.util.List<java.lang.String> validTableNameList)
          An attempt to convert Entity-type Specification to Java Persistence Query Language (JPQL) expression.
(package private) static java.lang.String convertSetterOrGetterMethodName2FieldName(java.lang.String name)
           
private static java.lang.String extractTableNameFromDomainType(java.util.List<java.lang.String> tableNameList, java.lang.Class<? extends Entity> type)
           
private static java.lang.String getFieldNameFrom(net.sourceforge.domian.specification.ParameterizedSpecification parameterizedSpecification)
           
private static java.lang.String getTableNameFromDomainType(java.lang.Class<? extends Entity> domainType)
          Hard-coded table naming convention for now...
private static boolean isTypeOnlyCompositeSpecification(CompositeSpecification<Entity> compositeSpecification)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.slf4j.Logger log
Constructor Detail

Specification2JpqlConverter

public Specification2JpqlConverter()
Method Detail

convertJpaMappedSpecificationType2PreparedJpqlQuery

public static JpqlQueryHolder convertJpaMappedSpecificationType2PreparedJpqlQuery(CompositeSpecification<? extends Entity> specification,
                                                                                  java.util.List<java.lang.String> validTableNameList)
An attempt to convert Entity-type Specification to Java Persistence Query Language (JPQL) expression.

Returns:
HQL string, or null if not applicable

getTableNameFromDomainType

private static java.lang.String getTableNameFromDomainType(java.lang.Class<? extends Entity> domainType)
Hard-coded table naming convention for now...


extractTableNameFromDomainType

private static java.lang.String extractTableNameFromDomainType(java.util.List<java.lang.String> tableNameList,
                                                               java.lang.Class<? extends Entity> type)

classNameCorrelates2TableName

private static boolean classNameCorrelates2TableName(java.lang.String tableName,
                                                     java.lang.String simpleName)

convert2DeleteStatement

public static java.util.List<java.lang.String> convert2DeleteStatement(Specification specification,
                                                                       java.util.List<java.lang.String> validTableNameList)

convertSetterOrGetterMethodName2FieldName

static java.lang.String convertSetterOrGetterMethodName2FieldName(java.lang.String name)

buildJpqlFromCompositeSpecification

private static void buildJpqlFromCompositeSpecification(CompositeSpecification<? extends Entity> specification,
                                                        java.lang.StringBuilder jpqlExpression,
                                                        java.util.Map<java.lang.String,java.lang.Object> parameterMap)

buildJpqlFromCompositeSpecification

private static void buildJpqlFromCompositeSpecification(CompositeSpecification<? extends Entity> compositeSpecification,
                                                        net.sourceforge.domian.specification.ParameterizedSpecification originalParameterizedSpecification,
                                                        boolean negated,
                                                        java.lang.StringBuilder jpqlExpression,
                                                        java.util.Map<java.lang.String,java.lang.Object> parameterMap)

getFieldNameFrom

private static java.lang.String getFieldNameFrom(net.sourceforge.domian.specification.ParameterizedSpecification parameterizedSpecification)

isTypeOnlyCompositeSpecification

private static boolean isTypeOnlyCompositeSpecification(CompositeSpecification<Entity> compositeSpecification)


Copyright © 2009-2010. All Rights Reserved.