GetByKey

Gets a row specified by the primary key(s).

root@turing:/examples/dbo# java examples.dbo.Test -conf postgres.cnf -test examples.dbo.Getbykey -uid 2

INFO     New log level set to: LogLevel [3,INFO]
INFO     fc.util.FilePropertyMgrLoaded properties from file: postgres.cnf
>>> Retrieved from the database
Class Name: [mollytest] [isDiscarded=false] [isNew=false] [isModified=false]
Note: IsNullInDB only meaningful for existing rows (i.e., isNew=false)
 PK FK Field      Value           isModified isNullinDB isSerial/AutoInc 
 x  -  uid        2               -          -          x
 -  -  name       Lupus Yonderboy -          -          -                
 -  -  email      lup@moderns.net -          -          -                
 -  -  password   chaos           -          -          -                
 -  -  created_on 2007-04-10      -          -          -                
 -  -  is_active  true            -          -          -                

JVM shutdown: fc.io.Log - closing all logs...

test=# select * from mollytest where uid = 2;
 uid |      name       |      email      | password | created_on | is_active 
-----+-----------------+-----------------+----------+------------+-----------
   2 | Lupus Yonderboy | lup@moderns.net | chaos    | 2007-04-10 | t
(1 row)
root@turing:/examples/dbo# java examples.dbo.Test -conf mysql.cnf -test examples.dbo.Getbykey -uid 2

INFO     New log level set to: LogLevel [3,INFO]
INFO     fc.util.FilePropertyMgrLoaded properties from file: mysql.cnf
>>> Retrieved from the database
Class Name: [mollytest] [isDiscarded=false] [isNew=false] [isModified=false]
Note: IsNullInDB only meaningful for existing rows (i.e., isNew=false)
 PK FK Field      Value           isModified isNullinDB isSerial/AutoInc 
 x  -  uid        2               -          -          x 
 -  -  name       Lupus Yonderboy -          -          -                
 -  -  email      lup@moderns.net -          -          -                
 -  -  password   chaos           -          -          -                
 -  -  created_on 2007-04-08      -          -          -                
 -  -  is_active  true            -          -          -                

JVM shutdown: fc.io.Log - closing all logs...

mysql> select * from mollytest where uid = 2;
+-----+-----------------+-----------------+----------+------------+-----------+
| uid | name            | email           | password | created_on | is_active |
+-----+-----------------+-----------------+----------+------------+-----------+
|   2 | Lupus Yonderboy | lup@moderns.net | chaos    | 2007-04-08 |         1 | 
+-----+-----------------+-----------------+----------+------------+-----------+
1 row in set (0.00 sec)