Skip to content

Commit

Permalink
SellerDaoJDBC and DaoFactory and folders and files
Browse files Browse the repository at this point in the history
  • Loading branch information
LucianoSant006 committed Oct 26, 2024
1 parent 138c56b commit d494764
Show file tree
Hide file tree
Showing 19 changed files with 267 additions and 9 deletions.
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 1,29 @@
### IntelliJ IDEA ###
out/
!**/src/main/**/out/
!**/src/test/**/out/

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/Program.java

This file was deleted.

4 changes: 4 additions & 0 deletions db.properties
Original file line number Diff line number Diff line change
@@ -0,0 1,4 @@
user=root
password=7375
dburl=jdbc:mysql://localhost:3306/corusejdbc1
useSSL=false
20 changes: 20 additions & 0 deletions jdbcDao.iml
Original file line number Diff line number Diff line change
@@ -0,0 1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../../java-libs/jdbc-connectors/mysql-connector-j-9.0.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>
18 changes: 18 additions & 0 deletions src/app/Program.java
Original file line number Diff line number Diff line change
@@ -0,0 1,18 @@
package app;

import model.dao.DaoFactory;
import model.dao.SellerDao;
import model.entities.Seller;

public class Program {

public static void main(String[] args) {

Seller seller = new Seller(21, "Bob", "[email protected]", new Date(), 3000.0, obj);

SellerDao sellerDao = DaoFactory.createSellerDao();

System.out.println(seller);

}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions src/model/dao/DaoFactory.java
Original file line number Diff line number Diff line change
@@ -0,0 1,10 @@
package model.dao;

import model.impl.SellerDaoJDBC;

public class DaoFactory {

public static SellerDao createSellerDao(){
return new SellerDaoJDBC();
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
34 changes: 34 additions & 0 deletions src/model/impl/SellerDaoJDBC.java
Original file line number Diff line number Diff line change
@@ -0,0 1,34 @@
package model.impl;

import model.dao.SellerDao;
import model.entities.Seller;

import java.util.List;

public class SellerDaoJDBC implements SellerDao {

@Override
public void insert(Seller obj) {

}

@Override
public void update(Seller obj) {

}

@Override
public void deleteById(Integer id) {

}

@Override
public Seller findById(Integer id) {
return null;
}

@Override
public List<Seller> findAll() {
return List.of();
}
}

0 comments on commit d494764

Please sign in to comment.