
com.mysema.query.jdo.JDOQLSerializer Maven / Gradle / Ivy
/*
* Copyright 2015, The Querydsl Team (http://www.querydsl.com/team)
*
* 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 com.mysema.query.jdo;
import javax.annotation.Nullable;
import java.util.*;
import java.util.Map.Entry;
import com.google.common.collect.ImmutableList;
import com.google.common.primitives.Primitives;
import com.mysema.query.JoinExpression;
import com.mysema.query.QueryMetadata;
import com.mysema.query.support.SerializerBase;
import com.mysema.query.types.*;
import com.mysema.query.types.expr.Param;
/**
* JDOQLSerializer serializes Querydsl queries and expressions into JDOQL strings
*
* @author tiwe
*
*/
public final class JDOQLSerializer extends SerializerBase {
private static final String COMMA = ", ";
private static final String FROM = "\nFROM ";
private static final String GROUP_BY = "\nGROUP BY ";
private static final String HAVING = "\nHAVING ";
private static final String ORDER_BY = "\nORDER BY ";
private static final String PARAMETERS = "\nPARAMETERS ";
private static final String RANGE = "\nRANGE ";
private static final String SELECT = "SELECT ";
private static final String SELECT_COUNT = "SELECT count(";
private static final String SELECT_COUNT_THIS = "SELECT count(this)\n";
private static final String SELECT_DISTINCT = "SELECT DISTINCT ";
private static final String SELECT_UNIQUE = "SELECT UNIQUE ";
private static final String THIS = "this";
private static final String VARIABLES = "\nVARIABLES ";
private static final String WHERE = "\nWHERE ";
private static Comparator> comparator = new Comparator>() {
@Override
public int compare(Entry
© 2015 - 2025 Weber Informatics LLC | Privacy Policy