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

org.apache.torque.engine.database.model.ForeignKey Maven / Gradle / Ivy

package org.apache.torque.engine.database.model;

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

import java.util.ArrayList;
import java.util.Collections;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;

import org.apache.commons.collections.map.ListOrderedMap;
import org.xml.sax.Attributes;

/**
 * A class for information about foreign keys of a table.
 *
 * @author Fedor
 * @author Daniel Rall
 * @author \n");

        for (int i = 0; i < localColumns.size(); i++)
        {
            result.append("        \n");
        }
        result.append("    \n");
        return result.toString();
    }

    /**
     * Add an XML Specified option key/value pair to this element's option set.
     *
     * @param key the key of the option.
     * @param value the value of the option.
     */
    public void addOption(String key, String value)
    {
        options.put(key, value);
    }

    /**
     * Get the value that was associated with this key in an XML option
     * element.
     *
     * @param key the key of the option.
     * @return The value for the key or a null.
     */
    public String getOption(String key)
    {
        return (String) options.get(key);
    }

    /**
     * Gets the full ordered hashtable array of items specified by XML option
     * statements under this element.

* * Note, this is not thread save but since it's only used for * generation which is single threaded, there should be minimum * danger using this in Velocity. * * @return An Map of all options. Will not be null but may be empty. */ public Map getOptions() { return options; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy