Package org.apache.openjpa.jdbc.schema

Examples of org.apache.openjpa.jdbc.schema.Table.addUnique()


        if (_uniqueColumnNames != null) {
            DBIdentifier uniqueName = _uniqueConstraintName;
            if (DBIdentifier.isEmpty(uniqueName)) {
                uniqueName = dict.getValidUniqueName(DBIdentifier.newConstraint("UNQ"), table);
            }
        Unique u = table.addUnique(uniqueName);
        for (DBIdentifier columnName : _uniqueColumnNames) {
          if (!table.containsColumn(columnName, _conf.getDBDictionaryInstance()))
                    throw new UserException(_loc.get("unique-missing-column",
                            columnName, table.getIdentifier(),
                            table.getColumnNames()));
View Full Code Here


        if (DBIdentifier.isEmpty(name)) {
          name = cols[0].getIdentifier();
          name = repos.getDBDictionary().getValidUniqueName(name, table);
        }
       
        Unique unq = table.addUnique(name);
        unq.setDeferred(deferred);
        unq.setColumns(cols);
        return unq;
    }
View Full Code Here

        if (StringUtils.isEmpty(name)) {
          name = cols[0].getName();
          name = repos.getDBDictionary().getValidUniqueName(name, table);
        }
       
        Unique unq = table.addUnique(name);
        unq.setDeferred(deferred);
        unq.setColumns(cols);
        return unq;
    }
View Full Code Here

        if (_uniqueColumnNames != null) {
            String uniqueName = _uniqueConstraintName;
            if (StringUtils.isEmpty(uniqueName)) {
                uniqueName = dict.getValidUniqueName("UNQ", table);
            }
        Unique u = table.addUnique(uniqueName);
        for (String columnName : _uniqueColumnNames) {
          if (!table.containsColumn(columnName, _conf.getDBDictionaryInstance()))
                    throw new UserException(_loc.get("unique-missing-column",
                            columnName, table.getName(),
                            table.getColumnNames()));
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.