org.midao.jdbc.core.handlers.utils
Class CallableUtils

java.lang.Object
  extended by org.midao.jdbc.core.handlers.utils.CallableUtils

public class CallableUtils
extends java.lang.Object

Collection of utilities used during Stored Procedure/Function call


Constructor Summary
CallableUtils()
           
 
Method Summary
static java.lang.String getStoredProcedureFullName(java.lang.String decodedSql)
          Returns full function name.
static java.lang.String getStoredProcedureShortNameFromSql(java.lang.String decodedSql)
          Returns short function name.
static boolean isFunctionCall(java.lang.String decodedSql)
          Checks if SQL String represents function call
static QueryParameters updateDirections(QueryParameters original, QueryParameters source)
          Clones @original and updates it's direction - taken from @source.
static QueryParameters updateDirectionsByName(QueryParameters original, QueryParameters source)
          Same as @updateDirections but updates based not on position but on key
static QueryParameters updateTypes(QueryParameters original, QueryParameters source)
          Clones @original and updates it's types - taken from @source.
static QueryParameters updateTypesByName(QueryParameters original, QueryParameters source)
          Same as @updateTypes but updates based not on position but on key
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallableUtils

public CallableUtils()
Method Detail

isFunctionCall

public static boolean isFunctionCall(java.lang.String decodedSql)
Checks if SQL String represents function call

Parameters:
decodedSql - SQL String which would be checked
Returns:
true/false

getStoredProcedureShortNameFromSql

public static java.lang.String getStoredProcedureShortNameFromSql(java.lang.String decodedSql)
Returns short function name. Example: schema.package.name - "name" would be returned

Parameters:
decodedSql - SQL String which would be processed
Returns:
procedure name

getStoredProcedureFullName

public static java.lang.String getStoredProcedureFullName(java.lang.String decodedSql)
Returns full function name. Example: call schema.package.name - "schema.package.name" would be returned

Parameters:
decodedSql - SQL String which would be processed
Returns:
full procedure name

updateDirections

public static QueryParameters updateDirections(QueryParameters original,
                                               QueryParameters source)
Clones @original and updates it's direction - taken from @source.

Parameters:
original - QueryParameters which would be updated
source - QueryParameters directions of which would be read
Returns:
updated clone on @original with updated directions

updateTypes

public static QueryParameters updateTypes(QueryParameters original,
                                          QueryParameters source)
Clones @original and updates it's types - taken from @source.

Parameters:
original - QueryParameters which would be updated
source - QueryParameters types of which would be read
Returns:
updated clone on @original with updated types

updateDirectionsByName

public static QueryParameters updateDirectionsByName(QueryParameters original,
                                                     QueryParameters source)
Same as @updateDirections but updates based not on position but on key

Parameters:
original - QueryParameters which would be updated
source - QueryParameters directions of which would be read
Returns:
updated clone on @original with updated directions

updateTypesByName

public static QueryParameters updateTypesByName(QueryParameters original,
                                                QueryParameters source)
Same as @updateTypes but updates based not on position but on key

Parameters:
original - QueryParameters which would be updated
source - QueryParameters types of which would be read
Returns:
updated clone on @original with updated types


Copyright © 2013. All Rights Reserved.