-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Type of Movie and its handling
- Loading branch information
REDNBLACK
committed
May 7, 2016
1 parent
9df9980
commit 8ffb427
Showing
25 changed files
with
328 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version = "0.7.8" | ||
version = "0.9.0" | ||
|
||
ext { | ||
guiceVersion = "4.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,8 @@ enum Type { | |
TITLE_EQUALS, | ||
TITLE_SMART, | ||
YEAR_DEVIATION, | ||
YEAR_EQUALS | ||
YEAR_EQUALS, | ||
TYPE_EQUALS, | ||
TYPE_ANY | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
core/src/main/java/org/f0w/k2i/core/comparator/type/AnyTypeComparator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.f0w.k2i.core.comparator.type; | ||
|
||
import lombok.NonNull; | ||
import org.f0w.k2i.core.comparator.AbstractMovieComparator; | ||
import org.f0w.k2i.core.model.entity.Movie; | ||
|
||
public final class AnyTypeComparator extends AbstractMovieComparator { | ||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public boolean areEqual(@NonNull Movie movie1, @NonNull Movie movie2) { | ||
LOG.debug( | ||
"Comparing types disabled, tried to compare type '{}' with type '{}''", | ||
movie1.getType(), | ||
movie2.getType() | ||
); | ||
|
||
return true; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
core/src/main/java/org/f0w/k2i/core/comparator/type/EqualsTypeComparator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.f0w.k2i.core.comparator.type; | ||
|
||
import lombok.NonNull; | ||
import org.f0w.k2i.core.comparator.AbstractMovieComparator; | ||
import org.f0w.k2i.core.model.entity.Movie; | ||
|
||
public final class EqualsTypeComparator extends AbstractMovieComparator { | ||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public boolean areEqual(@NonNull Movie movie1, @NonNull Movie movie2) { | ||
boolean result = movie1.getType().equals(movie2.getType()); | ||
|
||
LOG.debug( | ||
"Comparing type '{}' with type '{}', matches = '{}'", | ||
movie1.getType(), | ||
movie2.getType(), | ||
result | ||
); | ||
|
||
return result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.