Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
UyTube_obligatorio_PdA
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
Model registry
Operate
Environments
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
Juan José Álvarez Pérez
UyTube_obligatorio_PdA
Commits
92fa5410
Commit
92fa5410
authored
5 years ago
by
JotaJota96
Browse files
Options
Downloads
Patches
Plain Diff
clase Valoracion terminada (falta test)
parent
7352b7d6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
UyTube_aplicacion/src/Logica/Clases/Comentario.java
+17
-7
17 additions, 7 deletions
UyTube_aplicacion/src/Logica/Clases/Comentario.java
UyTube_aplicacion/src/Logica/Clases/Valoracion.java
+15
-8
15 additions, 8 deletions
UyTube_aplicacion/src/Logica/Clases/Valoracion.java
with
32 additions
and
15 deletions
UyTube_aplicacion/src/Logica/Clases/Comentario.java
+
17
−
7
View file @
92fa5410
...
...
@@ -2,8 +2,11 @@ package Logica.Clases;
import
Logica.DataType.DtComentario
;
import
java.sql.Date
;
import
java.util.ArrayList
;
public
class
Comentario
{
private
static
int
contadorComentarios
=
1
;
private
int
id
;
private
Date
fecha
;
private
String
texto
;
...
...
@@ -21,6 +24,10 @@ public class Comentario {
this
.
usr
=
usr
;
}
public
static
int
getNuevoID
(){
return
contadorComentarios
++;
}
public
int
getId
()
{
return
id
;
}
...
...
@@ -59,18 +66,21 @@ public class Comentario {
public
void
setUsr
(
Usuario
usr
)
{
this
.
usr
=
usr
;
}
/*
public boolean agregarSubComentario(int x, DtComentario dtC, Usuario usr){
}
public
boolean
agregarSubComentario
(
int
idComPadre
,
DtComentario
dtC
,
Usuario
usr
){
return
true
;
}
public
DtComentario
getDT
(){
DtComentario dtC = new DtComentario(this.id, usr.getNickname, this.fecha, this.texto, this.nivelSubComentario);
DtComentario
dtC
=
new
DtComentario
(
this
.
id
,
this
.
usr
.
getNickname
()
,
this
.
fecha
,
this
.
texto
,
this
.
nivelSubComentario
);
return
dtC
;
}
public boolean agregarSubComentario(int x, DtComentario dtC, Usuario usr){
public
ArrayList
<
DtComentario
>
listarSubComentarios
(){
return
new
ArrayList
();
}
*/
}
This diff is collapsed.
Click to expand it.
UyTube_aplicacion/src/Logica/Clases/Valoracion.java
+
15
−
8
View file @
92fa5410
...
...
@@ -29,21 +29,28 @@ public class Valoracion {
public
void
setUsr
(
Usuario
usr
)
{
this
.
usr
=
usr
;
}
/*
}
private
DtValoracion
getDT
(){
DtValoracion
dtV
=
new
DtValoracion
(
this
.
val
,
this
.
usr
.
getNickname
());
return
dtV
;
}
private
DtValoracion
getDT
(
String
nickname
){
//faltan cosas-------------------------
DtValoracion dtV = new DtValoracion();
return dtV;
// si esta valoracion corresponde al usuario, devuelve su DT, sino null
if
(
nickname
.
equals
(
this
.
usr
.
getNickname
())){
return
this
.
getDT
();
}
else
{
return
null
;
}
}
private
boolean
modificar
(
DtValoracion
dtV
,
String
nickname
){
bolean b;
//faltan cosas-------------------------
return b;
if
(
nickname
.
equals
(
this
.
usr
.
getNickname
())){
this
.
val
=
dtV
.
getVal
();
return
true
;
}
else
{
return
false
;
}
}
*/
}
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