Index: trunk/fmgVen/lib/nblibraries.properties
===================================================================
--- trunk/fmgVen/lib/nblibraries.properties	(revision 22)
+++ trunk/fmgVen/lib/nblibraries.properties	(revision 23)
@@ -5,2 +5,10 @@
 libs.CopyLibs.classpath=\
     ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
+libs.Test.classpath=\
+    ${base}/test/postgresql-8.4-701.jdbc3.jar
+libs.Ven.classpath=\
+    ${base}/ven/spring-beans.jar;\
+    ${base}/ven/spring-core.jar;\
+    ${base}/ven/spring-jdbc.jar;\
+    ${base}/ven/spring-tx.jar;\
+    ${base}/ven/commons-logging-1.1.1.jar
Index: trunk/fmgVen/nbproject/genfiles.properties
===================================================================
--- trunk/fmgVen/nbproject/genfiles.properties	(revision 22)
+++ trunk/fmgVen/nbproject/genfiles.properties	(revision 23)
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=d00ffa57
+build.xml.data.CRC32=6b84a8b1
 build.xml.script.CRC32=a9b2e5a3
 build.xml.stylesheet.CRC32=28e38971@1.38.1.45
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=d00ffa57
+nbproject/build-impl.xml.data.CRC32=6b84a8b1
 nbproject/build-impl.xml.script.CRC32=494c2ca4
 nbproject/build-impl.xml.stylesheet.CRC32=78c6a6ee@1.38.1.45
Index: trunk/fmgVen/nbproject/project.properties
===================================================================
--- trunk/fmgVen/nbproject/project.properties	(revision 22)
+++ trunk/fmgVen/nbproject/project.properties	(revision 23)
@@ -25,11 +25,10 @@
 endorsed.classpath=
 excludes=
-file.reference.spring.jar=lib/spring.jar
 includes=**
 jar.compress=false
 javac.classpath=\
-    ${file.reference.spring.jar}
+    ${libs.Ven.classpath}
 # Space-separated list of extra javac options
-javac.compilerargs=
+javac.compilerargs=-Xlint:deprecation
 javac.deprecation=false
 javac.processorpath=\
@@ -63,5 +62,6 @@
 run.test.classpath=\
     ${javac.test.classpath}:\
-    ${build.test.classes.dir}
+    ${build.test.classes.dir}:\
+    ${libs.Test.classpath}
 source.encoding=UTF-8
 src.dir=src
Index: trunk/fmgVen/nbproject/project.xml
===================================================================
--- trunk/fmgVen/nbproject/project.xml	(revision 22)
+++ trunk/fmgVen/nbproject/project.xml	(revision 23)
@@ -16,4 +16,8 @@
             <definitions>.\lib\nblibraries.properties</definitions>
         </libraries>
+        <spring-data xmlns="http://www.netbeans.org/ns/spring-data/1">
+            <config-files/>
+            <config-file-groups/>
+        </spring-data>
     </configuration>
 </project>
Index: trunk/fmgVen/src/com/fmguler/ven/QueryGenerator.java
===================================================================
--- trunk/fmgVen/src/com/fmguler/ven/QueryGenerator.java	(revision 23)
+++ trunk/fmgVen/src/com/fmguler/ven/QueryGenerator.java	(revision 23)
@@ -0,0 +1,50 @@
+/*
+ *  fmgVen - A Convention over Configuration Java ORM Tool
+ *  Copyright 2010 Fatih Mehmet Güler
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  under the License.
+ */
+package com.fmguler.ven;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Generates queries in the form of 'Convention over Configuration' of the specified class.
+ * @author Fatih Mehmet Güler
+ */
+public class QueryGenerator {
+    private Set domainPackages;
+
+    public QueryGenerator() {
+        domainPackages = new HashSet();
+    }
+
+    public String generateSelectQuery() {
+        return null;
+    }
+
+    public String generateCountQuery() {
+        return null;
+    }
+
+    public String generateUpdateQuery() {
+        return null;
+    }
+
+    //SETTERS-------------------------------------------------------------------
+    public void addDomainPackage(String domainPackage) {
+        domainPackages.add(domainPackage);
+    }
+}
Index: trunk/fmgVen/src/com/fmguler/ven/QueryMapper.java
===================================================================
--- trunk/fmgVen/src/com/fmguler/ven/QueryMapper.java	(revision 23)
+++ trunk/fmgVen/src/com/fmguler/ven/QueryMapper.java	(revision 23)
@@ -0,0 +1,44 @@
+/*
+ *  fmgVen - A Convention over Configuration Java ORM Tool
+ *  Copyright 2010 Fatih Mehmet Güler
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  under the License.
+ */
+package com.fmguler.ven;
+
+import java.util.List;
+import javax.sql.DataSource;
+import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
+
+/**
+ * Maps the result of the query generated in the form of 'Convention over Configuration' to the specified object.
+ * @author Fatih Mehmet Güler
+ */
+public class QueryMapper {
+    private NamedParameterJdbcTemplate template;
+
+    public List list() {
+        return null;
+    }
+
+    //SETTERS-------------------------------------------------------------------
+    public void setDataSource(DataSource dataSource) {
+        if (dataSource == null) throw new RuntimeException("fmgVen - DataSource cannot be null");
+        this.template = new NamedParameterJdbcTemplate(dataSource);
+    }
+
+    public void addDomainPackage(String domainPackage){
+
+    }
+}
Index: trunk/fmgVen/src/com/fmguler/ven/Ven.java
===================================================================
--- trunk/fmgVen/src/com/fmguler/ven/Ven.java	(revision 22)
+++ trunk/fmgVen/src/com/fmguler/ven/Ven.java	(revision 23)
@@ -18,4 +18,8 @@
 package com.fmguler.ven;
 
+import java.util.List;
+import javax.sql.DataSource;
+import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
+
 /**
  * The main class for data access
@@ -23,3 +27,41 @@
  */
 public class Ven {
+    private NamedParameterJdbcTemplate template;
+    private QueryGenerator generator;
+    private QueryMapper mapper;
+
+    public Ven() {
+        generator = new QueryGenerator();
+        mapper = new QueryMapper();
+    }
+
+    public List list() {
+        return null;
+    }
+
+    public int count() {
+        return 0;
+    }
+
+    public Object get(int no, Class objectClass) {
+        return null;
+    }
+
+    public void save(Object object) {
+    }
+
+    public void delete(int no, Class objectClass) {
+    }
+
+    //SETTERS-------------------------------------------------------------------
+    public void setDataSource(DataSource dataSource) {
+        if (dataSource == null) throw new RuntimeException("fmgVen - DataSource cannot be null");
+        this.template = new NamedParameterJdbcTemplate(dataSource);
+    }
+
+    public Ven addDomainPackage(String domainPackage) {
+        generator.addDomainPackage(domainPackage);
+        mapper.addDomainPackage(domainPackage);
+        return this;
+    }
 }
Index: trunk/fmgVen/src/net/fmg/ven/SorguEslestirici.java
===================================================================
--- trunk/fmgVen/src/net/fmg/ven/SorguEslestirici.java	(revision 22)
+++ trunk/fmgVen/src/net/fmg/ven/SorguEslestirici.java	(revision 23)
@@ -124,5 +124,5 @@
                 
             }
-        } catch(SQLException ex){
+        } catch(Exception ex){
             ex.printStackTrace();
         }
Index: trunk/fmgVen/test/com/fmguler/ven/sample/Sample.java
===================================================================
--- trunk/fmgVen/test/com/fmguler/ven/sample/Sample.java	(revision 23)
+++ trunk/fmgVen/test/com/fmguler/ven/sample/Sample.java	(revision 23)
@@ -0,0 +1,56 @@
+/*
+ *  fmgVen - A Convention over Configuration Java ORM Tool
+ *  Copyright 2010 Fatih Mehmet Güler
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  under the License.
+ */
+package com.fmguler.ven.sample;
+
+import com.fmguler.ven.Ven;
+import com.fmguler.ven.sample.domain.SomeDomainObject;
+import javax.sql.DataSource;
+import org.springframework.jdbc.datasource.DriverManagerDataSource;
+
+/**
+ * Demonstrates sample usage of fmgVen.
+ * @author Fatih Mehmet Güler
+ */
+public class Sample {
+    public static void main(String[] args) {
+        test1();
+    }
+
+    public static void test1() {
+        Ven ven = getVen();
+        SomeDomainObject obj = (SomeDomainObject)ven.get(1, SomeDomainObject.class);
+        System.out.println(obj);
+    }
+
+    //---------------------------------------------------------
+    private static Ven getVen() {
+        Ven ven = new Ven();
+        ven.setDataSource(getDataSource());
+        ven.addDomainPackage("com.fmguler.ven.sample.domain").addDomainPackage("another.package");
+        return ven;
+    }
+
+    private static DataSource getDataSource() {
+        DriverManagerDataSource ds = new DriverManagerDataSource();
+        ds.setDriverClassName("org.postgresql.Driver");
+        ds.setUsername("postgres");
+        ds.setPassword("qwerty");
+        ds.setUrl("jdbc:postgresql://127.0.0.1:5432/vendb");
+        return ds;
+    }
+}
Index: trunk/fmgVen/test/com/fmguler/ven/sample/domain/SomeDomainObject.java
===================================================================
--- trunk/fmgVen/test/com/fmguler/ven/sample/domain/SomeDomainObject.java	(revision 23)
+++ trunk/fmgVen/test/com/fmguler/ven/sample/domain/SomeDomainObject.java	(revision 23)
@@ -0,0 +1,91 @@
+/*
+ *  fmgVen - A Convention over Configuration Java ORM Tool
+ *  Copyright 2010 Fatih Mehmet Güler
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *  under the License.
+ */
+package com.fmguler.ven.sample.domain;
+
+import java.util.Date;
+
+/**
+ *
+ * @author Fatih Mehmet Güler
+ */
+public class SomeDomainObject {
+    private int no;
+    private String name;
+    private String description;
+    private Date date;
+
+    /**
+     * @return the no
+     */
+    public int getNo() {
+        return no;
+    }
+
+    /**
+     * @param no the no to set
+     */
+    public void setNo(int no) {
+        this.no = no;
+    }
+
+    /**
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return the description
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * @param description the description to set
+     */
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * @return the date
+     */
+    public Date getDate() {
+        return date;
+    }
+
+    /**
+     * @param date the date to set
+     */
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    public String toString() {
+        return no + " " + name + " " + description + " " + date;
+    }
+}
