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

Quick Search    Search Deep

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

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

public class InsertStatement
extends SQLStatement

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


Field Summary
protected static java.lang.String INSERT
          INSERT statement
protected static java.lang.String VALUES
          VALUES statement
 
Fields inherited from class org.jdbf.engine.sql.SQLStatement
className, CLOSE_BRACE, criteria, OPEN_BRACE, statement, WHERE
 
Constructor Summary
InsertStatement()
          Creates the empty object
InsertStatement(org.jdbf.engine.repository.RepositoryView repository)
          Create the object and build the insert statement.
 
Method Summary
 java.lang.String buildStatement(org.jdbf.engine.repository.RepositoryView repository, java.lang.String[] propertiesNames)
          Builds the insert statement with the informations passed by repository.
 java.lang.String buildStatementForCriteria(org.jdbf.engine.repository.RepositoryView repository, java.lang.String[] propertiesNames)
          Not implemented
 int insert(org.jdbf.engine.basic.ObjectMapped obj, org.jdbf.engine.repository.RepositoryView view, java.sql.Connection connection)
          Executes the insert statement and store 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

INSERT

protected static final java.lang.String INSERT
INSERT statement

See Also:
Constant Field Values

VALUES

protected static final java.lang.String VALUES
VALUES statement

See Also:
Constant Field Values
Constructor Detail

InsertStatement

public InsertStatement(org.jdbf.engine.repository.RepositoryView repository)
Create the object and build the insert statement.


InsertStatement

public InsertStatement()
Creates the empty object

Method Detail

buildStatement

public java.lang.String buildStatement(org.jdbf.engine.repository.RepositoryView repository,
                                       java.lang.String[] propertiesNames)
Builds the insert 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)
    Not implemented

    Specified by:
    buildStatementForCriteria in class SQLStatement

    insert

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