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

com.sleepycat.persist.model.Relationship Maven / Gradle / Ivy

The newest version!
/*-
 * Copyright (C) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
 *
 * This file was distributed by Oracle as part of a version of Oracle Berkeley
 * DB Java Edition made available at:
 *
 * http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html
 *
 * Please see the LICENSE file included in the top-level directory of the
 * appropriate version of Oracle Berkeley DB Java Edition for a copy of the
 * license and additional information.
 */

package com.sleepycat.persist.model;

/**
 * Defines the relationship between instances of the entity class and the
 * secondary keys.  This can be specified using a {@link SecondaryKey#relate}
 * annotation.
 *
 * @author Mark Hayes
 */
public enum Relationship {

    /**
     * Relates many entities to one secondary key.
     *
     * 

The secondary index will have non-unique keys; in other words, * duplicates will be allowed.

* *

The secondary key field is singular, in other words, it may not be an * array or collection type.

*/ MANY_TO_ONE, /** * Relates one entity to many secondary keys. * *

The secondary index will have unique keys, in other words, duplicates * will not be allowed.

* *

The secondary key field must be an array or collection type.

*/ ONE_TO_MANY, /** * Relates many entities to many secondary keys. * *

The secondary index will have non-unique keys, in other words, * duplicates will be allowed.

* *

The secondary key field must be an array or collection type.

*/ MANY_TO_MANY, /** * Relates one entity to one secondary key. * *

The secondary index will have unique keys, in other words, duplicates * will not be allowed.

* *

The secondary key field is singular, in other words, it may not be an * array or collection type.

*/ ONE_TO_ONE; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy