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
7b02ff3b
Commit
7b02ff3b
authored
5 years ago
by
Facundo
Browse files
Options
Downloads
Patches
Plain Diff
comit
parent
ad8a44fc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
UyTube_aplicacion/src/Logica/Clases/Canal.java
+20
-11
20 additions, 11 deletions
UyTube_aplicacion/src/Logica/Clases/Canal.java
with
20 additions
and
11 deletions
UyTube_aplicacion/src/Logica/Clases/Canal.java
+
20
−
11
View file @
7b02ff3b
...
...
@@ -6,7 +6,7 @@ import Logica.DataType.DtListaDeReproduccion;
import
Logica.DataType.DtValoracion
;
import
Logica.DataType.DtVideo
;
import
Logica.DataType.DtCanal
;
//
import java.util.ArrayList;
import
java.util.ArrayList
;
import
java.util.Map
;
import
java.util.TreeMap
;
...
...
@@ -18,13 +18,13 @@ public class Canal {
private
String
nombre
;
private
String
descripcion
;
private
Privacidad
privacidad
;
private
Map
<
Integer
,
ListaDeReproduccion
>
listasDeReproduccione
s
;
private
Map
<
Integer
,
ListaDeReproduccion
>
misLista
s
;
private
Map
<
Integer
,
Video
>
Videos
;
public
Canal
()
{
this
.
id
=
getNuevoId
();
this
.
listasDeReproduccione
s
=
new
TreeMap
();
this
.
misLista
s
=
new
TreeMap
();
this
.
Videos
=
new
TreeMap
();
}
...
...
@@ -33,7 +33,7 @@ public class Canal {
this
.
nombre
=
nombre
;
this
.
descripcion
=
descripcion
;
this
.
privacidad
=
privacidad
;
this
.
listasDeReproduccione
s
=
new
TreeMap
();
this
.
misLista
s
=
new
TreeMap
();
this
.
Videos
=
new
TreeMap
();
}
...
...
@@ -98,10 +98,20 @@ public ArrayList<DtValoracion> listarValoracionesDeVideo(int id){
return
new
ArrayList
();
}
public
ArrayList
<
DtVideo
>
listarVideos
(){
return
new
ArrayList
();
ArrayList
<
DtVideo
>
ret
=
new
ArrayList
();
for
(
Map
.
Entry
<
Integer
,
ListaDeReproduccion
>
m
:
misListas
.
entrySet
()){
// hace un getDT y lo agrega a la coleccion de retorno
for
(
Map
.
Entry
<
Integer
,
Video
>
m
:
misListas
.
entrySet
()){
// hace un getDT y lo agrega a la coleccion de retorno
ret
.
add
(
m
.
getValue
().
getDt
());
}
}
return
ret
;
}
public
ArrayList
<
DtVideo
>
listarVideosDeListaDeReproduccion
(
int
id
){
return
new
ArrayList
();
return
ListaDeReproduccion
.
}
public
void
modificar
(
DtCanal
canal
){
this
.
nombre
=
canal
.
getNombre
();
...
...
@@ -118,9 +128,9 @@ public ArrayList<DtListaDeReproduccion> obtenerListasEnCategoria(String cat){
public
DtVideo
obtenerDtVideo
(
int
id
){
return
new
DtVideo
();
}
public
Video
obtenerVideo
(
int
id
){
return
new
Video
();
}
//
public Video obtenerVideo(int id){
//
return new Video();
//
}
public
ArrayList
<
DtVideo
>
obtenerVideosEnCategoria
(
String
cat
){
return
new
ArrayList
();
}
...
...
@@ -130,4 +140,3 @@ public boolean validarListaParticular(String lista){
}
}
\ No newline at end of file
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