Examples of quotedIdentifier()


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

        StringBuilder buffer = new StringBuilder();
        buffer.append("CREATE PRIMARY KEY ");
     
        QuotingStrategy context = getAdapter().getQuotingStrategy();

        buffer.append(context.quotedIdentifier(entity, entity.getName()));

        buffer.append(" (");

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

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

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

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

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

        // 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.quotedIdentifier(entity, 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

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

        sql.append(" FROM ").append(quoter.quotedFullyQualifiedName(joinEntity))
                .append(" WHERE ");
        int i = snapshot.size();
        for (Object key : snapshot.keySet()) {
            sql.append(quoter.quotedIdentifier(joinEntity, String.valueOf(key)))
                    .append(" #bindEqual($").append(key).append(")");

            if (--i > 0) {
                sql.append(" AND ");
            }
View Full Code Here

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

        }

        // convert ColumnDescriptors to column names
        List<String> selectColumnExpList = new ArrayList<String>();
        for (ColumnDescriptor column : resultColumns) {
            String fullName = strategy.quotedIdentifier(dataMap, column.getNamePrefix(), column.getName());
            selectColumnExpList.add(fullName);
        }

        // append any column expressions used in the order by if this query
        // uses the DISTINCT modifier
View Full Code Here

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

                    // requires the ADD CONSTRAINT statement
                    buf.append(" ADD CONSTRAINT ");
                    String name = "U_" + rel.getSourceEntity().getName() + "_"
                            + (long) (System.currentTimeMillis() / (Math.random() * 100000));

                    buf.append(context.quotedIdentifier(rel.getSourceEntity(), name));
                    buf.append(" FOREIGN KEY (");

                    boolean first = true;
                    for (DbJoin join : rel.getJoins()) {
                        if (!first) {
View Full Code Here

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

        QuotingStrategy strategy = getAdapter().getQuotingStrategy();

        StringBuffer query = new StringBuffer("UPDATE ");
        query.append(strategy.quotedFullyQualifiedName(batch.getDbEntity()));
        query.append(" SET ").append(strategy.quotedIdentifier(batch.getDbEntity(), deletedFieldName)).append(" = ?");

        applyQualifier(query, batch);

        return query.toString();
    }
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.