Package org.apache.cayenne.dba

Examples of org.apache.cayenne.dba.QuotingStrategy.quoteString()


                            // use a set to avoid duplicate constraints
                            constraints = new HashSet<String>();
                            constraintMap.put(fkTable, constraints);
                        }

                        constraints.add(strategy.quoteString(fk));
                    }
                }
            }
            finally {
                rs.close();
View Full Code Here


        else {
            status = false;
        }
        QuotingStrategy context = getAdapter().getQuotingStrategy(status);

        buffer.append(context.quoteString(entity.getName()));

        buffer.append(" (");

        Iterator<DbAttribute> it = pk.iterator();
View Full Code Here

        Iterator<DbAttribute> it = pk.iterator();

        // at this point we know that there is at least on PK column
        DbAttribute firstColumn = it.next();
        buffer.append(context.quoteString(firstColumn.getName()));

        while (it.hasNext()) {
            DbAttribute column = it.next();
            buffer.append(", ");
            buffer.append(context.quoteString(column.getName()));
View Full Code Here

        buffer.append(context.quoteString(firstColumn.getName()));

        while (it.hasNext()) {
            DbAttribute column = it.next();
            buffer.append(", ");
            buffer.append(context.quoteString(column.getName()));
        }

        buffer.append(")");
        return buffer.toString();
    }
View Full Code Here

        // compound PK doesn't work well with UNIQUE index...
        // create a regular one in this case
        buffer.append(pk.size() == 1 ? "CREATE UNIQUE INDEX " : "CREATE INDEX ");

        buffer.append(context.quoteString(entity.getName()));
        buffer.append(" (");

        Iterator<DbAttribute> it = pk.iterator();

        // at this point we know that there is at least on PK column
View Full Code Here

        Iterator<DbAttribute> it = pk.iterator();

        // at this point we know that there is at least on PK column
        DbAttribute firstColumn = it.next();
        buffer.append(context.quoteString(firstColumn.getName()));

        while (it.hasNext()) {
            DbAttribute column = it.next();
            buffer.append(", ");
            buffer.append(context.quoteString(column.getName()));
View Full Code Here

        buffer.append(context.quoteString(firstColumn.getName()));

        while (it.hasNext()) {
            DbAttribute column = it.next();
            buffer.append(", ");
            buffer.append(context.quoteString(column.getName()));
        }
        buffer.append(")");
        return buffer.toString();
    }
View Full Code Here

            String entName = entity.getName();
            String seqName = _SEQUENCE_PREFIX + entName.toLowerCase();

            if (entity.getSchema() != null && entity.getSchema().length() > 0) {

                seqName = context.quoteString(entity.getSchema())
                        + "."
                        + context.quoteString(seqName);
            }
            else {
                seqName = context.quoteString(seqName);
View Full Code Here

            if (entity.getSchema() != null && entity.getSchema().length() > 0) {

                seqName = context.quoteString(entity.getSchema())
                        + "."
                        + context.quoteString(seqName);
            }
            else {
                seqName = context.quoteString(seqName);
            }
            return seqName;
View Full Code Here

                seqName = context.quoteString(entity.getSchema())
                        + "."
                        + context.quoteString(seqName);
            }
            else {
                seqName = context.quoteString(seqName);
            }
            return seqName;
        }
    }
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.