org.eclipse.persistence.mappings.ContainerMapping Maven / Gradle / Ivy
Show all versions of eclipselink Show documentation
/*
* Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0,
* or the Eclipse Distribution License v. 1.0 which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
*/
// Contributors:
// Oracle - initial API and implementation from Oracle TopLink
package org.eclipse.persistence.mappings;
import org.eclipse.persistence.internal.queries.*;
/**
* Interface used by clients to interact
* with the assorted mappings that use ContainerPolicy
.
*
* @see org.eclipse.persistence.internal.queries.ContainerPolicy
*
* @author Big Country
* @since TOPLink/Java 4.0
*/
public interface ContainerMapping {
/**
* PUBLIC:
* Return the mapping's container policy.
*/
ContainerPolicy getContainerPolicy();
/**
* PUBLIC:
* Set the mapping's container policy.
*/
void setContainerPolicy(ContainerPolicy containerPolicy);
/**
* PUBLIC:
* Configure the mapping to use an instance of the specified container class
* to hold the target objects.
* The container class must implement (directly or indirectly) the
* java.util.Collection
interface.
*/
void useCollectionClass(Class concreteClass);
/**
* PUBLIC:
* Configure the mapping to use an instance of the specified container class
* to hold the target objects.
*
The container class must implement (directly or indirectly) the
* java.util.Collection
interface.
*/
void useCollectionClassName(String concreteClass);
/**
* PUBLIC:
* Configure the mapping to use an instance of the specified container class
* to hold the target objects.
*
The container class must implement (directly or indirectly) the
* java.util.List
interface.
*/
void useListClassName(String concreteClass);
/**
* PUBLIC:
* Configure the mapping to use an instance of the specified container class
* to hold the target objects. The key used to index a value in the
* Map
is the value returned by a call to the specified
* zero-argument method.
* The method must be implemented by the class (or a superclass) of any
* value to be inserted into the Map
.
*
The container class must implement (directly or indirectly) the
* java.util.Map
interface.
*
To facilitate resolving the method, the mapping's referenceClass
* must set before calling this method.
*/
void useMapClass(Class concreteClass, String methodName);
/**
* PUBLIC:
* Configure the mapping to use an instance of the specified container class
* to hold the target objects. The key used to index a value in the
* Map
is the value returned by a call to the specified
* zero-argument method.
* The method must be implemented by the class (or a superclass) of any
* value to be inserted into the Map
.
*
The container class must implement (directly or indirectly) the
* java.util.Map
interface.
*
To facilitate resolving the method, the mapping's referenceClass
* must set before calling this method.
*/
void useMapClassName(String concreteClass, String methodName);
}