Ejemplo n.º 1
0
  /**
   * 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;
  }
Ejemplo n.º 2
0
 /**
  * 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);
 }