本文整理汇总了Java中com.querydsl.core.types.Path.getClass方法的典型用法代码示例。如果您正苦于以下问题:Java Path.getClass方法的具体用法?Java Path.getClass怎么用?Java Path.getClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.querydsl.core.types.Path
的用法示例。
在下文中一共展示了Path.getClass方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: expressionsForProperty
import com.querydsl.core.types.Path; //导入方法依赖的package包/类
/**
* Get a Map of expressions for the given property and path. Add it to the
* given Map, or a new Map.
*
* @param property The property to get expressions for.
* @param qPath The path to get expressions for.
* @param target The Map to add to. If null a new Map will be created.
* @return The target Map, or a new Map if target was null.
*/
public static Map<String, Expression<?>> expressionsForProperty(EntityProperty property, Path<?> qPath, Map<String, Expression<?>> target) {
Map<Class, Map<String, ExpressionFactory>> innerMap = epMapMulti.get(property);
if (innerMap == null) {
throw new IllegalArgumentException("We do not know any property called " + property.toString());
}
Map<String, ExpressionFactory> coreMap = innerMap.get(qPath.getClass());
if (coreMap == null) {
throw new IllegalArgumentException("No property called " + property.toString() + " for " + qPath.getClass());
}
if (target == null) {
target = new LinkedHashMap<>();
}
for (Map.Entry<String, ExpressionFactory> es : coreMap.entrySet()) {
target.put(es.getKey(), es.getValue().get(qPath));
}
return target;
}
示例2: expressionsForProperty
import com.querydsl.core.types.Path; //导入方法依赖的package包/类
/**
* Get a Map of expressions for the given property and path. Add it to the
* given Map, or a new Map.
*
* @param property The property to get expressions for.
* @param qPath The path to get expressions for.
* @param target The Map to add to. If null a new Map will be created.
* @return The target Map, or a new Map if target was null.
*/
public static Map<String, Expression<?>> expressionsForProperty(EntityProperty property, Path<?> qPath, Map<String, Expression<?>> target) {
Map<Class, Map<String, ExpressionFactory>> innerMap = EP_MAP_MULTI.get(property);
if (innerMap == null) {
throw new IllegalArgumentException("We do not know any property called " + property.toString());
}
Map<String, ExpressionFactory> coreMap = innerMap.get(qPath.getClass());
if (coreMap == null) {
throw new IllegalArgumentException("No property called " + property.toString() + " for " + qPath.getClass());
}
if (target == null) {
target = new LinkedHashMap<>();
}
for (Map.Entry<String, ExpressionFactory> es : coreMap.entrySet()) {
target.put(es.getKey(), es.getValue().get(qPath));
}
return target;
}