org.jaffa.persistence.engines.jdbcengine.querygenerator
Class StatementHelper

java.lang.Object
  extended byorg.jaffa.persistence.engines.jdbcengine.querygenerator.StatementHelper

public class StatementHelper
extends Object

This class has functions to return SQL Strings used in Statements.


Constructor Summary
StatementHelper()
           
 
Method Summary
static String getDeleteStatementString(IPersistent object, String engineType)
          Returns a SQL String for use in Statements for deleting records from the table corresponding to the input Persistent object.
static String getInsertStatementString(IPersistent object, String engineType)
          Returns a SQL String for use in Statements for inserting records into the table corresponding to the input Persistent object.
static String getLockStatementString(IPersistent object, String engineType)
          Returns a SQL String for use in Statements for locking records in the table corresponding to the input Persistent object.
static String getUpdateStatementString(IPersistent object, String engineType)
          Returns a SQL String for use in Statements for updating records in the table corresponding to the input Persistent object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatementHelper

public StatementHelper()
Method Detail

getInsertStatementString

public static String getInsertStatementString(IPersistent object,
                                              String engineType)
                                       throws IllegalAccessException,
                                              InvocationTargetException,
                                              IOException
Returns a SQL String for use in Statements for inserting records into the table corresponding to the input Persistent object.

Parameters:
object - The object to be inserted.
engineType - The engine type as defined in init.xml
Returns:
a SQL String for use in Statements for inserting records.
Throws:
IllegalAccessException - if the accessor Method for an attribute enforces Java language access control and the underlying method is inaccessible.
InvocationTargetException - if the accessor method for an attribute throws an exception.
IOException - if any error occurs while extracting the value for an attribute.

getUpdateStatementString

public static String getUpdateStatementString(IPersistent object,
                                              String engineType)
                                       throws IllegalAccessException,
                                              InvocationTargetException,
                                              IOException
Returns a SQL String for use in Statements for updating records in the table corresponding to the input Persistent object.

Parameters:
object - The object to be updated.
engineType - The engine type as defined in init.xml
Returns:
a SQL String for use in Statements for updating records.
Throws:
IllegalAccessException - if the accessor Method for an attribute enforces Java language access control and the underlying method is inaccessible.
InvocationTargetException - if the accessor method for an attribute throws an exception.
IOException - if any error occurs while extracting the value for an attribute.

getDeleteStatementString

public static String getDeleteStatementString(IPersistent object,
                                              String engineType)
                                       throws IllegalAccessException,
                                              InvocationTargetException,
                                              IOException
Returns a SQL String for use in Statements for deleting records from the table corresponding to the input Persistent object.

Parameters:
object - The object to be deleted.
engineType - The engine type as defined in init.xml
Returns:
a SQL String for use in Statements for deleting records.
Throws:
IllegalAccessException - if the accessor Method for an attribute enforces Java language access control and the underlying method is inaccessible.
InvocationTargetException - if the accessor method for an attribute throws an exception.
IOException - if any error occurs while extracting the value for an attribute.

getLockStatementString

public static String getLockStatementString(IPersistent object,
                                            String engineType)
                                     throws IllegalAccessException,
                                            InvocationTargetException,
                                            IOException
Returns a SQL String for use in Statements for locking records in the table corresponding to the input Persistent object.

Parameters:
object - The object to be locked.
engineType - The engine type as defined in init.xml
Returns:
a SQL String for use in Statements for locking records.
Throws:
IllegalAccessException - if the accessor Method for an attribute enforces Java language access control and the underlying method is inaccessible.
InvocationTargetException - if the accessor method for an attribute throws an exception.
IOException - if any error occurs while extracting the value for an attribute.


Copyright © 2002-2004 JAFFA Project.