All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.binggl.ninja.mongodb.MorphiaModel Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 1.0.7
Show newest version
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