コード例 #1
0
ファイル: LambdaUtils.java プロジェクト: levants/lightmare
  /**
   * Gets appropriated {@link org.lightmare.criteria.tuples.QueryTuple} from serialized lambda cache
   * or analyzes appropriated lambda expression from compiled class
   *
   * @param method
   * @return {@link org.lightmare.criteria.tuples.QueryTuple} from cache
   */
  private static QueryTuple getByLambda(Serializable method) {

    QueryTuple tuple;

    LambdaInfo lambda = LambdaReplacements.getReplacement(method);
    tuple = ObjectUtils.callOrInit(lambda, QueryCache::getQuery, LambdaUtils::resolvefromLambda);

    return tuple;
  }
コード例 #2
0
ファイル: LambdaUtils.java プロジェクト: levants/lightmare
 /**
  * Gets appropriated {@link org.lightmare.criteria.tuples.QueryTuple} from cache or initializes
  * and caches new instance
  *
  * @param method
  * @return {@link org.lightmare.criteria.tuples.QueryTuple} from cache
  */
 private static QueryTuple getOrInitOriginal(Serializable method) {
   return ObjectUtils.callOrInit(method, LambdaCache::getByInstance, LambdaUtils::initAndCache);
 }