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

io.rtr.alchemy.db.mongo.models.MetadataEntity Maven / Gradle / Ivy

There is a newer version: 2.2.14
Show newest version
package io.rtr.alchemy.db.mongo.models;

import dev.morphia.annotations.Entity;
import dev.morphia.annotations.Id;
import dev.morphia.annotations.Property;

/** An entity for storing additional metadata */
@Entity(value = "Metadata", useDiscriminator = false)
public class MetadataEntity {

    @Id public String name;

    @Property public Object value;

    // Required by Morphia
    @SuppressWarnings("unused")
    private MetadataEntity() {}

    private MetadataEntity(final String name, final Object value) {
        this.name = name;
        this.value = value;
    }

    public static MetadataEntity of(final String name, final Object value) {
        return new MetadataEntity(name, value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy