Skip to content

Commit

Permalink
chopped down mongodb compile and runtime module
Browse files Browse the repository at this point in the history
a lot of API refinements and simplifications, but overall the same
removed common classes that are not absolutely needed
  • Loading branch information
elucash committed Feb 11, 2015
1 parent 119a431 commit d5af729
Show file tree
Hide file tree
Showing 14 changed files with 518 additions and 341 deletions.
134 changes: 0 additions & 134 deletions common/src/org/immutables/common/repository/Id.java

This file was deleted.

104 changes: 104 additions & 0 deletions mongo/pom.xml
@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>immutables</artifactId>
<groupId>org.immutables</groupId>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>immutables-mongo</artifactId>
<name>${project.groupId}.${project.artifactId}</name>
<description>
Annotation and runtime support to generate Mongodb repositories.
Mongo java driver, Gson, Jackson and bson4jackson and Guava are required runtime dependencies,
which included as transitive dependencies.
</description>

<dependencies>
<dependency>
<!-- Compile only generate api -->
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<!-- Compile only generate sample adapters -->
<groupId>org.immutables</groupId>
<artifactId>value-standalone</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>immutables-gson</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>metainf</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<!-- Guava used as base utility library.-->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
<!-- Used to document and statically verify code properties.
jsr305 annotations needed to compile generated classes. -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>1.3.9</version>
</dependency>
<dependency>
<!-- Needed for bson marshal -->
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<!-- We are using some classes from there, but we don't use binding functionality -->
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>2.12.4</version>
</dependency>
<dependency>
<!-- BSON reading writing -->
<groupId>de.undercouch</groupId>
<artifactId>bson4jackson</artifactId>
<version>2.4.0</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>testing</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
@@ -1,5 +1,5 @@
/* /*
Copyright 2013-2014 Immutables Authors and Contributors Copyright 2013-2015 Immutables Authors and Contributors
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,7 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package org.immutables.common.concurrent; package org.immutables.mongo.concurrent;


import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.util.concurrent.AsyncFunction; import com.google.common.util.concurrent.AsyncFunction;
Expand Down
@@ -1,5 +1,5 @@
/* /*
Copyright 2013-2014 Immutables Authors and Contributors Copyright 2013-2015 Immutables Authors and Contributors
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,7 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package org.immutables.common.concurrent; package org.immutables.mongo.concurrent;


import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.util.concurrent.AsyncFunction; import com.google.common.util.concurrent.AsyncFunction;
Expand Down Expand Up @@ -87,12 +87,12 @@ public FluentFuture<V> withExecutor(Executor executor) {
if (this.executor == executor) { if (this.executor == executor) {
return this; return this;
} }
return new WrapingFluentFuture<V>(delegate(), executor); return new WrapingFluentFuture<>(delegate(), executor);
} }


@Override @Override
public <T> FluentFuture<T> lazyTransform(Function<? super V, ? extends T> function) { public <T> FluentFuture<T> lazyTransform(Function<? super V, ? extends T> function) {
return new LazyTransformedFluentFuture<T, V>(this, function, executor); return new LazyTransformedFluentFuture<>(this, function, executor);
} }
} }


Expand Down Expand Up @@ -145,6 +145,6 @@ public static <V> FluentFuture<V> from(ListenableFuture<V> future) {
if (future instanceof FluentFuture<?>) { if (future instanceof FluentFuture<?>) {
return (FluentFuture<V>) future; return (FluentFuture<V>) future;
} }
return new WrapingFluentFuture<V>(future, MoreExecutors.directExecutor()); return new WrapingFluentFuture<>(future, MoreExecutors.directExecutor());
} }
} }
@@ -1,5 +1,5 @@
/* /*
Copyright 2013-2014 Immutables Authors and Contributors Copyright 2013-2015 Immutables Authors and Contributors
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
Expand All @@ -14,4 +14,4 @@
limitations under the License. limitations under the License.
*/ */
@javax.annotation.ParametersAreNonnullByDefault @javax.annotation.ParametersAreNonnullByDefault
package org.immutables.common.concurrent; package org.immutables.mongo.concurrent;

0 comments on commit d5af729

Please sign in to comment.