Ignore:
Timestamp:
Jan 2, 2011, 8:51:21 PM (14 years ago)
Author:
fmguler
Message:

Refs #3 - Ven.save() is transferred to the new package. Save use case is completed. Convert.toDB() converts camel case object names to database names with underscores. Unchecked VenException is thrown by Ven methods. Liquibase changelog (test-db-changelog.xml) is changed to include only a simple object to test save operation. It creates a sample database table and inserts a sample row. On rollback it removes sample data. Using liquibase, Sample.java builds database, tests save operation and rolls back.

QueryGenerator generates insert and update queries for save and generates sequence query to assign ids to new objects. Ven calls query generator and runs the query using spring jdbc template.

Old codebase updated to run at Java 1.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/fmgVen/test/com/fmguler/ven/sample/Sample.java

    r25 r26  
    4040    public static void main(String[] args) { 
    4141        buildDatabase(); 
    42         testGet(); 
    43         //rollbackDatabase(); 
     42        testSave(); 
     43        rollbackDatabase(); 
    4444    } 
    4545 
     
    139139            Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(getDataSource().getConnection()); 
    140140            Liquibase liquibase = new Liquibase("etc/test-db/test-db-changelog.xml", new FileSystemFileOpener(), database); 
    141             //liquibase.rollback(51, ""); 
    142             liquibase.rollback("0", ""); 
     141            liquibase.rollback("tag-single-table", ""); 
    143142            Locale.setDefault(currLocale); 
    144143        } catch (SQLException ex) { 
Note: See TracChangeset for help on using the changeset viewer.