-
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
270 additions
and
105 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
33 changes: 33 additions & 0 deletions
33
...andra/src/main/kotlin/_package_/_entityPackage_/repository/_entityClass_Repository.kt.ejs
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,33 @@ | ||
<%# | ||
Copyright 2013-2024 the original author or authors from the JHipster project. | ||
This file is part of the JHipster project, see https://www.jhipster.tech/ | ||
for more information. | ||
Licensed under the Apache License, Version 2.0 (the " | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
-%> | ||
package <%= entityAbsolutePackage %>.repository | ||
import <%= entityAbsolutePackage %>.domain.<%= persistClass %> | ||
import org.springframework.data.cassandra.repository.ReactiveCassandraRepository | ||
import org.springframework.stereotype.Repository | ||
<%_ if (primaryKey.typeUUID) { _%> | ||
import java.util.UUID | ||
<%_ } _%> | ||
/** | ||
* <%= springDataDescription %> repository for the <%= persistClass %> entity. | ||
*/ | ||
@Repository | ||
interface <%= entityClass %>Repository: <% if (reactive) { %>Reactive<% } %>CassandraRepository<<%= persistClass %>, <%= primaryKey.type %>> {} |
56 changes: 56 additions & 0 deletions
56
...ngodb/src/main/kotlin/_package_/_entityPackage_/repository/_entityClass_Repository.kt.ejs
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,56 @@ | ||
<%# | ||
Copyright 2013-2024 the original author or authors from the JHipster project. | ||
This file is part of the JHipster project, see https://www.jhipster.tech/ | ||
for more information. | ||
Licensed under the Apache License, Version 2.0 (the " | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
-%> | ||
package <%= entityAbsolutePackage %>.repository | ||
import <%= entityAbsolutePackage %>.domain.<%= persistClass %> | ||
<%_ if (implementsEagerLoadApis) { _%> | ||
import org.springframework.data.domain.Page | ||
import org.springframework.data.domain.Pageable | ||
<%_ } _%> | ||
import org.springframework.data.mongodb.repository.Query | ||
import org.springframework.data.mongodb.repository.MongoRepository | ||
import org.springframework.stereotype.Repository | ||
<%_ if (implementsEagerLoadApis) { _%> | ||
import java.util.Optional | ||
<%_ } _%> | ||
<%_ if (primaryKey.typeUUID) { _%> | ||
import java.util.UUID | ||
<%_ } _%> | ||
/** | ||
* <%= springDataDescription %> repository for the <%= persistClass %> entity. | ||
*/ | ||
<%_ if (!implementsEagerLoadApis) { _%> | ||
@Suppress("unused") | ||
<%_ } _%> | ||
@Repository | ||
interface <%=entityClass%>Repository : MongoRepository<<%=persistClass%>, <%= primaryKey.type %>> { | ||
<%_ if (implementsEagerLoadApis) { _%> | ||
@Query("{}") | ||
fun findAllWithEagerRelationships(pageable: Pageable): Page<<%= persistClass %>> | ||
@Query("{}") | ||
fun findAllWithEagerRelationships(): MutableList<<%= persistClass %>> | ||
@Query("{'id': ?0}") | ||
fun findOneWithEagerRelationships(id: <%= primaryKey.type %>): Optional<<%= persistClass %>> | ||
<%_ } _%> | ||
} |
62 changes: 62 additions & 0 deletions
62
.../main/kotlin/_package_/_entityPackage_/repository/_entityClass_Repository_reactive.kt.ejs
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,62 @@ | ||
<%# | ||
Copyright 2013-2024 the original author or authors from the JHipster project. | ||
This file is part of the JHipster project, see https://www.jhipster.tech/ | ||
for more information. | ||
Licensed under the Apache License, Version 2.0 (the " | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
-%> | ||
package <%= entityAbsolutePackage %>.repository | ||
import <%= entityAbsolutePackage %>.domain.<%= persistClass %> | ||
<%_ if (!paginationNo || implementsEagerLoadApis) { _%> | ||
import org.springframework.data.domain.Pageable | ||
<%_ } _%> | ||
<%_ if (implementsEagerLoadApis) { _%> | ||
import org.springframework.data.mongodb.repository.Query | ||
<%_ } _%> | ||
import org.springframework.data.mongodb.repository.ReactiveMongoRepository | ||
import org.springframework.stereotype.Repository | ||
<%_ if (!paginationNo || implementsEagerLoadApis) { _%> | ||
import reactor.core.publisher.Flux | ||
<%_ } _%> | ||
<%_ if (implementsEagerLoadApis) { _%> | ||
import reactor.core.publisher.Mono | ||
<%_ } _%> | ||
<%_ if (primaryKey.typeUUID) { _%> | ||
import java.util.UUID | ||
<%_ } _%> | ||
/** | ||
* <%= springDataDescription %> repository for the <%= persistClass %> entity. | ||
*/ | ||
@SuppressWarnings("unused") | ||
@Repository | ||
interface <%= entityClass %>Repository: ReactiveMongoRepository<<%= persistClass %>, <%= primaryKey.type %>> { | ||
<%_ if (!paginationNo) { _%> | ||
fun findAllBy(pageable: Pageable?): Flux<<%= persistClass %>> | ||
<%_ } _%> | ||
<%_ if (implementsEagerLoadApis) { _%> | ||
@Query("{}") | ||
fun findAllWithEagerRelationships(pageable: Pageable): Flux<<%= persistClass %>> | ||
@Query("{}") | ||
fun findAllWithEagerRelationships(): Flux<<%= persistClass %>> | ||
@Query("{'id': ?0}"") | ||
fun findOneWithEagerRelationships(id: <%= primaryKey.type %>): Mono<<%= persistClass %>> | ||
<%_ } _%> | ||
} |
80 changes: 80 additions & 0 deletions
80
...neo4j/src/main/kotlin/_package_/_entityPackage_/repository/_entityClass_Repository.kt.ejs
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,80 @@ | ||
<%# | ||
Copyright 2013-2024 the original author or authors from the JHipster project. | ||
This file is part of the JHipster project, see https://www.jhipster.tech/ | ||
for more information. | ||
Licensed under the Apache License, Version 2.0 (the " | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
-%> | ||
package <%= entityAbsolutePackage %>.repository | ||
<%_ if (reactive) { _%> | ||
import <%= entityAbsolutePackage %>.domain.<%= persistClass %> | ||
import org.springframework.data.neo4j.repository.ReactiveNeo4jRepository | ||
import org.springframework.data.neo4j.repository.query.Query | ||
<%_ if (!paginationNo || implementsEagerLoadApis) { _%> | ||
import org.springframework.data.domain.Pageable | ||
<%_ } _%> | ||
import org.springframework.stereotype.Repository | ||
<%_ if (!paginationNo || implementsEagerLoadApis) { _%> | ||
import reactor.core.publisher.Flux | ||
<%_ } _%> | ||
<%_ if (implementsEagerLoadApis) { _%> | ||
import reactor.core.publisher.Mono | ||
<%_ } _%> | ||
<%_ if (primaryKey.typeUUID) { _%> | ||
import java.util.UUID | ||
<%_ } _%> | ||
/** | ||
* <%= springDataDescription %> repository for the <%= persistClass %> entity. | ||
*/ | ||
@SuppressWarnings("unused") | ||
@Repository | ||
interface <%= entityClass %>Repository: ReactiveNeo4jRepository<<%= persistClass %>, <%= primaryKey.type %>> { | ||
<%_ if (!paginationNo) { _%> | ||
fun findAllBy(pageable: Pageable?): Flux<<%= persistClass %>> | ||
<%_ } _%> | ||
<%_ if (implementsEagerLoadApis) { _%> | ||
@Query("MATCH (n:<%= persistClass %>)<-[]-(m) RETURN n,m") | ||
fun findAllWithEagerRelationships(pageable: Pageable): Flux<<%= persistClass %>> | ||
@Query("MATCH (n:<%= persistClass %>)<-[]-(m) RETURN n,m") | ||
fun findAllWithEagerRelationships(): Flux<<%= persistClass %>> | ||
@Query("MATCH (e:<%= persistClass %> {id: $id}) RETURN e") | ||
fun findOneWithEagerRelationships(id: <%= primaryKey.type %>): Mono<<%= persistClass %>> | ||
<%_ } _%> | ||
} | ||
<%_ } else { _%> | ||
import <%= entityAbsolutePackage %>.domain.<%= persistClass %> | ||
<%_ if (implementsEagerLoadApis) { _%> | ||
import org.springframework.data.domain.Page | ||
import org.springframework.data.domain.Pageable | ||
<%_ } _%> | ||
import org.springframework.data.neo4j.repository.<% if (reactive) { %>Reactive<% } %>Neo4jRepository | ||
import org.springframework.stereotype.Repository | ||
<%_ if (primaryKey.typeUUID) { _%> | ||
import java.util.UUID | ||
<%_ } _%> | ||
/** | ||
* <%= springDataDescription %> repository for the <%= persistClass %> entity. | ||
*/ | ||
@Repository | ||
interface <%=entityClass%>Repository : <% if (reactive) { %>Reactive<% } %>Neo4jRepository<<%=persistClass%>, <%= primaryKey.type %>><% if (jpaMetamodelFiltering) { %>, JpaSpecificationExecutor<<%= persistClass %>><% } %> {} | ||
<%_ } _%> |
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.