Package org.apache.cayenne.dba

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


            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);
             }
            return 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

            if (i > 0) {
                query.append(", ");
            }

            DbAttribute attribute = updatedDbAttributes.get(i);
            query.append(strategy.quoteString(attribute.getName()));
            query.append(" = ?");
        }

        query.append(" WHERE ");
View Full Code Here

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

        buf.append(strategy.quoteString(dbAttribute.getName()));

        if (trim) {
            buf.append(')');
        }
    }
View Full Code Here

            if (includeInBatch(attribute)) {

                if (columnCount > 0) {
                    query.append(", ");
                }
                query.append(strategy.quoteString(attribute.getName()));
                columnCount++;
            }
        }

        query.append(") VALUES (");
View Full Code Here

       
        QuotingStrategy strategy = getAdapter().getQuotingStrategy(status);
      
        StringBuffer query = new StringBuffer("UPDATE ");
        query.append(strategy.quoteFullyQualifiedName(batch.getDbEntity()));
        query.append(" SET ").append(strategy.quoteString(deletedFieldName)).append(" = ?");

        applyQualifier(query, batch);

        return query.toString();
    }
View Full Code Here

                .getDataMap()
                .isQuotingSQLIdentifiers());
        sqlBuffer.append("ALTER TABLE ");
        sqlBuffer.append(context.quoteFullyQualifiedName(getEntity()));
        sqlBuffer.append(" ALTER COLUMN ");
        sqlBuffer.append(context.quoteString(getColumn().getName()));
        sqlBuffer.append(" DROP NOT NULL");

        return Collections.singletonList(sqlBuffer.toString());
    }
View Full Code Here

                    firstPk = false;
                else
                    sqlBuffer.append(", ");

                DbAttribute at = pkit.next();
                sqlBuffer.append(context.quoteString(at.getName()));
            }
            sqlBuffer.append(')');
        }

        // if FK constraints are supported, we must add indices to all FKs
View Full Code Here

                    Iterator<DbAttribute> columns = relationship
                            .getSourceAttributes()
                            .iterator();
                    DbAttribute column = columns.next();
                    sqlBuffer.append(context.quoteString(column.getName()));

                    while (columns.hasNext()) {
                        column = columns.next();
                        sqlBuffer.append(", ").append( context.quoteString(column.getName()));
                    }
View Full Code Here

                    DbAttribute column = columns.next();
                    sqlBuffer.append(context.quoteString(column.getName()));

                    while (columns.hasNext()) {
                        column = columns.next();
                        sqlBuffer.append(", ").append( context.quoteString(column.getName()));
                    }

                    sqlBuffer.append(")");
                }
            }
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.