/** * Convenience method to perform cast from {@link FieldMetaData#getValue} */ public ValueMapping getValueMapping() { return (ValueMapping) getValue(); }
/** * Convenience method to perform cast from {@link FieldMetaData#getValue} */ public ValueMapping getValueMapping() { return (ValueMapping) getValue(); }
/** * Convenience method to perform cast from {@link FieldMetaData#getValue} */ public ValueMapping getValueMapping() { return (ValueMapping) getValue(); }
/** * Convenience method to perform cast from {@link FieldMetaData#getValue} */ public ValueMapping getValueMapping() { return (ValueMapping) getValue(); }
/** * Convenience method to perform cast from {@link FieldMetaData#getValue} */ public ValueMapping getValueMapping() { return (ValueMapping) getValue(); }
public static void getIdColumns(FieldMapping fmd, List cols) { Column[] pkCols = ((ValueMappingImpl)fmd.getValue()).getColumns(); for (int j = 0; j < pkCols.length; j++) { Column newCol = new Column(); newCol.copy(pkCols[j]); cols.add(newCol); } } }
public static void getIdColumns(FieldMapping fmd, List cols) { Column[] pkCols = ((ValueMappingImpl)fmd.getValue()).getColumns(); for (int j = 0; j < pkCols.length; j++) { Column newCol = new Column(); newCol.copy(pkCols[j]); cols.add(newCol); } } }
public static void getIdColumns(FieldMapping fmd, List cols) { Column[] pkCols = ((ValueMappingImpl)fmd.getValue()).getColumns(); for (int j = 0; j < pkCols.length; j++) { Column newCol = new Column(); newCol.copy(pkCols[j]); cols.add(newCol); } } }
public static void getIdColumns(FieldMapping fmd, List cols) { Column[] pkCols = ((ValueMappingImpl)fmd.getValue()).getColumns(); for (int j = 0; j < pkCols.length; j++) { Column newCol = new Column(); newCol.copy(pkCols[j]); cols.add(newCol); } } }
/** * When there is MappedById annotation, the owner of the one-to-one/ * many-to-one relationship will use its primary key to represent * foreign key relation. No need to create a separate foreign key * column. */ private void setMappedByIdColumns() { ClassMetaData owner = field.getDefiningMetaData(); FieldMetaData[] pks = owner.getPrimaryKeyFields(); for (int i = 0; i < pks.length; i++) { FieldMapping fm = (FieldMapping) pks[i]; ValueMappingImpl val = (ValueMappingImpl) field.getValue(); ValueMappingInfo info = val.getValueInfo(); if (info.getColumns().size() == 0) info.setColumns(getMappedByIdColumns(fm)); } }
/** * When there is MappedById annotation, the owner of the one-to-one/ * many-to-one relationship will use its primary key to represent * foreign key relation. No need to create a separate foreign key * column. */ private void setMappedByIdColumns() { ClassMetaData owner = field.getDefiningMetaData(); FieldMetaData[] pks = owner.getPrimaryKeyFields(); for (int i = 0; i < pks.length; i++) { FieldMapping fm = (FieldMapping) pks[i]; ValueMappingImpl val = (ValueMappingImpl) field.getValue(); ValueMappingInfo info = val.getValueInfo(); if (info.getColumns().size() == 0) info.setColumns(getMappedByIdColumns(fm)); } }
public static void getEmbeddedIdCols(FieldMapping fmd, List cols) { ClassMapping embed = fmd.getEmbeddedMapping(); FieldMapping[] fmds = embed.getFieldMappings(); for (int i = 0; i < fmds.length; i++) { if (fmds[i].getValue().getEmbeddedMetaData() == null) { getIdColumns(fmds[i], cols); } else { getEmbeddedIdCols(fmds[i], cols); } } }
public static void getEmbeddedIdCols(FieldMapping fmd, List cols) { ClassMapping embed = fmd.getEmbeddedMapping(); FieldMapping[] fmds = embed.getFieldMappings(); for (int i = 0; i < fmds.length; i++) { if (fmds[i].getValue().getEmbeddedMetaData() == null) { getIdColumns(fmds[i], cols); } else { getEmbeddedIdCols(fmds[i], cols); } } }
public static void getEmbeddedIdCols(FieldMapping fmd, List cols) { ClassMapping embed = fmd.getEmbeddedMapping(); FieldMapping[] fmds = embed.getFieldMappings(); for (int i = 0; i < fmds.length; i++) { if (fmds[i].getValue().getEmbeddedMetaData() == null) { getIdColumns(fmds[i], cols); } else { getEmbeddedIdCols(fmds[i], cols); } } }
public static void getEmbeddedIdCols(FieldMapping fmd, List cols) { ClassMapping embed = fmd.getEmbeddedMapping(); FieldMapping[] fmds = embed.getFieldMappings(); for (int i = 0; i < fmds.length; i++) { if (fmds[i].getValue().getEmbeddedMetaData() == null) { getIdColumns(fmds[i], cols); } else { getEmbeddedIdCols(fmds[i], cols); } } }
/** * Constructor. */ public FieldMapping(String name, Class<?> type, ClassMapping owner) { super(name, type, owner); _info = owner.getMappingRepository().newMappingInfo(this); _val = (ValueMapping) getValue(); _key = (ValueMapping) getKey(); _elem = (ValueMapping) getElement(); setUsesIntermediate(false); setUsesImplData(Boolean.FALSE); }
/** * Constructor. */ public FieldMapping(String name, Class<?> type, ClassMapping owner) { super(name, type, owner); _info = owner.getMappingRepository().newMappingInfo(this); _val = (ValueMapping) getValue(); _key = (ValueMapping) getKey(); _elem = (ValueMapping) getElement(); setUsesIntermediate(false); setUsesImplData(Boolean.FALSE); }
/** * Constructor. */ public FieldMapping(String name, Class<?> type, ClassMapping owner) { super(name, type, owner); _info = owner.getMappingRepository().newMappingInfo(this); _val = (ValueMapping) getValue(); _key = (ValueMapping) getKey(); _elem = (ValueMapping) getElement(); setUsesIntermediate(false); setUsesImplData(Boolean.FALSE); }
/** * Constructor. */ public FieldMapping(String name, Class type, ClassMapping owner) { super(name, type, owner); _info = owner.getMappingRepository().newMappingInfo(this); _val = (ValueMapping) getValue(); _key = (ValueMapping) getKey(); _elem = (ValueMapping) getElement(); setUsesIntermediate(false); setUsesImplData(Boolean.FALSE); }
/** * Constructor. */ public FieldMapping(String name, Class<?> type, ClassMapping owner) { super(name, type, owner); _info = owner.getMappingRepository().newMappingInfo(this); _val = (ValueMapping) getValue(); _key = (ValueMapping) getKey(); _elem = (ValueMapping) getElement(); setUsesIntermediate(false); setUsesImplData(Boolean.FALSE); }