All Downloads are FREE. Search and download functionalities are using the official Maven repository.

br.com.objectos.way.sql.AbstractHasLevel Maven / Gradle / Ivy

/*
 * Copyright 2014-2015 Objectos, Fábrica de Software LTDA.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package br.com.objectos.way.sql;

import java.util.List;
import java.util.function.Function;
import java.util.stream.Stream;

import com.squareup.javapoet.ClassName;
import com.squareup.javapoet.JavaFile;
import com.squareup.javapoet.ParameterizedTypeName;
import com.squareup.javapoet.TypeName;
import com.squareup.javapoet.TypeSpec;

/**
 * @author [email protected] (Marcio Endo)
 */
abstract class AbstractHasLevel {

  final Level level;

  public AbstractHasLevel(Level level) {
    this.level = level;
  }

  public final JavaFile generate() {
    return level.generate(type());
  }

  TypeName abstractSimpleSelectWhereTypeName() {
    return level.abstractSimpleSelectWhereTypeName();
  }

  ClassName className(String simpleName) {
    return level.className(simpleName);
  }

  ClassName className(String simpleName, String simpleName2) {
    return level.className(simpleName, simpleName2);
  }

  ClassName classNameLevel(String simpleName) {
    return level.classNameLevel(simpleName);
  }

  ParameterizedTypeName parameterizedTypeName(ClassName className, TypeName... more) {
    return level.parameterizedTypeName(className, more);
  }

  ParameterizedTypeName parameterizedTypeNameLevel(String simpleName) {
    return level.parameterizedTypeNameLevel(simpleName);
  }

  TypeName rowTypeName() {
    return level.rowTypeName();
  }

  TypeName selectNodeTypeName() {
    return level.selectNodeTypeName();
  }

  TypeName simpleSelectOrderByTypeName() {
    return level.simpleSelectOrderByTypeName();
  }

  ClassName simpleSelectWhereClassName() {
    return level.simpleSelectWhereClassName();
  }

  TypeName simpleSelectWhereTypeName() {
    return level.simpleSelectWhereTypeName();
  }

  ClassName simpleSelectWhereIntClassName() {
    return level.simpleSelectWhereIntClassName();
  }

  ClassName simpleSelectWhereLocalDateClassName() {
    return level.simpleSelectWhereLocalDateClassName();
  }

  ClassName simpleSelectWhereStringClassName() {
    return level.simpleSelectWhereStringClassName();
  }

  List stepList() {
    return level.stepList();
  }

   List stepList(Function mapper) {
    return level.stepList(mapper);
  }

   Stream stepStream(Function mapper) {
    return level.stepStream(mapper);
  }

  abstract TypeSpec type();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy