com.konakart.bl
Class KKRecord

java.lang.Object
  extended by com.konakart.bl.KKRecord

public class KKRecord
extends java.lang.Object

A utility class used to enable KonaKart to work with different databases


Field Summary
static java.lang.String DB2
          Torque adapter for DB2
static java.lang.String MSSQL
          Torque adapter for MSSQL
static java.lang.String MYSQL
          Torque adapter for MySQL
static java.lang.String ORACLE
          Torque adapter for Oracle
static java.lang.String POSTGRESQL
          Torque adapter for PostgreSQL
 
Constructor Summary
KKRecord(com.workingdogs.village.Record villageRecord)
          Constructor
 
Method Summary
static java.lang.String getDbType()
           
static java.lang.String getDbTypeString()
           
static java.lang.String getTimeNowString()
          Get the String that's used to set the current dateTime in the current database
 com.workingdogs.village.Value getValue(int columnIdx)
          Pick out the value by column Index
 com.workingdogs.village.Record getVillageRecord()
           
static boolean isCaseSensitiveDB()
           
static boolean isDB2()
           
static boolean isMSSqlServer()
           
static boolean isMySQL()
           
static boolean isOracle()
           
static boolean isPostgreSQL()
           
static void setDbType(java.lang.String dbType)
          Set the type of DB being used (i.e.
 void setVillageRecord(com.workingdogs.village.Record villageRecord)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POSTGRESQL

public static final java.lang.String POSTGRESQL
Torque adapter for PostgreSQL

See Also:
Constant Field Values

ORACLE

public static final java.lang.String ORACLE
Torque adapter for Oracle

See Also:
Constant Field Values

DB2

public static final java.lang.String DB2
Torque adapter for DB2

See Also:
Constant Field Values

MSSQL

public static final java.lang.String MSSQL
Torque adapter for MSSQL

See Also:
Constant Field Values

MYSQL

public static final java.lang.String MYSQL
Torque adapter for MySQL

See Also:
Constant Field Values
Constructor Detail

KKRecord

public KKRecord(com.workingdogs.village.Record villageRecord)
Constructor

Parameters:
villageRecord -
Method Detail

getValue

public com.workingdogs.village.Value getValue(int columnIdx)
                                       throws com.workingdogs.village.DataSetException
Pick out the value by column Index

Parameters:
columnIdx -
Returns:
Returns a com.workingdogs.village.Value
Throws:
com.workingdogs.village.DataSetException

getVillageRecord

public com.workingdogs.village.Record getVillageRecord()
Returns:
Return the village record

setVillageRecord

public void setVillageRecord(com.workingdogs.village.Record villageRecord)
Parameters:
villageRecord -

getTimeNowString

public static java.lang.String getTimeNowString()
Get the String that's used to set the current dateTime in the current database

Returns:
Either "now()" for MySQL, "sysdate" for Oracle and so on for the respective databases.

setDbType

public static void setDbType(java.lang.String dbType)
Set the type of DB being used (i.e. MySQL, PostgreSQL etc.)

Parameters:
dbType -

getDbType

public static java.lang.String getDbType()
Returns:
Returns the dbType.

getDbTypeString

public static java.lang.String getDbTypeString()
Returns:
Returns the dbType as a friendly String.

isMSSqlServer

public static boolean isMSSqlServer()
Returns:
Returns true it the database being used is MS SQL Server

isMySQL

public static boolean isMySQL()
Returns:
Returns true it the database being used is MySQL

isDB2

public static boolean isDB2()
Returns:
Returns true it the database being used is DB2

isPostgreSQL

public static boolean isPostgreSQL()
Returns:
Returns true it the database being used is PostgreSQL

isOracle

public static boolean isOracle()
Returns:
Returns true it the database being used is Oracle

isCaseSensitiveDB

public static boolean isCaseSensitiveDB()
Returns:
Returns true it the database being used is a case sensitive DB by default


Copyright © 2011 DS Data Systems UK Ltd.