small code improvements
This commit is contained in:
parent
ba6a889d35
commit
bb406ead06
9 changed files with 31 additions and 24 deletions
|
@ -1,13 +1,10 @@
|
|||
package persistence;
|
||||
|
||||
import persistence.category.CategoryEntity;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
|
||||
public interface GenericDAO<T> {
|
||||
|
||||
public Set<T> getALl();
|
||||
public Set<T> getAll();
|
||||
|
||||
void remove(T value);
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ public class CSVCategoryPersistenceAdapter implements PersistenceAdapter<Categor
|
|||
|
||||
@Override
|
||||
public Set<Category> getAll() {
|
||||
return categoryDAO.getALl().stream().map(CategoryEntity::toCategory).collect(Collectors.toSet());
|
||||
return categoryDAO.getAll().stream().map(CategoryEntity::toCategory).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,7 +18,7 @@ public class CSVCustomTagMatcherPersistenceAdapter implements PersistenceAdapter
|
|||
@Override
|
||||
public Set<CustomTagMatcher> getAll() {
|
||||
return customTagMatcherDAO
|
||||
.getALl()
|
||||
.getAll()
|
||||
.stream()
|
||||
.map(CustomTagMatcherEntity::toCustomTagMatcher)
|
||||
.collect(Collectors.toSet());
|
||||
|
|
|
@ -17,7 +17,7 @@ public class CSVLinkPersistenceAdapter implements PersistenceAdapter<Link> {
|
|||
|
||||
@Override
|
||||
public Set<Link> getAll() {
|
||||
return linkDAO.getALl().stream().map(LinkEntity::toLink).collect(Collectors.toSet());
|
||||
return linkDAO.getAll().stream().map(LinkEntity::toLink).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Reference in a new issue