org.ujorm.orm
Class JdbcStatement

java.lang.Object
  extended by org.ujorm.orm.JdbcStatement

public class JdbcStatement
extends Object

JdbcStatement


Constructor Summary
JdbcStatement(Connection conn, CharSequence sql, OrmHandler handler)
           
JdbcStatement(PreparedStatement ps, OrmHandler handler)
           
 
Method Summary
 void assignExtendedValues(Query query)
          Assign extended values into the prepared statement
 void assignValue(MetaColumn column, Object value, OrmUjo bo)
          Add a next value to a SQL prepared statement.
 void assignValue(OrmUjo table, MetaColumn column)
          Add a next value to a SQL prepared statement.
 void assignValues(CriterionDecoder decoder)
          Assign values into the prepared statement
 void assignValues(DbProcedure bo)
          Assign procedure parameters
 void assignValues(List<? extends OrmUjo> bos, int idxFrom, int idxTo)
          Assign values into the prepared statement
 void assignValues(OrmUjo bo)
          Assign values into the prepared statement
 void assignValues(OrmUjo table, List<MetaColumn> columns)
          Assign values into the prepared statement
 void assignValues(Query query)
          Assign values into the prepared statement
 void close()
          Close the session
 void execute()
          Call the procedure.
 ResultSet executeQuery()
           
 int executeUpdate()
          Run INSERT, UPDATE or DELETE.
 String getAssignedValues()
          Return values in format: [1, "ABC", 2.55]
 void loadValues(DbProcedure bo)
          Assign procedure parameters
protected  void logValue(String textValue, Key key)
          Log a value value into a text format.
protected  void logValue(Ujo bo, Key key)
          Log a value value into a text format.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JdbcStatement

public JdbcStatement(Connection conn,
                     CharSequence sql,
                     OrmHandler handler)
              throws SQLException
Throws:
SQLException

JdbcStatement

public JdbcStatement(PreparedStatement ps,
                     OrmHandler handler)
Method Detail

getAssignedValues

public String getAssignedValues()
Return values in format: [1, "ABC", 2.55]


close

public void close()
           throws SQLException
Close the session

Throws:
SQLException

execute

public void execute()
             throws SQLException
Call the procedure.

Throws:
SQLException

executeUpdate

public int executeUpdate()
                  throws SQLException
Run INSERT, UPDATE or DELETE.

Returns:
The row count for SQL Data Manipulation Language (DML) statements
Throws:
SQLException

executeQuery

public ResultSet executeQuery()
                       throws SQLException
Throws:
SQLException

assignValues

public void assignValues(OrmUjo bo)
                  throws SQLException
Assign values into the prepared statement

Throws:
SQLException

assignValues

public void assignValues(List<? extends OrmUjo> bos,
                         int idxFrom,
                         int idxTo)
                  throws SQLException
Assign values into the prepared statement

Throws:
SQLException

assignValues

public void assignValues(OrmUjo table,
                         List<MetaColumn> columns)
                  throws SQLException
Assign values into the prepared statement

Throws:
SQLException

assignValues

public final void assignValues(Query query)
                        throws SQLException
Assign values into the prepared statement

Throws:
SQLException

assignExtendedValues

public void assignExtendedValues(Query query)
                          throws SQLException
Assign extended values into the prepared statement

Throws:
SQLException

assignValues

public void assignValues(CriterionDecoder decoder)
                  throws SQLException
Assign values into the prepared statement

Throws:
SQLException

assignValue

public void assignValue(OrmUjo table,
                        MetaColumn column)
                 throws SQLException
Add a next value to a SQL prepared statement.

Throws:
SQLException

assignValue

public void assignValue(MetaColumn column,
                        Object value,
                        OrmUjo bo)
                 throws SQLException
Add a next value to a SQL prepared statement.

Throws:
SQLException

assignValues

public void assignValues(DbProcedure bo)
Assign procedure parameters


loadValues

public void loadValues(DbProcedure bo)
Assign procedure parameters


logValue

protected void logValue(Ujo bo,
                        Key key)
Log a value value into a text format.


logValue

protected void logValue(String textValue,
                        Key key)
Log a value value into a text format.


toString

public String toString()
Overrides:
toString in class Object


Copyright 2013, Pavel Ponec