|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sqlproc.engine.impl.SqlMetaConst
class SqlMetaConst
A META SQL sub-element. It represents a static input value.
Schematically:
SqlMetaConst +-SqlMetaConstItem.SqlMetaConstItem...^SqlMyType^value
Field Summary | |
---|---|
private SqlInputValue.Code |
caseConversion
Which conversion should be done on input value. |
private List<String> |
elements
The list of sub-elements. |
(package private) org.slf4j.Logger |
logger
The internal slf4j logger. |
private boolean |
not
An indicator, which is used to control, how the input value is added to the final ANSI SQL. |
private SqlType |
sqlType
The type of this input value. |
(package private) Map<String,String> |
values
Values for a special identifier handling, for example a sequence for an identity. |
Fields inherited from interface org.sqlproc.engine.impl.SqlMetaElement |
---|
AND_PREFIX, CONST_PREFIX, IDENT_PREFIX, IDENT_SEPARATOR, lCONST_PREFIX, lIDENT_PREFIX, OR_PREFIX, SET_PREFIX, VALUES_PREFIX, WHERE_PREFIX |
Constructor Summary | |
---|---|
SqlMetaConst(SqlInputValue.Code caseConversion)
Creates a new instance of this entity. |
|
SqlMetaConst(SqlInputValue.Code caseConversion,
boolean not)
Creates a new instance of this entity. |
|
SqlMetaConst(SqlInputValue.Code caseConversion,
boolean not,
SqlType type)
Creates a new instance of this entity. |
Method Summary | |
---|---|
(package private) void |
addConst(String name)
Adds a new name. |
(package private) String |
getData(Object obj)
Returns a String representation of input values, after a possible transformation process. |
(package private) String |
getDefaultData()
Returns a default input value in the case the input attribute is null. |
List<String> |
getElements()
Returns the list of sub-elements |
(package private) Class<?> |
getFieldType(SqlProcessContext ctx,
Class<?> attributeType,
String attributeName)
Returns the static input attribute type. |
(package private) Object |
getInputValues(SqlProcessContext ctx)
Returns the static or dynamic input values. |
(package private) Object |
getProperty(SqlProcessContext ctx,
Object obj,
String item)
Returns the static input attribute value. |
(package private) SqlType |
getSqlType()
Returns the type of this input value. |
(package private) boolean |
isNot()
Returns the indicator, which is used to control, how the input value is added to the final ANSI SQL. |
SqlProcessResult |
process(SqlProcessContext ctx)
The main contract for a dynamic ANSI SQL Query generation. |
boolean |
processExpression(SqlProcessContext ctx)
The main contract to evaluate a logical value of META SQL sub-elements. |
void |
setElements(List<String> elements)
Sets the list of sub-elements. |
(package private) void |
setMetaType(SqlMetaType metaType)
Sets the internal type of this input value. |
(package private) void |
setNot(boolean not)
Sets the indicator, which is used to control, how the input value is added to the final ANSI SQL. |
void |
setValues(String value,
String value2)
Sets the values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final org.slf4j.Logger logger
private SqlInputValue.Code caseConversion
private boolean not
private List<String> elements
private SqlType sqlType
Map<String,String> values
Constructor Detail |
---|
SqlMetaConst(SqlInputValue.Code caseConversion)
caseConversion
- which conversion should be done on inputValueSqlMetaConst(SqlInputValue.Code caseConversion, boolean not)
caseConversion
- which conversion should be done on inputValuenot
- an indicator, which is used to control, how the input value is added to the final ANSI SQLSqlMetaConst(SqlInputValue.Code caseConversion, boolean not, SqlType type)
caseConversion
- which conversion should be done on inputValuenot
- an indicator, which is used to control, how the input value is added to the final ANSI SQLtype
- the type of this input value, which can be Hibernate or an internal typeMethod Detail |
---|
void addConst(String name)
name
- the next name in the list of namesvoid setMetaType(SqlMetaType metaType)
metaType
- an internal typepublic void setValues(String value, String value2)
value
- the value for special treatment, might be an identifier of value2value2
- the value for special treatmentSqlType getSqlType()
void setNot(boolean not)
not
- a new indicator valueboolean isNot()
public List<String> getElements()
public void setElements(List<String> elements)
elements
- the list of sub-elementspublic SqlProcessResult process(SqlProcessContext ctx)
process
in interface SqlMetaElement
ctx
- the crate for all input parameters and the context of processingString getData(Object obj)
obj
- a raw input value
public boolean processExpression(SqlProcessContext ctx)
processExpression
in interface SqlMetaLogOperand
ctx
- the context for a dynamic ANSI SQL Query generation
Object getInputValues(SqlProcessContext ctx)
ctx
- the crate for all input parameters and the context of processing
String getDefaultData()
Class<?> getFieldType(SqlProcessContext ctx, Class<?> attributeType, String attributeName)
ctx
- the crate for all input parameters and the context of processingattributeType
- parents typeattributeName
- the attribute name
Object getProperty(SqlProcessContext ctx, Object obj, String item)
ctx
- the crate for all input parameters and the context of processingobj
- the static input value POJOitem
- the attribute name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |