-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Architect teams to be the core focus
- Loading branch information
1 parent
405db63
commit 6b87dfc
Showing
20 changed files
with
200 additions
and
93 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
Binary file not shown.
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,6 +1,5 @@ | ||
#Sun Sep 20 21:28:53 EDT 2015 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-bin.zip |
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
29 changes: 24 additions & 5 deletions
29
src/main/groovy/com/recknerd/discgolf/configuration/DataRestConfiguration.groovy
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,19 +1,38 @@ | ||
package com.recknerd.discgolf.configuration | ||
|
||
import com.recknerd.discgolf.domain.entity.AceEntity | ||
import com.recknerd.discgolf.domain.entity.CourseEntity | ||
import com.recknerd.discgolf.domain.entity.CtpEntity | ||
import com.recknerd.discgolf.domain.entity.HoleEntity | ||
import com.recknerd.discgolf.domain.entity.LeagueEntity | ||
import com.recknerd.discgolf.domain.entity.PlayerEntity | ||
import com.recknerd.discgolf.domain.entity.RoundEntity | ||
import com.recknerd.discgolf.domain.entity.ScheduleEntity | ||
import com.recknerd.discgolf.domain.entity.ScoreEntity | ||
import com.recknerd.discgolf.domain.entity.TeamEntity | ||
import org.springframework.context.annotation.Configuration | ||
import org.springframework.data.rest.core.config.RepositoryRestConfiguration | ||
import org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration | ||
import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurerAdapter | ||
|
||
@Configuration | ||
class DataRestConfiguration extends RepositoryRestMvcConfiguration { | ||
class DataRestConfiguration extends RepositoryRestConfigurerAdapter { | ||
|
||
@Override | ||
protected void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) { | ||
void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) { | ||
super.configureRepositoryRestConfiguration(config) | ||
config.setReturnBodyOnCreate(true) | ||
config.setReturnBodyOnUpdate(true) | ||
config.exposeIdsFor(PlayerEntity) | ||
config.metadataConfiguration().setAlpsEnabled(false) | ||
config.exposeIdsFor( | ||
AceEntity, | ||
CourseEntity, | ||
CtpEntity, | ||
HoleEntity, | ||
LeagueEntity, | ||
PlayerEntity, | ||
RoundEntity, | ||
ScheduleEntity, | ||
ScoreEntity, | ||
TeamEntity | ||
) | ||
} | ||
} |
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
20 changes: 20 additions & 0 deletions
20
src/main/groovy/com/recknerd/discgolf/domain/PlayerInlineTeamsProjection.groovy
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,20 @@ | ||
/* | ||
* Copyright 2016 Lexmark International, Inc. All rights reserved. | ||
*/ | ||
|
||
package com.recknerd.discgolf.domain | ||
|
||
import com.recknerd.discgolf.domain.entity.PlayerEntity | ||
import com.recknerd.discgolf.domain.entity.TeamEntity | ||
import org.springframework.data.rest.core.config.Projection | ||
|
||
/** | ||
* | ||
*/ | ||
@Projection(name = "inlineTeams", types = [ PlayerEntity ]) | ||
interface PlayerInlineTeamsProjection { | ||
Long id | ||
String name | ||
String email | ||
Set<TeamEntity> teams | ||
} |
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.