org.agileclick.genorm.runtime
Interface GenOrmConnection

All Known Implementing Classes:
GenOrmDudConnection, GenOrmGroupedConnection, GenOrmTransactionConnection

public interface GenOrmConnection


Method Summary
 boolean addToTransaction(GenOrmRecord goi)
          Returns true if the record was added to a transaction returns false if there is no transaction
 void close()
           
 void commit()
           
 java.sql.Statement createStatement()
           
 void flush()
          Flush all modified records that are part of the current transaction
 GenOrmRecord getCachedRecord(GenOrmRecordKey key)
          Returns the cached record if it exists, null otherwise
 java.sql.Connection getConnection()
           
 GenOrmKeyGenerator getKeyGenerator(java.lang.String table)
           
 java.lang.Object getProperty(java.lang.String name)
          Gets a property set on this connection
 GenOrmRecord getUniqueRecord(GenOrmRecord rec)
          Returns a unique record instance for this transaction.
 boolean isCommitted()
           
 java.sql.PreparedStatement prepareStatement(java.lang.String sql)
           
 void rollback()
           
 void setProperty(java.lang.String name, java.lang.Object value)
          Sets a property to be associated with this connection
 

Method Detail

setProperty

void setProperty(java.lang.String name,
                 java.lang.Object value)
Sets a property to be associated with this connection


getProperty

java.lang.Object getProperty(java.lang.String name)
Gets a property set on this connection


getUniqueRecord

GenOrmRecord getUniqueRecord(GenOrmRecord rec)
Returns a unique record instance for this transaction. If the record is in the cache it returns the cached record otherwise the record is added to the cache and returned


getCachedRecord

GenOrmRecord getCachedRecord(GenOrmRecordKey key)
Returns the cached record if it exists, null otherwise


flush

void flush()
Flush all modified records that are part of the current transaction


commit

void commit()

isCommitted

boolean isCommitted()

close

void close()

rollback

void rollback()

getConnection

java.sql.Connection getConnection()

getKeyGenerator

GenOrmKeyGenerator getKeyGenerator(java.lang.String table)

addToTransaction

boolean addToTransaction(GenOrmRecord goi)
Returns true if the record was added to a transaction returns false if there is no transaction


createStatement

java.sql.Statement createStatement()
                                   throws java.sql.SQLException
Throws:
java.sql.SQLException

prepareStatement

java.sql.PreparedStatement prepareStatement(java.lang.String sql)
                                            throws java.sql.SQLException
Throws:
java.sql.SQLException