Cleaned a little bit the code

This commit is contained in:
Nikolaos Laskaris 2017-09-29 15:23:40 +03:00
parent a492cc2dda
commit 34866eec22
6 changed files with 0 additions and 122 deletions

View File

@ -1,25 +1,13 @@
package controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import dao.entities.DMPDao;
import entities.DMP;
@Controller
public class UIController {

View File

@ -6,9 +6,6 @@ import java.util.UUID;
import org.springframework.util.MultiValueMap;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import entities.DMP;
import entities.DMPProfile;
import entities.DataRepository;

View File

@ -1,59 +1,39 @@
package rest;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.UUID;
import org.hibernate.Hibernate;
import org.hibernate.Session;
import org.apache.commons.lang3.SerializationUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import dao.entities.DMPDao;
import dao.entities.DMPProfileDao;
import dao.entities.DMPResearcherDao;
import dao.entities.DataRepositoryDao;
import dao.entities.DatasetDao;
import dao.entities.DatasetProfileDao;
import dao.entities.DatasetProfileRulesetDao;
import dao.entities.DatasetProfileViewstyleDao;
import dao.entities.DatasetRegistryDao;
import dao.entities.DatasetServiceDao;
import dao.entities.OrganisationDao;
import dao.entities.ProjectDao;
import dao.entities.RegistryDao;
import dao.entities.ResearcherDao;
import dao.entities.ServiceDao;
import entities.DMP;
import entities.DMPProfile;
import entities.DataRepository;
import entities.Dataset;
import entities.DatasetProfile;
import entities.DatasetProfileRuleset;
import entities.DatasetProfileViewstyle;
import entities.DatasetRegistry;
import entities.DatasetService;
import entities.Organisation;
import entities.Project;
import entities.Registry;
import entities.Service;
import helpers.Transformers;

View File

@ -8,7 +8,6 @@ import java.sql.Types;
import java.util.UUID;
import org.hibernate.HibernateException;
import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.usertype.UserType;

View File

@ -7,7 +7,6 @@ import java.sql.SQLException;
import java.sql.Types;
import org.hibernate.HibernateException;
import org.hibernate.engine.spi.SessionImplementor;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.usertype.UserType;

View File

@ -1,85 +0,0 @@
//package types;
//
//import java.io.Serializable;
//import java.sql.PreparedStatement;
//import java.sql.ResultSet;
//import java.sql.SQLException;
//import java.sql.Types;
//import org.hibernate.HibernateException;
//import org.hibernate.engine.spi.SharedSessionContractImplementor;
//
///**
// * Store and retrieve a PostgreSQL "xml" column as a Java string.
// */
//public class SQLXMLType implements org.hibernate.usertype.UserType {
//
// private final int[] sqlTypesSupported = new int[] { Types.VARCHAR };
//
// public int[] sqlTypes() {
// return sqlTypesSupported;
// }
//
// public Class returnedClass() {
// return String.class;
// }
//
// public boolean equals(Object x, Object y) throws HibernateException {
// if (x == null) {
// return y == null;
// } else {
// return x.equals(y);
// }
// }
//
// public int hashCode(Object x) throws HibernateException {
// return x == null ? null : x.hashCode();
// }
//
// public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException {
// assert(names.length == 1);
// String xmldoc = rs.getString( names[0] );
// return rs.wasNull() ? null : xmldoc;
// }
//
// public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
// if (value == null) {
// st.setNull(index, Types.OTHER);
// } else {
// st.setObject(index, value, Types.OTHER);
// }
// }
//
// public Object deepCopy(Object value) throws HibernateException {
// if (value == null)
// return null;
// return new String( (String)value );
// }
//
// public boolean isMutable() {
// return false;
// }
//
// public Serializable disassemble(Object value) throws HibernateException {
// return (String) value;
// }
//
// public Object assemble(Serializable cached, Object owner) throws HibernateException {
// return (String) cached;
// }
//
// public Object replace(Object original, Object target, Object owner) throws HibernateException {
// return original;
// }
//
// public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner)
// throws HibernateException, SQLException {
// // TODO Auto-generated method stub
// return null;
// }
//
// public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session)
// throws HibernateException, SQLException {
// // TODO Auto-generated method stub
//
// }
//}