Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jdbf.engine.sql
Class DeleteStatement  view DeleteStatement download DeleteStatement.java

java.lang.Object
  extended byorg.jdbf.engine.sql.SQLStatement
      extended byorg.jdbf.engine.sql.DeleteStatement

public class DeleteStatement
extends SQLStatement

DeleteStatement is that class that represents the delete sql statement. DeleteStatement handles the creation of sql statement with the informations specified in a RepositoryView object and provides to execute the delete statement.


Field Summary
protected static java.lang.String DELETE
          DELETE statement
 
Fields inherited from class org.jdbf.engine.sql.SQLStatement
className, CLOSE_BRACE, criteria, OPEN_BRACE, statement, WHERE
 
Constructor Summary
DeleteStatement()
          Creates the empty object
DeleteStatement(org.jdbf.engine.repository.RepositoryView repository)
          Create the object and build the delete statement.
DeleteStatement(org.jdbf.engine.repository.RepositoryView repository, org.jdbf.engine.criteria.Criteria criteria)
          Create the object and build the delete statement.
 
Method Summary
 java.lang.String buildStatement(org.jdbf.engine.repository.RepositoryView repository, java.lang.String[] propertiesNames)
          Builds the delete statement with the informations passed by repository.
 java.lang.String buildStatementForCriteria(org.jdbf.engine.repository.RepositoryView repository, java.lang.String[] propertiesNames)
          Builds the delete statement with criteria.
 int delete(java.sql.Connection con)
          Executes the delete statement and delete in database with the specific criteria.
 int delete(org.jdbf.engine.basic.ObjectMapped obj, org.jdbf.engine.repository.RepositoryView view, java.sql.Connection con)
          Executes the delete statement and delete in database the ObjectMapped object specified in obj.
 
Methods inherited from class org.jdbf.engine.sql.SQLStatement
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DELETE

protected static final java.lang.String DELETE
DELETE statement

Constructor Detail

DeleteStatement

public DeleteStatement(org.jdbf.engine.repository.RepositoryView repository)
Create the object and build the delete statement.


DeleteStatement

public DeleteStatement(org.jdbf.engine.repository.RepositoryView repository,
                       org.jdbf.engine.criteria.Criteria criteria)
Create the object and build the delete statement.


DeleteStatement

public DeleteStatement()
Creates the empty object

Method Detail

buildStatement

public java.lang.String buildStatement(org.jdbf.engine.repository.RepositoryView repository,
                                       java.lang.String[] propertiesNames)
Builds the delete statement with the informations passed by repository. These informations are:
  • tableName;
  • columnTableName

    Specified by:
    buildStatement in class SQLStatement

  • buildStatementForCriteria

    public java.lang.String buildStatementForCriteria(org.jdbf.engine.repository.RepositoryView repository,
                                                      java.lang.String[] propertiesNames)
    Builds the delete statement with criteria.

    Specified by:
    buildStatementForCriteria in class SQLStatement

    delete

    public int delete(org.jdbf.engine.basic.ObjectMapped obj,
                      org.jdbf.engine.repository.RepositoryView view,
                      java.sql.Connection con)
               throws java.sql.SQLException,
                      org.jdbf.engine.mapping.MappingException
    Executes the delete statement and delete in database the ObjectMapped object specified in obj.


    delete

    public int delete(java.sql.Connection con)
               throws java.sql.SQLException
    Executes the delete statement and delete in database with the specific criteria.