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 Spigoten2do 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
How does it work?
1. Add it as dependency:
2. Create the MongoManager:
3. Create an Entity
4. Create the Repository:
5. Packing all together:
Resource Icon Source
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
- Creating filter methods without implementing them
- Dynamic and Static sorting using a parameter or annotations
- Pagination on the database to reduce application resources
- Annotations to create new indexes on multiple fields
- Automatic deletion after a specific time (time-to-live indexes)
- Transforming/Renaming field and method names
- Ignoring fields in entities, which shouldn't be saved to the database
- Visit en2do on Github
- Found a bug? Open an issue
- Contribute by opening a Pull-Request
- Download the latest version
- Read the JavaDocs
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'
}
maven {
name 'koboo-reposilite'
url 'https://reposilite.koboo.eu/releases'
}
}
dependencies {
implementation 'eu.koboo:en2do:2.2.0'
}
Code (Java):
public
class Application
{
public static void main ( String [ ] args ) {
MongoManager manager = new MongoManager ( ) ;
}
}
public static void main ( String [ ] args ) {
MongoManager manager = new MongoManager ( ) ;
}
}
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 ;
}
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 ;
}
Code (Java):
import
eu.koboo.en2do.*
;
import java.util.* ;
@ Collection ( "customer_repository" )
public interface CustomerRepository extends Repository <Customer, UUID > {
}
import java.util.* ;
@ Collection ( "customer_repository" )
public interface CustomerRepository extends Repository <Customer, UUID > {
}
Code (Java):
public
class Application
{
public static void main ( String [ ] args ) {
MongoManager manager = new MongoManager ( ) ;
CustomerRepository repository = manager. create (CustomerRepository. class ) ;
}
}
public static void main ( String [ ] args ) {
MongoManager manager = new MongoManager ( ) ;
CustomerRepository repository = manager. create (CustomerRepository. class ) ;
}
}
Resource Icon Source
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.13, 1.14, 1.15
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
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.