br.com.objectos.way.sql.Naming Maven / Gradle / Ivy
/*
* Copyright 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 com.squareup.javapoet.ClassName;
import com.squareup.javapoet.ParameterizedTypeName;
import com.squareup.javapoet.TypeVariableName;
import com.squareup.javapoet.WildcardTypeName;
/**
* @author [email protected] (Marcio Endo)
*/
class Naming {
public static final ClassName AbstractInsertInto = sql("AbstractInsertInto");
public static final ClassName AbstractSimpleSelectQuery = sql("AbstractSimpleSelectQuery");
public static final ClassName AbstractUpdate = sql("AbstractUpdate");
public static final ClassName DateComparison = sql("DateComparison");
public static final ClassName GeneratedKeyListener = db("GeneratedKeyListener");
public static final ClassName InsertableRow = sql("InsertableRow");
public static final ClassName InsertableRow_Values = InsertableRow.nestedClass("Values");
public static final ClassName InsertInto = sql("InsertInto");
public static final ClassName InsertNode = sql("InsertNode");
public static final ClassName InsertQuery = sql("InsertQuery");
public static final ClassName InsertValue = sql("InsertValue");
public static final ClassName InsertValues = sql("InsertValues");
public static final ClassName Keyword = sql("Keyword");
public static final ClassName NumericComparison = sql("NumericComparison");
public static final ClassName ResultMapper = sql("ResultMapper");
public static final ClassName Select = sql("Select");
public static final ClassName SelectFrom = sql("SelectFrom");
public static final ClassName SelectNode = sql("SelectNode");
public static final ClassName SelectNode_First = query("SelectNode", "First");
public static final ClassName SimpleInsertQuery = sql("SimpleInsertQuery");
public static final ClassName SimpleSelectOrderBy = sql("SimpleSelectOrderBy");
public static final ClassName SimpleSelectQuery = sql("SimpleSelectQuery");
public static final ClassName SimpleSelectWhere = sql("SimpleSelectWhere");
public static final ClassName SimpleSelectWhereInt = sql("SimpleSelectWhereInt");
public static final ClassName SimpleSelectWhereLocalDate = sql("SimpleSelectWhereLocalDate");
public static final ClassName SimpleSelectWhereString = sql("SimpleSelectWhereString");
public static final ClassName String = ClassName.get(String.class);
public static final ClassName StringComparison = sql("StringComparison");
public static final TypeVariableName T = TypeVariableName.get("T");
public static final TypeVariableName V = TypeVariableName.get("V");
public static final TypeVariableName X = TypeVariableName.get("X");
public static final ClassName UpdateSet = sql("UpdateSet");
public static final ClassName UpdateValue = sql("UpdateValue");
public static final ClassName Variable = ClassName.get(br.com.objectos.way.db.Variable.class);
public static final WildcardTypeName Wildcard = WildcardTypeName.subtypeOf(Object.class);
public static final ParameterizedTypeName Variable_V = ParameterizedTypeName.get(Variable, V);
private Naming() {
}
public static String sqlPackageName() {
return "br.com.objectos.way.sql";
}
private static ClassName db(String simpleName) {
return ClassName.get("br.com.objectos.way.db", simpleName);
}
private static ClassName sql(String simpleName) {
return ClassName.get(sqlPackageName(), simpleName);
}
private static ClassName query(String simpleName, String simpleName2) {
return ClassName.get(sqlPackageName(), simpleName, simpleName2);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy