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

org.eclipse.persistence.platform.database.oracle.plsql.PLSQLCollection Maven / Gradle / Ivy

There is a newer version: 4.0.2
Show newest version
/*
 * 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 - Dec 2008 proof-of-concept
package org.eclipse.persistence.platform.database.oracle.plsql;

//javase imports
import static java.sql.Types.ARRAY;

import java.util.ArrayList;

//EclipseLink imports
import org.eclipse.persistence.internal.helper.ComplexDatabaseType;
import org.eclipse.persistence.internal.helper.DatabaseType;

/**
 * PUBLIC: Marker interface for Oracle PL/SQL Collections (Nested Tables and Varrays)
 *
 */
public class PLSQLCollection extends ComplexDatabaseType implements Cloneable, OraclePLSQLType {

    /**
     * Defines the database type of the value contained in the collection type.
     * 

i.e. the OF type. *

This could be a JDBC type, PLSQL type, or a PLSQL RECORD type. */ protected DatabaseType nestedType; protected boolean isNestedTable = false; /** * The default constructor sets javaType to ArrayList.class */ public PLSQLCollection() { super(); this.javaType = ArrayList.class; } @Override public PLSQLCollection clone() { PLSQLCollection clone = (PLSQLCollection)super.clone(); return clone; } @Override public boolean isCollection() { return true; } /** * Indicates if the instance represents a Nested Table (as opposed to Varray). * Defaults to false, i.e. Varray. */ public boolean isNestedTable() { return isNestedTable; } /** * Return the database type of the value contained in the collection type. */ public DatabaseType getNestedType() { return nestedType; } /** * Set boolean that indicates if the instance represents a Nested Table * (as opposed to Varray) */ public void setIsNestedTable(boolean isNestedTable) { this.isNestedTable = isNestedTable; } /** * Set the database type of the value contained in the collection type. *

i.e. the OF type. *

This could be a JDBC type, PLSQL type, or a PLSQL RECORD type. */ public void setNestedType(DatabaseType nestedType) { this.nestedType = nestedType; } @Override public int getSqlCode() { return ARRAY; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy