Commit 482a9545 authored by paloma.piot's avatar paloma.piot

solucionar conflictos

parents 0107e765 a6a2bfce
{
"fluentMethods": true,
"relationships": [
{
"relationshipType": "one-to-many",
"relationshipName": "contenidoEdicion",
"otherEntityName": "contenidoEdicion",
"otherEntityRelationshipName": "contenido"
},
{
"relationshipType": "one-to-many",
"relationshipName": "slot",
"otherEntityName": "slot",
"otherEntityRelationshipName": "contenido"
}
],
"fields": [
{
"fieldName": "nombre",
"fieldType": "String",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "pais",
"fieldType": "String",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "tipo",
"fieldType": "TipoContenido",
"fieldValues": "MUSICAL,TEATRO,CINE,CIRCO,CONFERENCIA,CURSO",
"fieldValidateRules": [
"required"
]
}
],
"changelogDate": "20180219153953",
"entityTableName": "contenido",
"dto": "mapstruct",
"pagination": "infinite-scroll",
"service": "serviceClass",
"jpaMetamodelFiltering": false
}
\ No newline at end of file
{
"fluentMethods": true,
"relationships": [
{
"relationshipType": "many-to-one",
"relationshipName": "edicion",
"otherEntityName": "edicion",
"otherEntityField": "id"
},
{
"relationshipType": "many-to-one",
"relationshipName": "contenido",
"otherEntityName": "contenido",
"otherEntityField": "id"
}
],
"fields": [
{
"fieldName": "estado",
"fieldType": "EstadoContratacion",
"fieldValues": "PENDIENTE,NEGOCIACION,CONTRATADO,PUBLICADO",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "prioridad",
"fieldType": "Nivel",
"fieldValues": "MUYALTA,ALTA,MEDIA,BAJA",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "relevancia",
"fieldType": "Nivel",
"fieldValues": "MUYALTA,ALTA,MEDIA,BAJA",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "precioPresupuestado",
"fieldType": "BigDecimal"
},
{
"fieldName": "precioRealPagado",
"fieldType": "BigDecimal"
},
{
"fieldName": "observaciones",
"fieldType": "String"
},
{
"fieldName": "contrato",
"fieldType": "byte[]",
"fieldTypeBlobContent": "any"
}
],
"changelogDate": "20180219153954",
"entityTableName": "contenido_edicion",
"dto": "mapstruct",
"pagination": "infinite-scroll",
"service": "serviceClass",
"jpaMetamodelFiltering": false
}
\ No newline at end of file
......@@ -7,6 +7,24 @@
"otherEntityName": "sponsorEdicion",
"otherEntityRelationshipName": "edicion"
},
{
"relationshipType": "one-to-many",
"relationshipName": "contenidoEdicion",
"otherEntityName": "contenidoEdicion",
"otherEntityRelationshipName": "edicion"
},
{
"relationshipType": "one-to-many",
"relationshipName": "slot",
"otherEntityName": "slot",
"otherEntityRelationshipName": "edicion"
},
{
"relationshipType": "one-to-many",
"relationshipName": "escenario",
"otherEntityName": "escenario",
"otherEntityRelationshipName": "edicion"
},
{
"relationshipType": "many-to-many",
"otherEntityRelationshipName": "",
......
{
"fluentMethods": true,
"relationships": [
{
"relationshipType": "one-to-many",
"relationshipName": "slot",
"otherEntityName": "slot",
"otherEntityRelationshipName": "escenario"
},
{
"relationshipType": "many-to-one",
"relationshipName": "edicion",
"otherEntityName": "edicion",
"otherEntityField": "id"
}
],
"fields": [
{
"fieldName": "nombre",
"fieldType": "String",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "capacidad",
"fieldType": "Long",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "tipo",
"fieldType": "TipoEscenario",
"fieldValues": "CERRADO,ABIERTO",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "horaApertura",
"fieldType": "ZonedDateTime"
},
{
"fieldName": "horaCierre",
"fieldType": "ZonedDateTime"
},
{
"fieldName": "descripcion",
"fieldType": "String"
}
],
"changelogDate": "20180219153956",
"entityTableName": "escenario",
"dto": "mapstruct",
"pagination": "infinite-scroll",
"service": "serviceClass",
"jpaMetamodelFiltering": false
}
\ No newline at end of file
{
"fluentMethods": true,
"relationships": [
{
"relationshipType": "many-to-one",
"relationshipName": "contenido",
"otherEntityName": "contenido",
"otherEntityField": "id"
},
{
"relationshipType": "many-to-one",
"relationshipName": "escenario",
"otherEntityName": "escenario",
"otherEntityField": "id"
},
{
"relationshipType": "many-to-one",
"relationshipName": "edicion",
"otherEntityName": "edicion",
"otherEntityField": "id"
}
],
"fields": [
{
"fieldName": "fechaInicio",
"fieldType": "ZonedDateTime"
},
{
"fieldName": "fechafin",
"fieldType": "ZonedDateTime"
}
],
"changelogDate": "20180219153955",
"entityTableName": "slot",
"dto": "mapstruct",
"pagination": "infinite-scroll",
"service": "serviceClass",
"jpaMetamodelFiltering": false
}
\ No newline at end of file
......@@ -4,7 +4,7 @@
<groupId>es.festis.backstage</groupId>
<artifactId>backstage</artifactId>
<version>1.0.0</version>
<version>2.0.0</version>
<packaging>war</packaging>
<name>Backstage</name>
......
......@@ -54,6 +54,16 @@ public class CacheConfiguration {
cm.createCache(es.festis.backstage.domain.Sponsor.class.getName(), jcacheConfiguration);
cm.createCache(es.festis.backstage.domain.Sponsor.class.getName() + ".sponsorEdicions", jcacheConfiguration);
cm.createCache(es.festis.backstage.domain.SponsorEdicion.class.getName(), jcacheConfiguration);
cm.createCache(es.festis.backstage.domain.Edicion.class.getName() + ".contenidoEdicions", jcacheConfiguration);
cm.createCache(es.festis.backstage.domain.Edicion.class.getName() + ".slots", jcacheConfiguration);
cm.createCache(es.festis.backstage.domain.Edicion.class.getName() + ".escenarios", jcacheConfiguration);
cm.createCache(es.festis.backstage.domain.Contenido.class.getName(), jcacheConfiguration);
cm.createCache(es.festis.backstage.domain.Contenido.class.getName() + ".contenidoEdicions", jcacheConfiguration);
cm.createCache(es.festis.backstage.domain.Contenido.class.getName() + ".slots", jcacheConfiguration);
cm.createCache(es.festis.backstage.domain.ContenidoEdicion.class.getName(), jcacheConfiguration);
cm.createCache(es.festis.backstage.domain.Slot.class.getName(), jcacheConfiguration);
cm.createCache(es.festis.backstage.domain.Escenario.class.getName(), jcacheConfiguration);
cm.createCache(es.festis.backstage.domain.Escenario.class.getName() + ".slots", jcacheConfiguration);
// jhipster-needle-ehcache-add-entry
};
}
......
package es.festis.backstage.domain;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import java.util.Objects;
import es.festis.backstage.domain.enumeration.TipoContenido;
/**
* A Contenido.
*/
@Entity
@Table(name = "contenido")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Contenido implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@NotNull
@Column(name = "nombre", nullable = false)
private String nombre;
@NotNull
@Column(name = "pais", nullable = false)
private String pais;
@NotNull
@Enumerated(EnumType.STRING)
@Column(name = "tipo", nullable = false)
private TipoContenido tipo;
@OneToMany(mappedBy = "contenido")
@JsonIgnore
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
private Set<ContenidoEdicion> contenidoEdicions = new HashSet<>();
@OneToMany(mappedBy = "contenido")
@JsonIgnore
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
private Set<Slot> slots = new HashSet<>();
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getNombre() {
return nombre;
}
public Contenido nombre(String nombre) {
this.nombre = nombre;
return this;
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
public String getPais() {
return pais;
}
public Contenido pais(String pais) {
this.pais = pais;
return this;
}
public void setPais(String pais) {
this.pais = pais;
}
public TipoContenido getTipo() {
return tipo;
}
public Contenido tipo(TipoContenido tipo) {
this.tipo = tipo;
return this;
}
public void setTipo(TipoContenido tipo) {
this.tipo = tipo;
}
public Set<ContenidoEdicion> getContenidoEdicions() {
return contenidoEdicions;
}
public Contenido contenidoEdicions(Set<ContenidoEdicion> contenidoEdicions) {
this.contenidoEdicions = contenidoEdicions;
return this;
}
public Contenido addContenidoEdicion(ContenidoEdicion contenidoEdicion) {
this.contenidoEdicions.add(contenidoEdicion);
contenidoEdicion.setContenido(this);
return this;
}
public Contenido removeContenidoEdicion(ContenidoEdicion contenidoEdicion) {
this.contenidoEdicions.remove(contenidoEdicion);
contenidoEdicion.setContenido(null);
return this;
}
public void setContenidoEdicions(Set<ContenidoEdicion> contenidoEdicions) {
this.contenidoEdicions = contenidoEdicions;
}
public Set<Slot> getSlots() {
return slots;
}
public Contenido slots(Set<Slot> slots) {
this.slots = slots;
return this;
}
public Contenido addSlot(Slot slot) {
this.slots.add(slot);
slot.setContenido(this);
return this;
}
public Contenido removeSlot(Slot slot) {
this.slots.remove(slot);
slot.setContenido(null);
return this;
}
public void setSlots(Set<Slot> slots) {
this.slots = slots;
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Contenido contenido = (Contenido) o;
if (contenido.getId() == null || getId() == null) {
return false;
}
return Objects.equals(getId(), contenido.getId());
}
@Override
public int hashCode() {
return Objects.hashCode(getId());
}
@Override
public String toString() {
return "Contenido{" +
"id=" + getId() +
", nombre='" + getNombre() + "'" +
", pais='" + getPais() + "'" +
", tipo='" + getTipo() + "'" +
"}";
}
}
package es.festis.backstage.domain;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;
import es.festis.backstage.domain.enumeration.EstadoContratacion;
import es.festis.backstage.domain.enumeration.Nivel;
/**
* A ContenidoEdicion.
*/
@Entity
@Table(name = "contenido_edicion")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class ContenidoEdicion implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@NotNull
@Enumerated(EnumType.STRING)
@Column(name = "estado", nullable = false)
private EstadoContratacion estado;
@NotNull
@Enumerated(EnumType.STRING)
@Column(name = "prioridad", nullable = false)
private Nivel prioridad;
@NotNull
@Enumerated(EnumType.STRING)
@Column(name = "relevancia", nullable = false)
private Nivel relevancia;
@Column(name = "precio_presupuestado", precision=10, scale=2)
private BigDecimal precioPresupuestado;
@Column(name = "precio_real_pagado", precision=10, scale=2)
private BigDecimal precioRealPagado;
@Column(name = "observaciones")
private String observaciones;
@Lob
@Column(name = "contrato")
private byte[] contrato;
@Column(name = "contrato_content_type")
private String contratoContentType;
@ManyToOne
private Edicion edicion;
@ManyToOne
private Contenido contenido;
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public EstadoContratacion getEstado() {
return estado;
}
public ContenidoEdicion estado(EstadoContratacion estado) {
this.estado = estado;
return this;
}
public void setEstado(EstadoContratacion estado) {
this.estado = estado;
}
public Nivel getPrioridad() {
return prioridad;
}
public ContenidoEdicion prioridad(Nivel prioridad) {
this.prioridad = prioridad;
return this;
}
public void setPrioridad(Nivel prioridad) {
this.prioridad = prioridad;
}
public Nivel getRelevancia() {
return relevancia;
}