/** * Constructor. * * @param name the name of the constraint, or null if none * @param table the local table of the constraint * @deprecated */ Constraint(String name, Table table) { this(DBIdentifier.newConstant(name), table); }
/** * Constructor. * * @param name the name of the constraint, or null if none * @param table the local table of the constraint * @deprecated */ Constraint(String name, Table table) { this(DBIdentifier.newConstant(name), table); }
/** * Constructor. * * @param name the name of the constraint, or null if none * @param table the local table of the constraint * @deprecated */ Constraint(String name, Table table) { this(DBIdentifier.newConstant(name), table); }
/** * Constructor. * * @param name the name of the constraint, or null if none * @param table the local table of the constraint * @deprecated */ Constraint(String name, Table table) { this(DBIdentifier.newConstant(name), table); }
protected void setTargetIdentifier(Column col, String refColumnName) { if (refColumnName.charAt(0) == SINGLE_QUOTE) { col.setTargetIdentifier(DBIdentifier.newConstant(refColumnName)); } else { col.setTargetIdentifier(DBIdentifier.newColumn(refColumnName, delimit())); } }
protected void setTargetIdentifier(Column col, String refColumnName) { if (refColumnName.charAt(0) == SINGLE_QUOTE) { col.setTargetIdentifier(DBIdentifier.newConstant(refColumnName)); } else { col.setTargetIdentifier(DBIdentifier.newColumn(refColumnName, delimit())); } }
protected void setTargetIdentifier(Column col, String refColumnName) { if (refColumnName.charAt(0) == SINGLE_QUOTE) { col.setTargetIdentifier(DBIdentifier.newConstant(refColumnName)); } else { col.setTargetIdentifier(DBIdentifier.newColumn(refColumnName, delimit())); } }
protected void setTargetIdentifier(Column col, String refColumnName) { if (refColumnName.charAt(0) == SINGLE_QUOTE) { col.setTargetIdentifier(DBIdentifier.newConstant(refColumnName)); } else { col.setTargetIdentifier(DBIdentifier.newColumn(refColumnName, delimit())); } }
protected void setTargetIdentifier(Column col, String refColumnName) { if (refColumnName.charAt(0) == SINGLE_QUOTE) { col.setTargetIdentifier(DBIdentifier.newConstant(refColumnName)); } else { col.setTargetIdentifier(DBIdentifier.newColumn(refColumnName, delimit())); } }
protected void setTargetIdentifier(Column col, String refColumnName) { if (refColumnName.charAt(0) == SINGLE_QUOTE) { col.setTargetIdentifier(DBIdentifier.newConstant(refColumnName)); } else { col.setTargetIdentifier(DBIdentifier.newColumn(refColumnName, delimit())); } }
col.setFlag(rs.getShort(5), true); col.setType(rs.getInt(6)); col.setTypeIdentifier(DBIdentifier.newConstant(rs.getString(7))); col.setPrecision(rs.getInt(8)); col.setSize(rs.getInt(9));
col.setFlag(rs.getShort(5), true); col.setType(rs.getInt(6)); col.setTypeIdentifier(DBIdentifier.newConstant(rs.getString(7))); col.setPrecision(rs.getInt(8)); col.setSize(rs.getInt(9));
/** * Parse embedded info for the given mapping. */ private void parseEmbeddedMapping(FieldMapping fm, EmbeddedMapping anno) { ClassMapping embed = fm.getEmbeddedMapping(); if (embed == null) throw new MetaDataException(_loc.get("not-embedded", fm)); FieldMapping efm; for (MappingOverride over : anno.overrides()) { efm = embed.getFieldMapping(over.name()); if (efm == null) throw new MetaDataException(_loc.get("embed-override-name", fm, over.name())); populate(efm, over); } DBIdentifier nullInd = DBIdentifier.NULL; if (!StringUtils.isEmpty(anno.nullIndicatorAttributeName())) nullInd = DBIdentifier.newConstant(anno.nullIndicatorAttributeName()); else if (!StringUtils.isEmpty(anno.nullIndicatorColumnName())) nullInd = DBIdentifier.newColumn(anno.nullIndicatorColumnName(), delimit()); if (DBIdentifier.isNull(nullInd)) return; ValueMappingInfo info = fm.getValueInfo(); populateNullIndicator(nullInd, info); }
copy.setTargetIdentifier(tcol.getIdentifier()); } else if (target instanceof Number) copy.setTargetIdentifier(DBIdentifier.newConstant(target.toString())); else copy.setTargetIdentifier(DBIdentifier.newConstant("'" + target + "'")); } else if (num > 1) copy.setTargetField(col.getTargetField());
copy.setTargetIdentifier(tcol.getIdentifier()); } else if (target instanceof Number) copy.setTargetIdentifier(DBIdentifier.newConstant(target.toString())); else copy.setTargetIdentifier(DBIdentifier.newConstant("'" + target + "'")); } else if (num > 1) copy.setTargetField(col.getTargetField());
copy.setTargetIdentifier(tcol.getIdentifier()); } else if (target instanceof Number) copy.setTargetIdentifier(DBIdentifier.newConstant(target.toString())); else copy.setTargetIdentifier(DBIdentifier.newConstant("'" + target + "'")); } else if (num > 1) copy.setTargetField(col.getTargetField());
copy.setTargetIdentifier(tcol.getIdentifier()); } else if (target instanceof Number) copy.setTargetIdentifier(DBIdentifier.newConstant(target.toString())); else copy.setTargetIdentifier(DBIdentifier.newConstant("'" + target + "'")); } else if (num > 1) copy.setTargetField(col.getTargetField());
/** * Parse embedded info for the given mapping. */ private void parseEmbeddedMapping(FieldMapping fm, EmbeddedMapping anno) { ClassMapping embed = fm.getEmbeddedMapping(); if (embed == null) throw new MetaDataException(_loc.get("not-embedded", fm)); FieldMapping efm; for (MappingOverride over : anno.overrides()) { efm = embed.getFieldMapping(over.name()); if (efm == null) throw new MetaDataException(_loc.get("embed-override-name", fm, over.name())); populate(efm, over); } DBIdentifier nullInd = DBIdentifier.NULL; if (!StringUtil.isEmpty(anno.nullIndicatorAttributeName())) nullInd = DBIdentifier.newConstant(anno.nullIndicatorAttributeName()); else if (!StringUtil.isEmpty(anno.nullIndicatorColumnName())) nullInd = DBIdentifier.newColumn(anno.nullIndicatorColumnName(), delimit()); if (DBIdentifier.isNull(nullInd)) return; ValueMappingInfo info = fm.getValueInfo(); populateNullIndicator(nullInd, info); }
/** * Parse embedded info for the given mapping. */ private void parseEmbeddedMapping(FieldMapping fm, EmbeddedMapping anno) { ClassMapping embed = fm.getEmbeddedMapping(); if (embed == null) throw new MetaDataException(_loc.get("not-embedded", fm)); FieldMapping efm; for (MappingOverride over : anno.overrides()) { efm = embed.getFieldMapping(over.name()); if (efm == null) throw new MetaDataException(_loc.get("embed-override-name", fm, over.name())); populate(efm, over); } DBIdentifier nullInd = DBIdentifier.NULL; if (!StringUtil.isEmpty(anno.nullIndicatorAttributeName())) nullInd = DBIdentifier.newConstant(anno.nullIndicatorAttributeName()); else if (!StringUtil.isEmpty(anno.nullIndicatorColumnName())) nullInd = DBIdentifier.newColumn(anno.nullIndicatorColumnName(), delimit()); if (DBIdentifier.isNull(nullInd)) return; ValueMappingInfo info = fm.getValueInfo(); populateNullIndicator(nullInd, info); }
parseEmbeddedMapping(fm.getKeyMapping(), DBIdentifier.newColumn(kembed.nullIndicatorColumnName(), delimit()), DBIdentifier.newConstant(kembed.nullIndicatorAttributeName()), kembed.overrides()); break; ElementEmbeddedMapping ee = (ElementEmbeddedMapping) anno; parseEmbeddedMapping(fm.getElementMapping(), DBIdentifier.newConstant(ee.nullIndicatorAttributeName()), DBIdentifier.newColumn(ee.nullIndicatorColumnName(), delimit()), ee.overrides()); XEmbeddedMapping embed = (XEmbeddedMapping) anno; parseEmbeddedMapping(fm, DBIdentifier.newColumn(embed.nullIndicatorColumnName(), delimit()), DBIdentifier.newConstant(embed.nullIndicatorAttributeName()), embed.overrides()); break; case X_JOIN_COL: