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)
           
JdbcStatement(java.sql.PreparedStatement ps)
           
 
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(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()
           
 java.sql.ResultSet executeQuery()
           
 int executeUpdate()
          Run INSERT, UPDATE or DELETE.
 java.lang.String getAssignedValues()
          Return values in format: [1, "ABC", 2.55]
protected  void logValue(OrmUjo bo, UjoProperty property)
          Log a value value into a text format.
protected  void logValue(java.lang.String textValue, 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)
              throws java.sql.SQLException
Throws:
java.sql.SQLException

JdbcStatement

public JdbcStatement(java.sql.PreparedStatement ps)
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

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

logValue

protected void logValue(OrmUjo 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 © 2009. All Rights Reserved.