ModsJava
SimpleORM
Java mod listed for Minecraft 1.8–1.19. Downloads from the MC Java Mods app on Android.
⬇ Download on Spigot
SimpleORM
A Bukkit plugin provides a central ORM Manager. It have no reload issue from Bukkit's build-in ORM support.
Developer
A Bukkit plugin provides a central ORM Manager. It have no reload issue from Bukkit's build-in ORM support.
If you want to use this library in your own plugin. code your main class like this. See Ebean ORM
Code (Java):
public
class MyPlugin
extends JavaPlugin
{
@Override
public void onEnable ( ) {
/*
* If you dont whan to use manager object, follow this
* code. NOT RECOMMEND.
*
* EbeanHandler handler = new EbeanHandler();
* handler.setDriver("com.mysql.jdbc.Driver");
* handler.setUrl("jdbc:mysql://localhost:3306/database");
* handler.setUserName("userName");
* handler.setPassword("password");
*
* Use manager object will gen and read config field automatic.
* and will store handler into a map, your can get it even
* your plugin reload.
*
*/
// EbeanManager manager = EbeanManager.DEFAULT;
EbeanManager manager = getServer ( ). getServicesManager ( )
. getRegistration (EbeanManager. class )
. getProvider ( ) ;
EbeanHandler handler = manager. getHandler ( this ) ;
if ( !handler. isInitialize ( ) ) {
handler. define (MyClass. class ) ;
handler. define (MyOther. class ) ;
try {
handler. initialize ( ) ;
} catch ( Exception e ) {
// Do what you want to do.
}
}
// This function will inject into Bukkit's build-in
// ORM support.
handler. reflect ( ) ;
// This function will try to create not exists tables.
handler. install ( ) ;
// Injected build-in method. Return initialized
// Ebean server.
EbeanServer server = this. getDatabase ( ) ;
// EbeanServer server = handler.getServer();
// ...
}
public void function ( ) {
MyClass my = getDatabase. find (MyClass. class )
. where ( )
. eq ( "name", "zmy" )
. findUnique ( ) ;
System. out. print (my. getName ( ) ) ;
// ...
}
}
Code your entity class like this. See More Example.
@ Entity
@Table (name = "o_table" )
public class MyClass {
@Id
private int id ;
@Column
private String name ;
// Put getter and setter.
}
@Override
public void onEnable ( ) {
/*
* If you dont whan to use manager object, follow this
* code. NOT RECOMMEND.
*
* EbeanHandler handler = new EbeanHandler();
* handler.setDriver("com.mysql.jdbc.Driver");
* handler.setUrl("jdbc:mysql://localhost:3306/database");
* handler.setUserName("userName");
* handler.setPassword("password");
*
* Use manager object will gen and read config field automatic.
* and will store handler into a map, your can get it even
* your plugin reload.
*
*/
// EbeanManager manager = EbeanManager.DEFAULT;
EbeanManager manager = getServer ( ). getServicesManager ( )
. getRegistration (EbeanManager. class )
. getProvider ( ) ;
EbeanHandler handler = manager. getHandler ( this ) ;
if ( !handler. isInitialize ( ) ) {
handler. define (MyClass. class ) ;
handler. define (MyOther. class ) ;
try {
handler. initialize ( ) ;
} catch ( Exception e ) {
// Do what you want to do.
}
}
// This function will inject into Bukkit's build-in
// ORM support.
handler. reflect ( ) ;
// This function will try to create not exists tables.
handler. install ( ) ;
// Injected build-in method. Return initialized
// Ebean server.
EbeanServer server = this. getDatabase ( ) ;
// EbeanServer server = handler.getServer();
// ...
}
public void function ( ) {
MyClass my = getDatabase. find (MyClass. class )
. where ( )
. eq ( "name", "zmy" )
. findUnique ( ) ;
System. out. print (my. getName ( ) ) ;
// ...
}
}
Code your entity class like this. See More Example.
@ Entity
@Table (name = "o_table" )
public class MyClass {
@Id
private int id ;
@Column
private String name ;
// Put getter and setter.
}
Code (Java):
Configure field will create automatic in your plguin's default config file. Like this.
Code (YAML):
dataSource:
driver : com.mysql.jdbc.Driver
url : jdbc:mysql://localhost/database
userName : username
password : password
driver : com.mysql.jdbc.Driver
url : jdbc:mysql://localhost/database
userName : username
password : password
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.8, 1.9, 1.10
- 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.
SimpleORM is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.9, 1.10, 1.11 and newer. Downloaded 674 times (via Spigot). Download it and open it directly in the game.