uk.co.kimble.cobra
Class SQLDeleteStatement

java.lang.Object
  |
  +--uk.co.kimble.cobra.SQLStatement
        |
        +--uk.co.kimble.cobra.SQLDeleteStatement

public class SQLDeleteStatement
extends SQLStatement

Constructs delete statements from primary key values in the object or from criteria


Fields inherited from class uk.co.kimble.cobra.SQLStatement
class_dictionary, sql
 
Constructor Summary
SQLDeleteStatement(uk.co.kimble.cobra.ClassDictionary cd)
          Construct a basic SQL Delete string
 
Method Summary
 java.lang.String buildForCriteria(PersistentCriteria criteria)
          Build a delete statement based on some criteria.
 java.lang.String buildForObject()
          Build a delete statement for a single object, will use primary key(s)
 
Methods inherited from class uk.co.kimble.cobra.SQLStatement
asSQLClause, asSQLStatement, getClassDictionary, setKeyValues, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLDeleteStatement

public SQLDeleteStatement(uk.co.kimble.cobra.ClassDictionary cd)
                   throws PersistentException
Construct a basic SQL Delete string
Parameters:
cd - Class Dictionary for class
Throws:
PersistentException - - from super class
Method Detail

buildForCriteria

public java.lang.String buildForCriteria(PersistentCriteria criteria)
Build a delete statement based on some criteria. Will delete a set of objects
Parameters:
criteria - Set of criteria to restrict delete
Overrides:
buildForCriteria in class SQLStatement

buildForObject

public java.lang.String buildForObject()
                                throws PersistentException
Build a delete statement for a single object, will use primary key(s)
Throws:
PersistentException - if there are no primary key(s)
Overrides:
buildForObject in class SQLStatement