net.binggl.ninja.mongodb.MorphiaModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ninja-mongodb-module Show documentation
Show all versions of ninja-mongodb-module Show documentation
This is an easly plugable module for the Ninja web framework to work with MongoDB and optional moprhia (a MongoDB ORM)
by providing convinent services, all required dependencies and some testing utilities. The original author is Sven Kubiak (https://github.com/svenkubiak).
This is a recreation of the module because the orginal module/github repository was deleted.
package net.binggl.ninja.mongodb;
import java.io.Serializable;
import org.bson.types.ObjectId;
import org.mongodb.morphia.annotations.Id;
import org.mongodb.morphia.annotations.Property;
/**
* Superclass for mapping mongodb morphia models
* @author bihe (original author: skubiak)
*
*/
public class MorphiaModel implements Serializable {
private static final long serialVersionUID = -3141621127850129919L;
@Id
@Property("_id")
protected ObjectId objectId;
public ObjectId getId() {
return this.objectId;
}
public void setId(ObjectId objectId) {
this.objectId = objectId;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy