fixed conflict
This commit is contained in:
commit
7ea0cab93f
src/main/java/se/su/dsv/scipro
@ -1,23 +1,12 @@
|
||||
package se.su.dsv.scipro.data.dataobjects;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.SortedSet;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToMany;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Fredrik Norberg fnorbe@dsv.su.se
|
||||
@ -42,10 +31,10 @@ public class CheckList extends DomainObject {
|
||||
@ManyToOne(optional = false)
|
||||
private Project project;
|
||||
|
||||
@OneToOne(optional = true)
|
||||
@OneToOne(optional = true, orphanRemoval = true)
|
||||
private CheckListUpload checkListUpload;
|
||||
|
||||
@OneToMany
|
||||
@OneToMany(orphanRemoval = true)
|
||||
private List<CheckListQuestion> questions = new ArrayList<CheckListQuestion>();
|
||||
|
||||
@ManyToMany
|
||||
|
@ -1,21 +1,13 @@
|
||||
package se.su.dsv.scipro.data.dataobjects;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Fredrik Norberg - fnorbe@dsv.su.se
|
||||
*/
|
||||
@ -41,7 +33,7 @@ public class CheckListQuestion extends DomainObject implements
|
||||
@Column(nullable = false)
|
||||
private int questionNumber;
|
||||
|
||||
@OneToMany
|
||||
@OneToMany(orphanRemoval = true)
|
||||
private List<CheckListAnswer> answers = new ArrayList<CheckListAnswer>();
|
||||
|
||||
public CheckListQuestion() {
|
||||
|
@ -1,19 +1,12 @@
|
||||
package se.su.dsv.scipro.data.dataobjects;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fred
|
||||
@ -32,7 +25,7 @@ public class Log extends LazyDeletableDomainObject{
|
||||
@GeneratedValue
|
||||
private Long id;
|
||||
|
||||
@OneToMany(mappedBy="log")
|
||||
@OneToMany(mappedBy="log", orphanRemoval = true)
|
||||
private List<LogEntry> logEntryList = new ArrayList<LogEntry>();
|
||||
|
||||
@OneToOne(optional=false)
|
||||
|
@ -1,35 +1,10 @@
|
||||
package se.su.dsv.scipro.data.dataobjects;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.EnumType;
|
||||
import javax.persistence.Enumerated;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinTable;
|
||||
import javax.persistence.ManyToMany;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.apache.wicket.markup.html.panel.Panel;
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
import org.hibernate.annotations.Sort;
|
||||
import org.hibernate.annotations.SortType;
|
||||
|
||||
import se.su.dsv.scipro.data.dataobjects.interfaces.Commentable;
|
||||
import se.su.dsv.scipro.data.enums.ProjectStatus;
|
||||
import se.su.dsv.scipro.data.enums.ProjectTeamMemberRoles;
|
||||
@ -39,6 +14,9 @@ import se.su.dsv.scipro.icons.IconPanel;
|
||||
import se.su.dsv.scipro.icons.IconizedComponent;
|
||||
import se.su.dsv.scipro.icons.ImageIcon;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.*;
|
||||
|
||||
@Entity
|
||||
@Table(name="project")
|
||||
@Cacheable(true)
|
||||
@ -48,13 +26,12 @@ public class Project extends DomainObject implements Comparable<Project>, Iconiz
|
||||
private static final long serialVersionUID = 9071570648984376188L;
|
||||
|
||||
public static final String PP_PROJECT_ID = "pid";
|
||||
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
private Long id;
|
||||
|
||||
@OneToOne(mappedBy="project")
|
||||
@OneToOne(mappedBy="project", orphanRemoval = true)
|
||||
private ProjectSchedule projectSchedule;
|
||||
|
||||
@Column(unique=true)
|
||||
@ -78,7 +55,7 @@ public class Project extends DomainObject implements Comparable<Project>, Iconiz
|
||||
@SortableField
|
||||
private Employee headSupervisor;
|
||||
|
||||
@OneToOne(mappedBy="project")
|
||||
@OneToOne(mappedBy="project", orphanRemoval = true)
|
||||
private Log log;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
|
@ -1,21 +1,13 @@
|
||||
package se.su.dsv.scipro.data.dataobjects;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
@Entity
|
||||
@Table(name="project_schedule")
|
||||
@Cacheable(true)
|
||||
@ -28,7 +20,7 @@ public class ProjectSchedule extends DomainObject {
|
||||
@GeneratedValue
|
||||
private Long id;
|
||||
|
||||
@OneToMany(mappedBy="projectSchedule",cascade=CascadeType.PERSIST)
|
||||
@OneToMany(mappedBy="projectSchedule",cascade=CascadeType.PERSIST, orphanRemoval = true)
|
||||
private Set<ProjectScheduleEvent> events = new TreeSet<ProjectScheduleEvent>();
|
||||
|
||||
@OneToOne(optional=false)
|
||||
|
@ -45,12 +45,13 @@
|
||||
<th>Supervisor</th>
|
||||
<th>Reviewer</th>
|
||||
<th>Status</th>
|
||||
<th class="rounded-right-top">Edit</th>
|
||||
<th>Edit</th>
|
||||
<th class="rounded-right-top">Delete</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7" class="rounded-foot"> </td>
|
||||
<td colspan="8" class="rounded-foot"> </td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody wicket:id="dataview">
|
||||
@ -63,11 +64,12 @@
|
||||
<td wicket:id="statusLabel">Other role</td>
|
||||
<!-- <td wicket:id="editLabel">Other role</td> -->
|
||||
<td><a href="#" wicket:id="testLink">Edit</a></td>
|
||||
<td><a href="#" wicket:id="deleteLink">Delete</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td wicket:id="emptyLabel" colspan="7"></td>
|
||||
<td wicket:id="emptyLabel" colspan="8"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -1,5 +1,8 @@
|
||||
package se.su.dsv.scipro.project.panels;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.wicket.ajax.AjaxRequestTarget;
|
||||
import org.apache.wicket.ajax.markup.html.AjaxLink;
|
||||
import org.apache.wicket.markup.html.WebMarkupContainer;
|
||||
@ -12,6 +15,7 @@ import org.apache.wicket.markup.repeater.Item;
|
||||
import org.apache.wicket.markup.repeater.data.DataView;
|
||||
import org.apache.wicket.spring.injection.annot.SpringBean;
|
||||
import org.odlabs.wiquery.ui.dialog.Dialog;
|
||||
|
||||
import se.su.dsv.scipro.SciProSession;
|
||||
import se.su.dsv.scipro.admin.pages.ProjectManagementPage;
|
||||
import se.su.dsv.scipro.data.dao.interfaces.Dao.SortableParams.Sort;
|
||||
@ -24,9 +28,6 @@ import se.su.dsv.scipro.reusable.FilterProjectStatusPanel;
|
||||
import se.su.dsv.scipro.reusable.FilterStringPanel;
|
||||
import se.su.dsv.scipro.security.auth.roles.Roles;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class ProjectManagementPanel extends Panel {
|
||||
|
||||
@SpringBean
|
||||
@ -103,9 +104,9 @@ public class ProjectManagementPanel extends Panel {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Override
|
||||
public void onUpdate(AjaxRequestTarget target) {
|
||||
// dialog.close();
|
||||
// ajaxRefresh(target);
|
||||
setResponsePage(ProjectManagementPage.class);
|
||||
dialog.close(target);
|
||||
ajaxRefresh(target);
|
||||
//setResponsePage(ProjectManagementPage.class);
|
||||
}
|
||||
|
||||
});
|
||||
@ -129,7 +130,18 @@ public class ProjectManagementPanel extends Panel {
|
||||
};
|
||||
item.add(testLink);
|
||||
|
||||
|
||||
AjaxLink deleteLink = new AjaxLink<Void>("deleteLink"){
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Override
|
||||
public void onClick(AjaxRequestTarget target) {
|
||||
Project p2 = projectDao.reLoad(p);
|
||||
projectDao.delete(p2);
|
||||
ajaxRefresh(target);
|
||||
}
|
||||
|
||||
};
|
||||
item.add(deleteLink);
|
||||
//>>>>>>> cascade
|
||||
|
||||
}
|
||||
};
|
||||
@ -140,7 +152,7 @@ public class ProjectManagementPanel extends Panel {
|
||||
nav.setVisible(dataProvider.size()!=0);
|
||||
dataviewContainer.add(nav); //add it
|
||||
|
||||
emptyLabel = new Label("emptyLabel", "No templates to show"); //informs the user that the list is emty
|
||||
emptyLabel = new Label("emptyLabel", "No projects to show"); //informs the user that the list is emty
|
||||
emptyLabel.setOutputMarkupId(true); //make it ajax-targetable
|
||||
emptyLabel.setVisible(dataProvider.size()==0);
|
||||
dataviewContainer.add(emptyLabel); //add it
|
||||
|
Loading…
x
Reference in New Issue
Block a user