Refactoring: Code Style and Optimize import

This commit is contained in:
Mark Struchkov 2019-01-09 11:09:00 +03:00
parent d42ae014e0
commit 92c2c4fd7b
7 changed files with 9 additions and 10 deletions

View File

@ -3,7 +3,8 @@ package org.sadtech.consultant.database.entity;
import lombok.Data;
import javax.persistence.*;
import java.util.*;
import java.util.HashMap;
import java.util.Map;
@Entity
@Data
@ -29,7 +30,4 @@ public class Person {
@MapKeyColumn(name = "KeysSocialNetworks", length = 20)
private Map<String, Integer> socialNetworks = new HashMap<>();
// @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL, mappedBy="idMess")
// private List<Message> messages;
}

View File

@ -4,7 +4,6 @@ import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Data

View File

@ -4,7 +4,6 @@ import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Data

View File

@ -7,8 +7,12 @@ import java.util.Map;
public interface PersonService {
void addUser(Person user);
void removeUser(Long id);
Person getUserByID(Long id);
Map<String, Integer> getSocialNetwork(Long id);
Person getUserBySocialNetworksId(String type, Integer socialNetworksId);
}

View File

@ -5,6 +5,7 @@ import org.sadtech.consultant.database.entity.Unit;
public interface UnitService {
void addUnit(Unit unit);
void removeUnit(Long id);
}

View File

@ -5,7 +5,6 @@ import org.sadtech.consultant.database.repository.MessageRepository;
import org.sadtech.consultant.database.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;

View File

@ -1,7 +1,6 @@
package org.sadtech.consultant.processing;
import org.sadtech.consultant.database.entity.Message;
import org.sadtech.consultant.database.entity.Person;
import org.sadtech.consultant.database.service.MessageService;
import org.springframework.stereotype.Component;