Package com.j_spaces.sadapter.datasource
Class DefaultSQLQueryBuilder
java.lang.Object
com.j_spaces.sadapter.datasource.DefaultSQLQueryBuilder
- All Implemented Interfaces:
SQLQueryBuilder
Default implementation for building the SQLQuery.
- Author:
- anna
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSQLQuery<?>build(ITemplateHolder template, String typeName, ITypeDesc typeDesc) Builds the SQLQuery using given template extended match codes and values.SQLQuery<?>build(IEntryPacket entry, ITypeDesc typeDesc) Builds anSQLQueryfrom given entry packetstatic ObjectconvertToSQLFormat(Object object, short matchCode) static StringmapCodeToSign(short code) Maps between extended match-codes to actual SQL Query sign.
-
Field Details
-
BIND_PARAMETER
- See Also:
-
ADAPT_POSITIONAL_PARAMETERS
public static final boolean ADAPT_POSITIONAL_PARAMETERS -
OR
- See Also:
-
AND
- See Also:
-
-
Constructor Details
-
DefaultSQLQueryBuilder
public DefaultSQLQueryBuilder()
-
-
Method Details
-
build
Builds the SQLQuery using given template extended match codes and values.- Specified by:
buildin interfaceSQLQueryBuilder- Parameters:
typeName- the query is built using the provided typeName incase the template represents a null template or there's no type.typeDesc- might be null in case the space didn't introduce this type (might happen in case of inheritance)- Returns:
- SQLQuery
-
convertToSQLFormat
- Returns:
- Object that was converted to SQL format
-
build
Description copied from interface:SQLQueryBuilderBuilds anSQLQueryfrom given entry packet- Specified by:
buildin interfaceSQLQueryBuilder- Returns:
- SQLQuery
-
mapCodeToSign
Maps between extended match-codes to actual SQL Query sign.- Parameters:
code- the extended match-code to map- Returns:
- the corresponding SQL Query sign (according to extendedMatchCodeMapping)
-