Class AbstractSqlStyle
- All Implemented Interfaces:
Serializable
,ISqlStyle
- Direct Known Subclasses:
DB2SqlStyle
,DerbySqlStyle
,MSSQLSqlStyle
,MySqlSqlStyle
,OracleSqlStyle
,PostgreSqlStyle
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from interface org.eclipse.scout.rt.server.jdbc.style.ISqlStyle
MAX_LIST_SIZE, MAX_SQL_STRING_LENGTH, PLAIN_BIND_MARKER_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
adaptBindName
(String bindName) protected String
adaptBindNameTimeDateOp
(String bindName) buildBindFor
(Object o, Class nullType) bind factory seeISqlStyle.isBlobEnabled()
,ISqlStyle.isClobEnabled()
andISqlStyle.isLargeString(String)
void
commit()
createBetween
(String attribute, String bindName1, String bindName2) P.BUDGET between :bindName1 and :bindName2
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)protected SqlBind
createBindFor
(Object o, Class c) May be used by specific style if different behavior is required.createContains
(String attribute, String bindName) P.NAME like '*'||:bindName||'*'
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateBetween
(String attribute, String bindName1, String bindName2) P.EVT_CREATED between :bindName1 and :bindName2
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateEQ
(String attribute, String bindName) createDateGE
(String attribute, String bindName) createDateGT
(String attribute, String bindName) createDateIsInDays
(String attribute, String bindName) P.NAME dateIsInDays :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateIsInGEDays
(String attribute, String bindName) P.NAME dateIsInGEDays :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateIsInGEMonths
(String attribute, String bindName) P.NAME dateIsInGEMonths :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateIsInGEWeeks
(String attribute, String bindName) P.NAME dateIsInGEWeeks :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateIsInLastDays
(String attribute, String bindName) P.NAME dateIsInLastDays :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateIsInLastMonths
(String attribute, String bindName) P.NAME dateIsInLastMonths :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateIsInLEDays
(String attribute, String bindName) P.NAME dateIsInLEDays :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateIsInLEMonths
(String attribute, String bindName) P.NAME dateIsInLEMonths :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateIsInLEWeeks
(String attribute, String bindName) P.NAME dateIsInLEWeeks :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateIsInMonths
(String attribute, String bindName) P.NAME dateIsInMonths :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateIsInNextDays
(String attribute, String bindName) P.NAME dateIsInNextDays :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateIsInNextMonths
(String attribute, String bindName) P.NAME dateIsInNextMonths :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateIsInWeeks
(String attribute, String bindName) P.NAME dateIsInWeeks :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateIsNotToday
(String attribute) P.NAME dateIsNotToday
createDateIsToday
(String attribute) P.NAME dateIsToday
createDateLE
(String attribute, String bindName) createDateLT
(String attribute, String bindName) createDateNEQ
(String attribute, String bindName) createDateTimeBetween
(String attribute, String bindName1, String bindName2) P.EVT_CREATED between :bindName1 and :bindName2
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateTimeEQ
(String attribute, String bindName) createDateTimeGE
(String attribute, String bindName) createDateTimeGT
(String attribute, String bindName) createDateTimeIsInGEHours
(String attribute, String bindName) P.NAME dateTimeIsInGEHours :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateTimeIsInGEMinutes
(String attribute, String bindName) P.NAME dateTimeIsInGEMinutes :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateTimeIsInLEHours
(String attribute, String bindName) P.NAME dateTimeIsInLEHours :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateTimeIsInLEMinutes
(String attribute, String bindName) P.NAME dateTimeIsInLEMinutes :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createDateTimeIsNotNow
(String attribute) P.NAME dateTimeIsNotNow
createDateTimeIsNow
(String attribute) P.NAME dateTimeIsNow
createDateTimeLE
(String attribute, String bindName) createDateTimeLT
(String attribute, String bindName) createDateTimeNEQ
(String attribute, String bindName) createEndsWith
(String attribute, String bindName) createInList
(String attribute, boolean plain, Object array) createInList
(String attribute, Object array) createLike
(String attribute, String bindName) createNotContains
(String attribute, String bindName) P.NAME not like '*'||:bindName||'*'
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createNotEndsWith
(String attribute, String bindName) P.NAME not like '*'||:bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createNotIn
(String attribute, String bindName) createNotInList
(String attribute, boolean plain, Object array) createNotInList
(String attribute, Object array) createNotLike
(String attribute, String bindName) createNotNull
(String attribute) createNotStartsWith
(String attribute, String bindName) P.NAME not like :bindName||'*'
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createNull
(String attribute) P.NAME is null
createNumberNotNull
(String attribute) nvl(P.NAME,0)<>0
special case for 'number is null
', if0
andnull
are treated equallycreateNumberNull
(String attribute) nvl(P.NAME,0) = 0
special case for 'number is null
', if0
andnull
are treated equallycreateStartsWith
(String attribute, String bindName) createTextNotNull
(String attribute) nvl(P.NAME,'0')<>'0'
special case for 'text is null
' when'0'
andnull
are treated equallycreateTextNull
(String attribute) nvl(P.NAME,'0')=='0'
special case for 'text is null
', if'0'
andnull
are treated equallycreateTimeIsInGEHours
(String attribute, String bindName) P.NAME timeIsInGEHours :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createTimeIsInGEMinutes
(String attribute, String bindName) P.NAME timeIsInGEMinutes :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createTimeIsInHours
(String attribute, String bindName) P.NAME timeIsInHours :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createTimeIsInLEHours
(String attribute, String bindName) P.NAME timeIsInLEHours :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createTimeIsInLEMinutes
(String attribute, String bindName) P.NAME timeIsInLEMinutes :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createTimeIsInMinutes
(String attribute, String bindName) P.NAME timeIsInMinutes :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)createTimeIsNotNow
(String attribute) P.NAME timeIsNow
createTimeIsNow
(String attribute) P.NAME timeIsNow
createYearToDate
(String attribute, String bindName) P.EVT_CREATED between :bindName1 and today in year
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)ansi:+
protected AbstractSqlStyle.DecimalConversion
Gets the strategy to convert a decimal / numeric DB type into a data type in Java.protected int
getJdbcType
(Class c) ansi:*
expression for lower case text using the database specific keyword,LOWER
on oracleprotected abstract int
expression for null-value/default-value using the database specific keyword,NVL
on oracleexpression for the current date using the database specific keyword,SYSDATE
on oracleexpression for trimmed text using the database specific keyword,TRIM
on oracleexpression for upper case text using the database specific keyword,UPPER
on oracleboolean
Style can handle arrays as bind or as literal replacement.readBind
(ResultSet rs, ResultSetMetaData meta, int type, int jdbcBindIndex) read bind value from aResultSet
void
registerOutput
(CallableStatement cs, int index, Class c) apply out parameter to a stored procedure call in aCallableStatement
void
rollback()
toAggregationAvg
(String attribute) AVG(p.BUDGET)
toAggregationCount
(String attribute) COUNT(p.BUDGET)
toAggregationMax
(String attribute) MAX(p.BUDGET)
toAggregationMedian
(String attribute) MEDIAN(p.BUDGET)
toAggregationMin
(String attribute) MIN(p.BUDGET)
toAggregationSum
(String attribute) SUM(p.BUDGET)
protected Object[]
toLikePattern
(Object value) convert*
into%
toPlainText
(Object value) void
writeBind
(PreparedStatement ps, int jdbcBindIndex, SqlBind bind) apply bind value to aPreparedStatement
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.scout.rt.server.jdbc.style.ISqlStyle
isBlobEnabled, isClobEnabled, isLargeString, testConnection
-
Constructor Details
-
AbstractSqlStyle
public AbstractSqlStyle()
-
-
Method Details
-
getConcatOp
Description copied from interface:ISqlStyle
ansi:+
- Specified by:
getConcatOp
in interfaceISqlStyle
-
getLikeWildcard
Description copied from interface:ISqlStyle
ansi:*
- Specified by:
getLikeWildcard
in interfaceISqlStyle
-
toLikePattern
Description copied from interface:ISqlStyle
convert*
into%
- Specified by:
toLikePattern
in interfaceISqlStyle
-
toPlainText
- Specified by:
toPlainText
in interfaceISqlStyle
-
toAggregationAvg
Description copied from interface:ISqlStyle
AVG(p.BUDGET)
- Specified by:
toAggregationAvg
in interfaceISqlStyle
-
toAggregationCount
Description copied from interface:ISqlStyle
COUNT(p.BUDGET)
- Specified by:
toAggregationCount
in interfaceISqlStyle
-
toAggregationMax
Description copied from interface:ISqlStyle
MAX(p.BUDGET)
- Specified by:
toAggregationMax
in interfaceISqlStyle
-
toAggregationMedian
Description copied from interface:ISqlStyle
MEDIAN(p.BUDGET)
- Specified by:
toAggregationMedian
in interfaceISqlStyle
-
toAggregationMin
Description copied from interface:ISqlStyle
MIN(p.BUDGET)
- Specified by:
toAggregationMin
in interfaceISqlStyle
-
toAggregationSum
Description copied from interface:ISqlStyle
SUM(p.BUDGET)
- Specified by:
toAggregationSum
in interfaceISqlStyle
-
buildBindFor
Description copied from interface:ISqlStyle
bind factory seeISqlStyle.isBlobEnabled()
,ISqlStyle.isClobEnabled()
andISqlStyle.isLargeString(String)
- Specified by:
buildBindFor
in interfaceISqlStyle
- Parameters:
o
- the value to be bound. If the value is aIHolder
then its content value is usednullType
- only used in case o is null. If the type is aIHolder
type then its component type is used Ignored otherwise.
-
createBindFor
May be used by specific style if different behavior is required.- Returns:
- A bind or throws a
IllegalArgumentException
.
-
writeBind
Description copied from interface:ISqlStyle
apply bind value to aPreparedStatement
- Specified by:
writeBind
in interfaceISqlStyle
- Throws:
SQLException
-
readBind
public Object readBind(ResultSet rs, ResultSetMetaData meta, int type, int jdbcBindIndex) throws SQLException Description copied from interface:ISqlStyle
read bind value from aResultSet
- Specified by:
readBind
in interfaceISqlStyle
- Throws:
SQLException
-
registerOutput
Description copied from interface:ISqlStyle
apply out parameter to a stored procedure call in aCallableStatement
- Specified by:
registerOutput
in interfaceISqlStyle
- Throws:
SQLException
-
getJdbcType
-
createBetween
Description copied from interface:ISqlStyle
P.BUDGET between :bindName1 and :bindName2
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)for dates use
ISqlStyle.createDateBetween(String, String, String)
andISqlStyle.createDateTimeBetween(String, String, String)
In an Oracle implementation this could be represented as
attribute BETWEEN :firstBind AND :secondBind
- Specified by:
createBetween
in interfaceISqlStyle
-
createDateBetween
Description copied from interface:ISqlStyle
P.EVT_CREATED between :bindName1 and :bindName2
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute BETWEEN TRUNC( :firstBind ) AND (TRUNC( :secondBind ) + (86399/86400))
- Specified by:
createDateBetween
in interfaceISqlStyle
-
createYearToDate
Description copied from interface:ISqlStyle
P.EVT_CREATED between :bindName1 and today in year
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In a Postgresql implementation this could be represented as
attribute between ((DATE_TRUNC('year', current_date))+ interval ':firstbind year') and (current_date + interval ':firstbind year');
- Specified by:
createYearToDate
in interfaceISqlStyle
-
createDateTimeBetween
Description copied from interface:ISqlStyle
P.EVT_CREATED between :bindName1 and :bindName2
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute BETWEEN TRUNC( :firstBind , 'MI' ) AND (TRUNC( :secondBind , 'MI') + (59/1440))
- Specified by:
createDateTimeBetween
in interfaceISqlStyle
-
createStartsWith
Description copied from interface:ISqlStyle
P.NAME like :bindName||'*'
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
UPPER( attribute ) LIKE UPPER( :firstBind || '%')
- Specified by:
createStartsWith
in interfaceISqlStyle
-
createNotStartsWith
Description copied from interface:ISqlStyle
P.NAME not like :bindName||'*'
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
UPPER( attribute ) NOT LIKE UPPER( :firstBind || '%')
- Specified by:
createNotStartsWith
in interfaceISqlStyle
-
createEndsWith
Description copied from interface:ISqlStyle
P.NAME like '*'||:bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
UPPER( attribute ) LIKE UPPER( '%' || :firstBind )
- Specified by:
createEndsWith
in interfaceISqlStyle
-
createNotEndsWith
Description copied from interface:ISqlStyle
P.NAME not like '*'||:bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
UPPER( attribute ) NOT LIKE UPPER( '%' || :firstBind )
- Specified by:
createNotEndsWith
in interfaceISqlStyle
-
createContains
Description copied from interface:ISqlStyle
P.NAME like '*'||:bindName||'*'
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
UPPER( attribute ) LIKE UPPER('%'|| :firstBind ||'%')
- Specified by:
createContains
in interfaceISqlStyle
-
createNotContains
Description copied from interface:ISqlStyle
P.NAME not like '*'||:bindName||'*'
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
UPPER( attribute ) NOT LIKE UPPER('%'|| :firstBind ||'%')
- Specified by:
createNotContains
in interfaceISqlStyle
-
createLike
Description copied from interface:ISqlStyle
P.NAME like :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
UPPER( attribute ) LIKE UPPER( :firstBind )
- Specified by:
createLike
in interfaceISqlStyle
-
createNotLike
Description copied from interface:ISqlStyle
P.NAME not like :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
UPPER( attribute ) NOT LIKE UPPER( :firstBind )
- Specified by:
createNotLike
in interfaceISqlStyle
-
createNull
Description copied from interface:ISqlStyle
P.NAME is null
In an Oracle implementation this could be represented as
attribute IS NULL
- Specified by:
createNull
in interfaceISqlStyle
-
createNotNull
Description copied from interface:ISqlStyle
P.NAME not null
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute IS NOT NULL
- Specified by:
createNotNull
in interfaceISqlStyle
-
createNumberNull
Description copied from interface:ISqlStyle
nvl(P.NAME,0) = 0
special case for 'number is null
', if0
andnull
are treated equallyIn an Oracle implementation this could be represented as
NVL(attribute, 0) = 0
- Specified by:
createNumberNull
in interfaceISqlStyle
-
createNumberNotNull
Description copied from interface:ISqlStyle
nvl(P.NAME,0)<>0
special case for 'number is null
', if0
andnull
are treated equallyIn an Oracle implementation this could be represented as
NVL( attribute, 0) <> 0
- Specified by:
createNumberNotNull
in interfaceISqlStyle
-
createTextNull
Description copied from interface:ISqlStyle
nvl(P.NAME,'0')=='0'
special case for 'text is null
', if'0'
andnull
are treated equallyIn an Oracle implementation this could be represented as
NVL(attribute, '0') = '0'
- Specified by:
createTextNull
in interfaceISqlStyle
-
createTextNotNull
Description copied from interface:ISqlStyle
nvl(P.NAME,'0')<>'0'
special case for 'text is null
' when'0'
andnull
are treated equallyIn an Oracle implementation this could be represented as
NVL( attribute, '0') <> '0'
- Specified by:
createTextNotNull
in interfaceISqlStyle
-
createIn
Description copied from interface:ISqlStyle
P.NAME in :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute IN ( :{firstBind} )
-
createNotIn
Description copied from interface:ISqlStyle
P.NAME not in :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
NOT( attribute IN ( :{firstBind} ))
- Specified by:
createNotIn
in interfaceISqlStyle
-
createDateIsToday
Description copied from interface:ISqlStyle
P.NAME dateIsToday
In an Oracle implementation this could be represented as
attribute >= TRUNC(SYSDATE) AND attribute < TRUNC(SYSDATE+1)
- Specified by:
createDateIsToday
in interfaceISqlStyle
-
createDateIsInLastDays
Description copied from interface:ISqlStyle
P.NAME dateIsInLastDays :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >= TRUNC(SYSDATE-( :firstBind )) AND attribute < TRUNC(SYSDATE+1)
- Specified by:
createDateIsInLastDays
in interfaceISqlStyle
-
createDateIsInNextDays
Description copied from interface:ISqlStyle
P.NAME dateIsInNextDays :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >= TRUNC(SYSDATE) AND attribute < TRUNC(SYSDATE+ :firstBind +1)
- Specified by:
createDateIsInNextDays
in interfaceISqlStyle
-
createDateIsInDays
Description copied from interface:ISqlStyle
P.NAME dateIsInDays :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >= TRUNC(SYSDATE+ :firstBind ) AND attribute < TRUNC(SYSDATE+ :firstBind +1)
- Specified by:
createDateIsInDays
in interfaceISqlStyle
-
createDateIsInWeeks
Description copied from interface:ISqlStyle
P.NAME dateIsInWeeks :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >= TRUNC(SYSDATE+ (( :firstBind ) *7) ) AND attribute < TRUNC(SYSDATE+(( :firstBind ) *7)+1)
- Specified by:
createDateIsInWeeks
in interfaceISqlStyle
-
createDateIsInLastMonths
Description copied from interface:ISqlStyle
P.NAME dateIsInLastMonths :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >= TRUNC(ADD_MONTHS(SYSDATE,(-1)*( :firstBind ))) AND attribute < TRUNC(SYSDATE+1)
- Specified by:
createDateIsInLastMonths
in interfaceISqlStyle
-
createDateIsInNextMonths
Description copied from interface:ISqlStyle
P.NAME dateIsInNextMonths :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >= TRUNC(SYSDATE) AND attribute < TRUNC(ADD_MONTHS(SYSDATE, :firstBind )+1)
- Specified by:
createDateIsInNextMonths
in interfaceISqlStyle
-
createDateIsInMonths
Description copied from interface:ISqlStyle
P.NAME dateIsInMonths :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >= TRUNC(ADD_MONTHS(SYSDATE, :firstBind )) AND attribute < TRUNC(ADD_MONTHS(SYSDATE, :firstBind )+1)
- Specified by:
createDateIsInMonths
in interfaceISqlStyle
-
createDateIsInLEDays
Description copied from interface:ISqlStyle
P.NAME dateIsInLEDays :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute < TRUNC(SYSDATE + :firstBind +1)
- Specified by:
createDateIsInLEDays
in interfaceISqlStyle
-
createDateIsInLEWeeks
Description copied from interface:ISqlStyle
P.NAME dateIsInLEWeeks :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute < TRUNC(SYSDATE+(( :firstBind )*7)+1)
- Specified by:
createDateIsInLEWeeks
in interfaceISqlStyle
-
createDateIsInLEMonths
Description copied from interface:ISqlStyle
P.NAME dateIsInLEMonths :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute < TRUNC(ADD_MONTHS(SYSDATE, :firstBind )+1)
- Specified by:
createDateIsInLEMonths
in interfaceISqlStyle
-
createDateIsInGEDays
Description copied from interface:ISqlStyle
P.NAME dateIsInGEDays :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >= TRUNC(SYSDATE + :firstBind )
- Specified by:
createDateIsInGEDays
in interfaceISqlStyle
-
createDateIsInGEWeeks
Description copied from interface:ISqlStyle
P.NAME dateIsInGEWeeks :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >= TRUNC(SYSDATE+(( :firstBind )*7))
- Specified by:
createDateIsInGEWeeks
in interfaceISqlStyle
-
createDateIsInGEMonths
Description copied from interface:ISqlStyle
P.NAME dateIsInGEMonths :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >=TRUNC(ADD_MONTHS(SYSDATE, :firstBind ))
- Specified by:
createDateIsInGEMonths
in interfaceISqlStyle
-
createDateIsNotToday
Description copied from interface:ISqlStyle
P.NAME dateIsNotToday
In an Oracle implementation this could be represented as
( attribute <TRUNC(SYSDATE) OR attribute >=TRUNC(SYSDATE+1))
- Specified by:
createDateIsNotToday
in interfaceISqlStyle
-
createDateTimeIsNow
Description copied from interface:ISqlStyle
P.NAME dateTimeIsNow
In an Oracle implementation this could be represented as
( attribute >= TRUNC(SYSDATE, 'MI') AND attribute < (TRUNC(SYSDATE, 'MI')+(1/24/60)))
- Specified by:
createDateTimeIsNow
in interfaceISqlStyle
-
createDateTimeIsInLEMinutes
Description copied from interface:ISqlStyle
P.NAME dateTimeIsInLEMinutes :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute < (TRUNC(SYSDATE, 'MI')+(( :firstBind +1)/24/60))
- Specified by:
createDateTimeIsInLEMinutes
in interfaceISqlStyle
-
createDateTimeIsInLEHours
Description copied from interface:ISqlStyle
P.NAME dateTimeIsInLEHours :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute <(TRUNC(SYSDATE, 'MI')+((1/24/60)+( :firstBind /24)))
- Specified by:
createDateTimeIsInLEHours
in interfaceISqlStyle
-
createDateTimeIsInGEMinutes
Description copied from interface:ISqlStyle
P.NAME dateTimeIsInGEMinutes :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >=(TRUNC(SYSDATE, 'MI')+( :firstBind /24/60))
- Specified by:
createDateTimeIsInGEMinutes
in interfaceISqlStyle
-
createDateTimeIsInGEHours
Description copied from interface:ISqlStyle
P.NAME dateTimeIsInGEHours :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >= (TRUNC(SYSDATE, 'MI')+( :firstBind /24))
- Specified by:
createDateTimeIsInGEHours
in interfaceISqlStyle
-
createDateTimeIsNotNow
Description copied from interface:ISqlStyle
P.NAME dateTimeIsNotNow
In an Oracle implementation this could be represented as
( attribute <TRUNC(SYSDATE, 'MI') OR attribute >=(TRUNC(SYSDATE, 'MI')+(1/24/60)))
- Specified by:
createDateTimeIsNotNow
in interfaceISqlStyle
-
createTimeIsNow
Description copied from interface:ISqlStyle
P.NAME timeIsNow
In an Oracle implementation this could be represented as
attribute >= ((TO_CHAR(SYSDATE,'HH24')*60) + TO_CHAR(SYSDATE,'MI'))/24/60
AND attribute < ((TO_CHAR(SYSDATE,'HH24')*60) + TO_CHAR(SYSDATE,'MI')+(1/24/60))/24/60- Specified by:
createTimeIsNow
in interfaceISqlStyle
-
createTimeIsNotNow
Description copied from interface:ISqlStyle
P.NAME timeIsNow
In an Oracle implementation this could be represented as
attribute < ((TO_CHAR(SYSDATE,'HH24')*60) + TO_CHAR(SYSDATE,'MI'))/24/60
OR attribute > ((TO_CHAR(SYSDATE,'HH24')*60)+TO_CHAR(SYSDATE,'MI')+(1/24/60))/24/60- Specified by:
createTimeIsNotNow
in interfaceISqlStyle
-
createTimeIsInMinutes
Description copied from interface:ISqlStyle
P.NAME timeIsInMinutes :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >=((TO_CHAR(SYSDATE,'HH24')*60) + TO_CHAR(SYSDATE,'MI')+( :firstBind /24/60))/24/60 AND attribute <((TO_CHAR(SYSDATE,'HH24')*60)+TO_CHAR(SYSDATE,'MI')+(( :firstBind +1)/24/60))/24/60
- Specified by:
createTimeIsInMinutes
in interfaceISqlStyle
-
createTimeIsInHours
Description copied from interface:ISqlStyle
P.NAME timeIsInHours :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >=((TO_CHAR(SYSDATE,'HH24')*60) + TO_CHAR(SYSDATE,'MI')+( :firstBind /24))/24/60 AND attribute <((TO_CHAR(SYSDATE,'HH24')*60)+TO_CHAR(SYSDATE,'MI')+( :firstBind /24)+(1/24/60))/24/60
- Specified by:
createTimeIsInHours
in interfaceISqlStyle
-
createTimeIsInLEMinutes
Description copied from interface:ISqlStyle
P.NAME timeIsInLEMinutes :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute <((TO_CHAR(SYSDATE,'HH24')*60) + TO_CHAR(SYSDATE,'MI')+(( :firstBind +1)/24/60))/24/60
- Specified by:
createTimeIsInLEMinutes
in interfaceISqlStyle
-
createTimeIsInLEHours
Description copied from interface:ISqlStyle
P.NAME timeIsInLEHours :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute <((TO_CHAR(SYSDATE,'HH24')*60) + TO_CHAR(SYSDATE,'MI')+( :firstBind /24)+(1/24/60))/24/60
- Specified by:
createTimeIsInLEHours
in interfaceISqlStyle
-
createTimeIsInGEMinutes
Description copied from interface:ISqlStyle
P.NAME timeIsInGEMinutes :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >=((TO_CHAR(SYSDATE,'HH24')*60) + TO_CHAR(SYSDATE,'MI')+( :firstBind /24/60))/24/60
- Specified by:
createTimeIsInGEMinutes
in interfaceISqlStyle
-
createTimeIsInGEHours
Description copied from interface:ISqlStyle
P.NAME timeIsInGEHours :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >=((TO_CHAR(SYSDATE,'HH24')*60) + TO_CHAR(SYSDATE,'MI')+( :firstBind /24))/24/60
- Specified by:
createTimeIsInGEHours
in interfaceISqlStyle
-
createEQ
Description copied from interface:ISqlStyle
P.NAME = :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)for dates use
ISqlStyle.createDateEQ(String, String)
andISqlStyle.createDateTimeEQ(String, String)
In an Oracle implementation this could be represented as
attribute = :firstBind
-
createDateEQ
Description copied from interface:ISqlStyle
P.EVT_CREATED= :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute = TRUNC( :firstBind )
- Specified by:
createDateEQ
in interfaceISqlStyle
-
createDateTimeEQ
Description copied from interface:ISqlStyle
P.EVT_CREATED = :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute = TRUNC( :firstBind ,'MI')
- Specified by:
createDateTimeEQ
in interfaceISqlStyle
-
createGE
Description copied from interface:ISqlStyle
P.NAME >= :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)for dates use
ISqlStyle.createDateGE(String, String)
andISqlStyle.createDateTimeGE(String, String)
In an Oracle implementation this could be represented as
attribute >= :firstBind
-
createDateGE
Description copied from interface:ISqlStyle
P.EVT_CREATED >= :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >= TRUNC( :firstBind )
- Specified by:
createDateGE
in interfaceISqlStyle
-
createDateTimeGE
Description copied from interface:ISqlStyle
P.EVT_CREATED >= :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute >= TRUNC( :firstBind ,'MI')
- Specified by:
createDateTimeGE
in interfaceISqlStyle
-
createGT
Description copied from interface:ISqlStyle
P.NAME > :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)for dates use
ISqlStyle.createDateGT(String, String)
andISqlStyle.createDateTimeGT(String, String)
In an Oracle implementation this could be represented as
attribute > :firstBind
-
createDateGT
Description copied from interface:ISqlStyle
P.EVT_CREATED > :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute > TRUNC( :firstBind )
- Specified by:
createDateGT
in interfaceISqlStyle
-
createDateTimeGT
Description copied from interface:ISqlStyle
P.EVT_CREATED > :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute > TRUNC( :firstBind ,'MI')
- Specified by:
createDateTimeGT
in interfaceISqlStyle
-
createLE
Description copied from interface:ISqlStyle
P.NAME <= :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)for dates use
ISqlStyle.createDateLE(String, String)
andISqlStyle.createDateTimeLE(String, String)
In an Oracle implementation this could be represented as
attribute <= :firstBind
-
createDateLE
Description copied from interface:ISqlStyle
P.EVT_CREATED <= :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute <= (TRUNC( :firstBind )+(86399/86400))
- Specified by:
createDateLE
in interfaceISqlStyle
-
createDateTimeLE
Description copied from interface:ISqlStyle
P.EVT_CREATED <= :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute <= (TRUNC( :firstBind ,'MI')+(59/1440))
- Specified by:
createDateTimeLE
in interfaceISqlStyle
-
createLT
Description copied from interface:ISqlStyle
P.NAME < :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)for dates use
ISqlStyle.createDateLT(String, String)
andISqlStyle.createDateTimeLT(String, String)
In an Oracle implementation this could be represented as
attribute < :firstBind
-
createDateLT
Description copied from interface:ISqlStyle
P.EVT_CREATED < :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute < TRUNC( :firstBind )
- Specified by:
createDateLT
in interfaceISqlStyle
-
createDateTimeLT
Description copied from interface:ISqlStyle
P.EVT_CREATED < :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute < TRUNC( :firstBind ,'MI')
- Specified by:
createDateTimeLT
in interfaceISqlStyle
-
createNEQ
Description copied from interface:ISqlStyle
P.NAME <> :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)for dates use
ISqlStyle.createDateNEQ(String, String)
andISqlStyle.createDateTimeNEQ(String, String)
In an Oracle implementation this could be represented as
attribute <> :firstBind
-
createDateNEQ
Description copied from interface:ISqlStyle
P.EVT_CREATED<> :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute <> TRUNC( :firstBind )
- Specified by:
createDateNEQ
in interfaceISqlStyle
-
createDateTimeNEQ
Description copied from interface:ISqlStyle
P.EVT_CREATED <> :bindName
(or "&text
" for non-binds, see alsoISqlStyle.PLAIN_BIND_MARKER_PREFIX
)In an Oracle implementation this could be represented as
attribute <> TRUNC( :firstBind ,'MI')
- Specified by:
createDateTimeNEQ
in interfaceISqlStyle
-
getMaxListSize
protected abstract int getMaxListSize() -
createInList
Description copied from interface:ISqlStyle
- Specified by:
createInList
in interfaceISqlStyle
-
createInList
Description copied from interface:ISqlStyle
- Specified by:
createInList
in interfaceISqlStyle
-
createNotInList
Description copied from interface:ISqlStyle
- Specified by:
createNotInList
in interfaceISqlStyle
-
createNotInList
Description copied from interface:ISqlStyle
- Specified by:
createNotInList
in interfaceISqlStyle
-
isCreatingInListGeneratingBind
Description copied from interface:ISqlStyle
Style can handle arrays as bind or as literal replacement.- Specified by:
isCreatingInListGeneratingBind
in interfaceISqlStyle
- Returns:
- true if calls to
ISqlStyle.createInList(String, Object)
orISqlStyle.createNotInList(String, Object)
produce SQL binds.
-
getSysdateToken
Description copied from interface:ISqlStyle
expression for the current date using the database specific keyword,SYSDATE
on oracle- Specified by:
getSysdateToken
in interfaceISqlStyle
-
getLowerToken
Description copied from interface:ISqlStyle
expression for lower case text using the database specific keyword,LOWER
on oracle- Specified by:
getLowerToken
in interfaceISqlStyle
-
getUpperToken
Description copied from interface:ISqlStyle
expression for upper case text using the database specific keyword,UPPER
on oracle- Specified by:
getUpperToken
in interfaceISqlStyle
-
getTrimToken
Description copied from interface:ISqlStyle
expression for trimmed text using the database specific keyword,TRIM
on oracle- Specified by:
getTrimToken
in interfaceISqlStyle
-
getNvlToken
Description copied from interface:ISqlStyle
expression for null-value/default-value using the database specific keyword,NVL
on oracle- Specified by:
getNvlToken
in interfaceISqlStyle
-
toArray
-
adaptBindName
-
adaptBindNameTimeDateOp
-
commit
public void commit() -
rollback
public void rollback() -
getConfiguredDecimalConversionStrategy
Gets the strategy to convert a decimal / numeric DB type into a data type in Java.DecimalConversion.NONE
means that nothing is converted.DecimalConversion.LEGACY
means that the old implementation (prior to Scout 3.10.0-M2) will be used: Numeric / decimal types without a scale are converted tojava.lang.Long
, with a scale they are converted tojava.lang.Double
. By defaultDecimalConversion.NONE
will be returned.- Returns:
- strategy for the decimal conversion
- Since:
- 3.10.0-M2
-