Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SAE4.A02.1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maxime Gosselin
SAE4.A02.1
Commits
69ab6c5a
Commit
69ab6c5a
authored
2 months ago
by
Maxime Gosselin
Browse files
Options
Downloads
Patches
Plain Diff
Ajout de la methode isCreatorOf dans DaoThread
parent
2e4581f4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
WEB-INF/src/modele/dao/DaoThread.java
+13
-0
13 additions, 0 deletions
WEB-INF/src/modele/dao/DaoThread.java
with
13 additions
and
0 deletions
WEB-INF/src/modele/dao/DaoThread.java
+
13
−
0
View file @
69ab6c5a
...
@@ -113,4 +113,17 @@ public class DaoThread {
...
@@ -113,4 +113,17 @@ public class DaoThread {
}
}
return
res
;
return
res
;
}
}
public
boolean
isCreatorOf
(
String
creator
,
int
idThread
){
DS
bdd
=
DS
.
getInstance
();
try
(
Connection
con
=
bdd
.
getConnection
())
{
PreparedStatement
ps
=
con
.
prepareStatement
(
"SELECT * FROM threads WHERE id_thread = ? AND creator = ?"
);
ps
.
setInt
(
1
,
idThread
);
ps
.
setString
(
2
,
creator
);
ResultSet
rs
=
ps
.
executeQuery
();
return
rs
.
next
();
}
catch
(
SQLException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment