Home›Java›Mods›en2do (MongoDB Framework | Easy-To-Use | Async)
en2do (MongoDB Framework | Easy-To-Use | Async)
ModsJava

en2do (MongoDB Framework | Easy-To-Use | Async)

Java mod listed for Minecraft 1.13–1.19. Download on the author's site.

⬇ Download on Spigot
en2do is short for "Entity-To-Document" .

Are you tired doing the same value mapping task for java classes every time you operate with your mongodb database?

Don't worry! en2do is here to help! The biggest pro of en2do is automatic class mapping to mongodb documents using the mongodb pojo codec, which supports even records from the newest java releases.

It's an entity framework for MongoDB 6.0 in Java 11 - 17, heavily inspired by the popular spring-framework and their spring-data library.


But it has a tone of features, besides automatic mapping
For further information see

How does it work?

1. Add it as dependency:
Code (Kotlin):
repositories {
    maven {
        name 'koboo-reposilite'
        url 'https://reposilite.koboo.eu/releases'
    }
}

dependencies {
    implementation 'eu.koboo:en2do:2.2.0'
}
2. Create the MongoManager:

Code (Java):
public class Application {

    public static void main ( String [ ] args ) {
        MongoManager manager = new MongoManager ( ) ;
    }
}
3. Create an Entity
Code (Java):
mport eu. koboo. en2do. annotation. *;
import lombok.* ;

import java.util.* ;

@Getter // from lombok - required (to access fields)
@Setter // from lombok - required (to change fields)
@NoArgsConstructor // from lombok - required (for mongodb, to create instances)
@FieldDefaults (level = AccessLevel. PRIVATE ) // from lombok - optional
@ToString // from lombok
public class Customer {

    // from en2do - unique identifier (can be String, int, long, UUID or any object)
    // this will also create an index on this field to speed up queries on the unique identifier
    @Id
    UUID uniqueId ;

    int customerId ;
    String firstName ;
    String lastName ;
    String birthday ;
    String street ;
    int houseNumber ;
    Integer postalCode ;
    String city ;
    Long phoneNumber ;
    double balance ;
    List <Order > orders ;
}
4. Create the Repository:
Code (Java):
import eu.koboo.en2do.* ;

import java.util.* ;

@ Collection ( "customer_repository" )
public interface CustomerRepository extends Repository <Customer, UUID > {

}
5. Packing all together:
Code (Java):
public class Application {

    public static void main ( String [ ] args ) {
        MongoManager manager = new MongoManager ( ) ;
        CustomerRepository repository = manager. create (CustomerRepository. class ) ;
    }
}


Resource Icon Source
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

en2do (MongoDB Framework | Easy-To-Use | Async) is a free Minecraft Java mod. Compatible with Minecraft 1.13, 1.14, 1.15, 1.16 and newer. Downloaded 361 times (via Spigot). Download it and open it directly in the game.

Explore more