Skip to content

Commit 5e09515

Browse files
committed
Code format.
1 parent 16b5641 commit 5e09515

35 files changed

Lines changed: 2749 additions & 2769 deletions

src/main/java/org/springframework/data/ebean/annotation/Modifying.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,15 @@
1616

1717
package org.springframework.data.ebean.annotation;
1818

19-
import java.lang.annotation.Documented;
20-
import java.lang.annotation.ElementType;
21-
import java.lang.annotation.Retention;
22-
import java.lang.annotation.RetentionPolicy;
23-
import java.lang.annotation.Target;
19+
import java.lang.annotation.*;
2420

2521
/**
26-
* Indicates a method should be regarded as Update{@link io.ebean.UpdateQuery} or SqlUpdate {@link io.ebean.SqlUpdate}.
22+
* Indicates a method should be regarded as Update{@link io.ebean.UpdateQuery} or SqlUpdate{@link io.ebean.SqlUpdate}.
2723
*
2824
* @author Xuegui Yuan
2925
*/
3026
@Retention(RetentionPolicy.RUNTIME)
31-
@Target( {ElementType.METHOD, ElementType.ANNOTATION_TYPE})
27+
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
3228
@Documented
3329
public @interface Modifying {
3430
}

src/main/java/org/springframework/data/ebean/annotation/Query.java

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,44 +16,34 @@
1616

1717
package org.springframework.data.ebean.annotation;
1818

19-
import java.lang.annotation.Documented;
20-
import java.lang.annotation.ElementType;
21-
import java.lang.annotation.Retention;
22-
import java.lang.annotation.RetentionPolicy;
23-
import java.lang.annotation.Target;
2419
import org.springframework.data.annotation.QueryAnnotation;
2520

21+
import java.lang.annotation.*;
22+
2623
/**
2724
* Annotation to declare finder queries directly on repository methods.
2825
*
2926
* @author Xuegui Yuan
3027
*/
3128
@Retention(RetentionPolicy.RUNTIME)
32-
@Target( {ElementType.METHOD, ElementType.ANNOTATION_TYPE})
29+
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
3330
@QueryAnnotation
3431
@Documented
3532
public @interface Query {
3633

37-
/**
38-
* Defines the Ebean query to be executed when the annotated method is called.
39-
*/
40-
String value() default "";
41-
42-
/**
43-
* Configures whether the given query is a SqlQuery. Defaults to {@literal false}.
44-
*/
45-
boolean nativeQuery() default false;
34+
/**
35+
* Defines the Ebean query to be executed when the annotated method is called.
36+
*/
37+
String value() default "";
4638

47-
/**
48-
* The named query to be used. If not defined, a {@link javax.persistence.NamedQuery} with name of
49-
* {@code $ domainClass}.${queryMethodName}} will be used.
50-
*/
51-
String name() default "";
39+
/**
40+
* Configures whether the given query is a SqlQuery. Defaults to {@literal false}.
41+
*/
42+
boolean nativeQuery() default false;
5243

53-
/**
54-
* Parse the string to return a FetchPath,
55-
* format like (a,b,c(d,e),f(g)) where "c" is a path containing "d" and "e" and "f" is a
56-
* path containing "g" and the root path contains "a","b","c" and "f".
57-
*/
58-
String fetchPath() default "";
44+
/**
45+
* The named query to be used. If not defined, a {@link javax.persistence.NamedQuery} with name of
46+
* {@code $ domainClass}.${queryMethodName}} will be used.
47+
*/
48+
String name() default "";
5949
}

src/main/java/org/springframework/data/ebean/domain/AbstractAggregateRoot.java

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@
1616

1717
package org.springframework.data.ebean.domain;
1818

19+
import org.springframework.data.domain.AfterDomainEventPublication;
20+
import org.springframework.data.domain.DomainEvents;
21+
import org.springframework.util.Assert;
22+
23+
import javax.persistence.MappedSuperclass;
24+
import javax.persistence.Transient;
1925
import java.util.ArrayList;
2026
import java.util.Collection;
2127
import java.util.Collections;
2228
import java.util.List;
23-
import javax.persistence.MappedSuperclass;
24-
import javax.persistence.Transient;
25-
import org.springframework.data.domain.AfterDomainEventPublication;
26-
import org.springframework.data.domain.DomainEvents;
27-
import org.springframework.util.Assert;
2829

2930
/**
3031
* Abstract base class for aggregate root, aggregate extends {@link AbstractEntity} and add
@@ -34,37 +35,37 @@
3435
*/
3536
@MappedSuperclass
3637
public abstract class AbstractAggregateRoot extends AbstractEntity {
37-
@Transient
38-
private transient final List<DomainEvent> domainEvents = new ArrayList<>();
38+
@Transient
39+
private transient final List<DomainEvent> domainEvents = new ArrayList<>();
3940

40-
/**
41-
* Registers the given event object for publication on a call to a Spring Data repository's save methods.
42-
*
43-
* @param event must not be {@literal null}.
44-
* @return the event that has been added.
45-
*/
46-
protected <T extends DomainEvent> T registerEvent(T event) {
47-
Assert.notNull(event, "Domain event must not be null!");
41+
/**
42+
* Registers the given event object for publication on a call to a Spring Data repository's save methods.
43+
*
44+
* @param event must not be {@literal null}.
45+
* @return the event that has been added.
46+
*/
47+
protected <T extends DomainEvent> T registerEvent(T event) {
48+
Assert.notNull(event, "Domain event must not be null!");
4849

49-
this.domainEvents.add(event);
50-
return event;
51-
}
50+
this.domainEvents.add(event);
51+
return event;
52+
}
5253

53-
/**
54-
* Clears all domain events currently held. Usually invoked by the infrastructure in place in Spring Data
55-
* repositories.
56-
*/
57-
@AfterDomainEventPublication
58-
protected void clearDomainEvents() {
59-
this.domainEvents.clear();
60-
}
54+
/**
55+
* Clears all domain events currently held. Usually invoked by the infrastructure in place in Spring Data
56+
* repositories.
57+
*/
58+
@AfterDomainEventPublication
59+
protected void clearDomainEvents() {
60+
this.domainEvents.clear();
61+
}
6162

62-
/**
63-
* All domain events currently captured by the aggregate.
64-
*/
65-
@DomainEvents
66-
protected Collection<DomainEvent> domainEvents() {
67-
return Collections.unmodifiableList(domainEvents);
68-
}
63+
/**
64+
* All domain events currently captured by the aggregate.
65+
*/
66+
@DomainEvents
67+
protected Collection<DomainEvent> domainEvents() {
68+
return Collections.unmodifiableList(domainEvents);
69+
}
6970

7071
}

0 commit comments

Comments
 (0)