Change schema definition mechanism, to simplify references to table columns in SQL...
[cfb.git] / prod / net / jaekl / cfb / store / DbStore.java
index 2238568c001bec9d9207419eb36806055a8d0abd..6e17cffef5605c5a358fcfeb01d70e9c73c7011e 100644 (file)
@@ -115,25 +115,13 @@ public class DbStore {
        
        Long findLocId(Location loc) throws SQLException, TypeMismatchException
        {
-               Column[] columns = { CfbSchema.LOCATIONS.getColumn(CfbSchema.LOCID) };
+               Column[] columns = { CfbSchema.LOCID };
                Table[] tables = { CfbSchema.LOCATIONS };
                Condition[] conditions = { 
-                                               new Condition( CfbSchema.LOCATIONS.getColumn(CfbSchema.CLASSNAME),
-                                                              loc.getClassName(),
-                                                              Operation.EQUAL 
-                                                            ),
-                                               new Condition( CfbSchema.LOCATIONS.getColumn(CfbSchema.METHODNAME),
-                                                                      loc.getMethodName(),
-                                                                      Operation.EQUAL
-                                                                    ),
-                                               new Condition( CfbSchema.LOCATIONS.getColumn(CfbSchema.STARTLINE),
-                                                                      loc.getStart(),
-                                                                      Operation.EQUAL
-                                                                    ),
-                                               new Condition( CfbSchema.LOCATIONS.getColumn(CfbSchema.ENDLINE),
-                                                                      loc.getEnd(),
-                                                                      Operation.EQUAL
-                                                                    )
+                                               new Condition( CfbSchema.CLASSNAME,  loc.getClassName(),  Operation.EQUAL ),
+                                               new Condition( CfbSchema.METHODNAME, loc.getMethodName(), Operation.EQUAL ),
+                                               new Condition( CfbSchema.STARTLINE,  loc.getStart(),      Operation.EQUAL ),
+                                               new Condition( CfbSchema.ENDLINE,    loc.getEnd(),        Operation.EQUAL )
                                        };
                List<Row> rows = m_driver.select(m_con, columns, tables, conditions);
                if (rows.size() > 0) {