Package com.querydsl.core.support
Class SerializerBase<S extends SerializerBase<S>>
java.lang.Object
com.querydsl.core.support.SerializerBase<S>
- Type Parameters:
S- concrete subtype
public abstract class SerializerBase<S extends SerializerBase<S>>
extends Object
implements Visitor<Void,Void>
SerializerBase is a stub for Serializer implementations which serialize query metadata to Strings- Author:
- tiwe
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Sprotected @NotNull StringgetConstantLabel(Object value) Generate a constant value under which to register a new constant ingetConstantToLabel().protected Stringprotected intprotected final TemplategetTemplate(Operator op) final Sfinal Shandle(Expression<?> expr) final Sfinal Shandle(String sep, Expression<?>[] expressions) final Shandle(String sep, List<? extends Expression<?>> expressions) protected voidhandleTemplate(Template template, List<?> args) final Sfinal Sfinal booleanserialize(JoinFlag.Position position, Set<JoinFlag> flags) final booleanserialize(QueryFlag.Position position, Set<QueryFlag> flags) protected voidserializeConstant(int parameterIndex, String constantLabel) Serialize the constant as parameter to the query.voidsetAnonParamPrefix(String prefix) voidsetConstantPrefix(String prefix) voidsetNormalize(boolean normalize) Deprecated.normalization happens now at template levelvoidsetParamPrefix(String prefix) voidsetStrict(boolean strict) toString()final VoidVisit a Constant instance with the given contextvisit(FactoryExpression<?> expr, Void context) Visit a FactoryExpression instance with the given contextVisit an Operation instance with the given contextvisit(ParamExpression<?> param, Void context) Visit a ParamExpression instance with the given contextVisit a Path instance with the given contextvisit(TemplateExpression<?> expr, Void context) Visit a TemplateExpression instance with the given contextvoidvisitConstant(Object constant) protected voidvisitOperation(Class<?> type, Operator operator, List<? extends Expression<?>> args)
-
Field Details
-
constants
-
constantToLabel
-
-
Constructor Details
-
SerializerBase
-
-
Method Details
-
prepend
-
insert
-
append
-
getConstantPrefix
-
getConstantToLabel
-
getLength
protected int getLength() -
getTemplate
-
handle
-
handle
-
handle
-
handle
-
handle
-
handleTemplate
-
serialize
-
serialize
-
setConstantPrefix
-
setParamPrefix
-
setAnonParamPrefix
-
setNormalize
Deprecated.normalization happens now at template levelNot used anymore -
setStrict
public void setStrict(boolean strict) -
toString
-
visit
Description copied from interface:VisitorVisit a Constant instance with the given context -
visitConstant
-
serializeConstant
Serialize the constant as parameter to the query. The default implementation writes the label name for the constants. Some dialects may replace this by indexed based or positional parameterization. Dialects may also use this to prefix the parameter with for example ":" or "?".- Parameters:
parameterIndex- index at which this constant occurs ingetConstants()constantLabel- label under which this constant occurs ingetConstantToLabel()
-
getConstantLabel
Generate a constant value under which to register a new constant ingetConstantToLabel().- Parameters:
value- the constant value or parameter to create a constant for- Returns:
- the generated label
-
getConstants
-
visit
Description copied from interface:VisitorVisit a ParamExpression instance with the given context -
visit
Description copied from interface:VisitorVisit a TemplateExpression instance with the given context -
visit
Description copied from interface:VisitorVisit a FactoryExpression instance with the given context -
visit
Description copied from interface:VisitorVisit an Operation instance with the given context -
visit
Description copied from interface:VisitorVisit a Path instance with the given context -
visitOperation
-