Skip to content

Commit

Permalink
Javadoc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienlauer committed Sep 15, 2017
1 parent 13c8617 commit aab5983
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@
* It is not defined primarily by its attributes but by its identity that stays the same through time and across
* distinct representations.
*
* <p>
* The identity of an entity must be unique and immutable. It must be chosen carefully and well defined in the model.
* Identification can come from:
* <ul>
* <li>The outside: a user of the system can provide the identity, handling the uniqueness himself.</li>
* <li>The inside: the entity can generate its own identity using an algorithm.</li>
* <li>An {@link IdentityGenerator}.</li>
* </ul>
* </p>
*
* <p>
* An entity should not be merely a holder of attributes, but should also contain the behavior that is directly relevant to
Expand All @@ -37,6 +35,7 @@
*
* <p>
* Example:
* </p>
* <pre>
* public class SomeEntity implements Entity&lt;SomeEntityId&gt; {
* private SomeEntityId id;
Expand All @@ -63,7 +62,6 @@
* // Other methods
* }
* </pre>
* </p>
*
* @param <ID> the type of the entity identifier.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
*
* <p>
* Example:
* </p>
* <pre>
* public class SomeValueObject implements ValueObject {
* private String attribute1;
Expand All @@ -62,9 +63,21 @@
* // Other methods
* }
* </pre>
* </p>
*/
@DomainValueObject
public interface ValueObject extends Producible {
/**
* As per Domain-Driven Design semantics, value object equality must be computed on all its attributes.
*
* @param other other object.
* @return true if the other object is of the same class as this value object and if all attributes are equals, false otherwise.
*/
boolean equals(Object other);

/**
* As per Domain-Driven Design semantics, the hash code of a value object must be computed on all its attributes.
*
* @return a hash code value for this value object.
*/
int hashCode();
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
*
* <p>
* Examples of formulae in DNF:
* </p>
* <ul>
* <li>(A ∧ ¬B ∧ ¬C) ∨ (¬D ∧ E ∧ F)</li>
* <li>(A ∧ B) ∨ C</li>
* <li>A ∧ B</li>
* <li>A</li>
* </ul>
* </p>
*/
public interface SpecificationBuilder {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public interface SpecificationPicker<T, SELECTOR extends BaseSelector> {
* Picks a general purpose equality specification that will be satisfied if the current selection equals to the specified value.
*
* @param value the value to be equal to.
* @param <V> the type of the value.
* @return the next operation of the builder DSL, allowing to combine this specification with another one.
*/
<V> OperatorPicker<T, SELECTOR> equalTo(V value);
Expand All @@ -55,6 +56,7 @@ public interface SpecificationPicker<T, SELECTOR extends BaseSelector> {
* specified value.
*
* @param value the value to be greater than.
* @param <V> the type of the value.
* @return the next operation of the builder DSL, allowing to combine this specification with another one.
*/
<V extends Comparable<? super V>> OperatorPicker<T, SELECTOR> greaterThan(V value);
Expand All @@ -64,6 +66,7 @@ public interface SpecificationPicker<T, SELECTOR extends BaseSelector> {
* equal to the specified value.
*
* @param value the value to be greater than or equal to.
* @param <V> the type of the value.
* @return the next operation of the builder DSL, allowing to combine this specification with another one.
*/
<V extends Comparable<? super V>> OperatorPicker<T, SELECTOR> greaterThanOrEqualTo(V value);
Expand All @@ -73,6 +76,7 @@ public interface SpecificationPicker<T, SELECTOR extends BaseSelector> {
* specified value.
*
* @param value the value to be less than.
* @param <V> the type of the value.
* @return the next operation of the builder DSL, allowing to combine this specification with another one.
*/
<V extends Comparable<? super V>> OperatorPicker<T, SELECTOR> lessThan(V value);
Expand All @@ -82,6 +86,7 @@ public interface SpecificationPicker<T, SELECTOR extends BaseSelector> {
* equal to the specified value.
*
* @param value the value to be less than or equal to.
* @param <V> the type of the value.
* @return the next operation of the builder DSL, allowing to combine this specification with another one.
*/
<V extends Comparable<? super V>> OperatorPicker<T, SELECTOR> lessThanOrEqualTo(V value);
Expand All @@ -92,6 +97,7 @@ public interface SpecificationPicker<T, SELECTOR extends BaseSelector> {
*
* @param leftValue the value to be greater than.
* @param rightValue the value to be less than.
* @param <V> the type of the value.
* @return the next operation of the builder DSL, allowing to combine this specification with another one.
*/
<V extends Comparable<? super V>> OperatorPicker<T, SELECTOR> between(V leftValue, V rightValue);
Expand All @@ -104,6 +110,7 @@ public interface SpecificationPicker<T, SELECTOR extends BaseSelector> {
* @param rightValue the value to be less than (or equal to if rightInclusive is true).
* @param leftInclusive if true, the leftValue argument will be included in the interval, otherwise it will be excluded.
* @param rightInclusive if true, the rightValue argument will be included in the interval, otherwise it will be excluded.
* @param <V> the type of the value.
* @return the next operation of the builder DSL, allowing to combine this specification with another one.
*/
<V extends Comparable<? super V>> OperatorPicker<T, SELECTOR> between(V leftValue, V rightValue, boolean leftInclusive, boolean rightInclusive);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
* public class SomeClass {
* {@literal @}Inject
* {@literal @}SomeQualifier
* private Repository&lt;SomeAggregate, SomeId&gt someAggregateRepository;
* private Repository&lt;SomeAggregate, SomeId&gt; someAggregateRepository;
* }
* </pre>
*/
Expand Down

0 comments on commit aab5983

Please sign in to comment.