Examples of DBIdentifier


Examples of org.apache.openjpa.jdbc.identifier.DBIdentifier

        } else {
            col = new Column(name, this);
        }
        if (_colMap == null)
            _colMap = new LinkedHashMap<DBIdentifier, Column>();
        DBIdentifier sName = DBIdentifier.toUpper(name);
        _colMap.put(sName, col);
        _cols = null;
        return col;
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.identifier.DBIdentifier

            col = schema.getSchemaGroup().newColumn(validName, this);
        else
            col = new Column(validName, this);
        if (_colMap == null)
            _colMap = new LinkedHashMap<DBIdentifier, Column>();
        DBIdentifier sName = DBIdentifier.toUpper(name);
        _colMap.put(sName, col);
        _cols = null;
        return col;
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.identifier.DBIdentifier

     */
    public boolean removeColumn(Column col) {
        if (col == null || _colMap == null)
            return false;

        DBIdentifier sName = DBIdentifier.toUpper(col.getIdentifier());
        Column cur = (Column) _colMap.get(sName);
        if (!col.equals(cur))
            return false;

        removeName(sName);
View Full Code Here

Examples of org.apache.openjpa.jdbc.identifier.DBIdentifier

    public Index getIndex(DBIdentifier name) {
        if (name == null || _idxMap == null)
            return null;
       
        DBIdentifier sName = DBIdentifier.toUpper(name);
        return (Index) _idxMap.get(sName);
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.identifier.DBIdentifier

            idx = schema.getSchemaGroup().newIndex(name, this);
        } else
            idx = new Index(name, this);
        if (_idxMap == null)
            _idxMap = new TreeMap<DBIdentifier, Index>();
        DBIdentifier sName = DBIdentifier.toUpper(name);
        _idxMap.put(sName, idx);
        _idxs = null;
        return idx;
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.identifier.DBIdentifier

     */
    public boolean removeIndex(Index idx) {
        if (idx == null || _idxMap == null)
            return false;

        DBIdentifier sName = DBIdentifier.toUpper(idx.getIdentifier());
        Index cur = (Index) _idxMap.get(sName);
        if (!idx.equals(cur))
            return false;

        _idxMap.remove(sName);
View Full Code Here

Examples of org.apache.openjpa.jdbc.identifier.DBIdentifier

    void changeRelationId(Column col) {
        _rels = null;
    }

    public int compareTo(Object other) {
        DBIdentifier name = getFullIdentifier();
        DBIdentifier otherName = ((Table) other).getFullIdentifier();
        if (DBIdentifier.isNull(name) && DBIdentifier.isNull(otherName))
            return 0;
        if (DBIdentifier.isNull(name))
            return 1;
        if (DBIdentifier.isNull(otherName))
View Full Code Here

Examples of org.apache.openjpa.jdbc.identifier.DBIdentifier

            Column pkColumn) {
        if (isDB2ZOSV8xOrLater()) {
            // build the index for the sequence tables
            // the index name will be the fully qualified table name + _IDX
            Table tab = schema.getTable(table);
            DBIdentifier fullIdxId = tab.getFullIdentifier().clone();
            DBIdentifier unQualifiedName = DBIdentifier.append(fullIdxId.getUnqualifiedName(), "IDX");
            fullIdxId.setName(getValidIndexName(unQualifiedName, tab));
            Index idx = tab.addIndex(fullIdxId);
            idx.setUnique(true);
            idx.addColumn(pkColumn);
        }
View Full Code Here

Examples of org.apache.openjpa.jdbc.identifier.DBIdentifier

    /**
     * Returns a OpenJPA 3-compatible name for an auto-assign sequence.
     */
    protected String getOpenJPA3GeneratedKeySequenceName(Column col) {
        Table table = col.getTable();
        DBIdentifier sName = DBIdentifier.preCombine(table.getIdentifier(), "SEQ");
        return toDBName(getNamingUtil().makeIdentifierValid(sName, table.getSchema().
            getSchemaGroup(), maxTableNameLength, true));
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.identifier.DBIdentifier

    /**
     * Returns a OpenJPA 3-compatible name for an auto-assign trigger.
     */
    protected String getOpenJPA3GeneratedKeyTriggerName(Column col) {
        Table table = col.getTable();       
        DBIdentifier sName = DBIdentifier.preCombine(table.getIdentifier(), "TRIG");
        return toDBName(getNamingUtil().makeIdentifierValid(sName, table.getSchema().
            getSchemaGroup(), maxTableNameLength, true));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.