当前位置: 首页>>代码示例>>Java>>正文


Java Path.getClass方法代码示例

本文整理汇总了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;
}
 
开发者ID:FraunhoferIOSB,项目名称:SensorThingsServer,代码行数:27,代码来源:PropertyResolver.java

示例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;
}
 
开发者ID:FraunhoferIOSB,项目名称:SensorThingsServer,代码行数:27,代码来源:PropertyResolver.java


注:本文中的com.querydsl.core.types.Path.getClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。