org.ujoframework.orm
Class JdbcStatement

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

public class JdbcStatement
extends java.lang.Object

JdbcStatement

Author:
Pavel Ponec

Constructor Summary
JdbcStatement(java.sql.Connection conn, java.lang.CharSequence sql, OrmHandler handler)
           
JdbcStatement(java.sql.PreparedStatement ps, OrmHandler handler)
           
 
Method Summary
 void assignValue(MetaColumn column, java.lang.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(OrmUjo bo)
          Assign values into the prepared statement
 void assignValues(OrmUjo table, java.util.List<MetaColumn> columns)
          Assign values into the prepared statement
 void close()
           
 void execute()
          Call the procedure.
 java.sql.ResultSet executeQuery()
           
 int executeUpdate()
          Run INSERT, UPDATE or DELETE.
 java.lang.String getAssignedValues()
          Return values in format: [1, "ABC", 2.55]
 void loadValues(DbProcedure bo)
          Assign procedure parameters
protected  void logValue(java.lang.String textValue, UjoProperty property)
          Log a value value into a text format.
protected  void logValue(Ujo bo, UjoProperty property)
          Log a value value into a text format.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JdbcStatement

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

JdbcStatement

public JdbcStatement(java.sql.PreparedStatement ps,
                     OrmHandler handler)
Method Detail

getAssignedValues

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


close

public void close()
           throws java.sql.SQLException
Throws:
java.sql.SQLException

execute

public void execute()
             throws java.sql.SQLException
Call the procedure.

Throws:
java.sql.SQLException

executeUpdate

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

Returns:
The count of modified rows.
Throws:
java.sql.SQLException

executeQuery

public java.sql.ResultSet executeQuery()
                                throws java.sql.SQLException
Throws:
java.sql.SQLException

assignValues

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

Throws:
java.sql.SQLException

assignValues

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

Throws:
java.sql.SQLException

assignValues

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

Throws:
java.sql.SQLException

assignValue

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

Throws:
java.sql.SQLException

assignValue

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

Throws:
java.sql.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,
                        UjoProperty property)
Log a value value into a text format.


logValue

protected void logValue(java.lang.String textValue,
                        UjoProperty property)
Log a value value into a text format.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010. All Rights Reserved.