/** * Gets the columns whose table name matches the given table name. * @deprecated */ public List<Column> getColumns(String tableName) { return getColumns(DBIdentifier.newTable(tableName)); }
/** * Gets the columns whose table name matches the given table name. * @deprecated */ public List<Column> getColumns(String tableName) { return getColumns(DBIdentifier.newTable(tableName)); }
/** * Gets the columns whose table name matches the given table name. * @deprecated */ public List<Column> getColumns(String tableName) { return getColumns(DBIdentifier.newTable(tableName)); }
/** * Gets the columns whose table name matches the given table name. * @deprecated */ public List<Column> getColumns(String tableName) { return getColumns(DBIdentifier.newTable(tableName)); }
/** * Serialize the columns in the given mapping info. */ private void serializeColumns(MappingInfo info, ColType type, String secondary) throws SAXException { List<Column> cols = (List<Column>) info.getColumns(); if (cols == null) return; for (Column col : cols) serializeColumn(col, type, secondary, info.getUnique() != null); }
/** * Serialize the columns in the given mapping info. */ private void serializeColumns(MappingInfo info, ColType type, String secondary) throws SAXException { List<Column> cols = (List<Column>) info.getColumns(); if (cols == null) return; for (Column col : cols) serializeColumn(col, type, secondary, info.getUnique() != null); }
/** * Serialize the columns in the given mapping info. */ private void serializeColumns(MappingInfo info, ColType type, String secondary) throws SAXException { List<Column> cols = (List<Column>) info.getColumns(); if (cols == null) return; for (Column col : cols) serializeColumn(col, type, secondary, info.getUnique() != null); }
/** * Use the join information to populate our internal column I/O data. */ private void setIOFromJoins(ForeignKey fk, Object[][] joins) { List cols = getColumns(); _io = null; if (cols.isEmpty()) return; int constIdx = 0; int idx; for (int i = 0; i < joins.length; i++) { // const columns are indexed after std join columns in fk IO if (joins[i][1]instanceof Column) idx = i - constIdx; else if ((joins[i][2] == Boolean.TRUE) == (_join == JOIN_INVERSE)) idx = fk.getColumns().length + constIdx++; else continue; setIOFromColumnFlags((Column) cols.get(i), idx); } }
/** * Serialize the columns in the given mapping info. */ private void serializeColumns(MappingInfo info, ColType type, String secondary) throws SAXException { List<Column> cols = (List<Column>) info.getColumns(); if (cols == null) return; for (Column col : cols) serializeColumn(col, type, secondary, info.getUnique() != null); }
/** * Use the join information to populate our internal column I/O data. */ private void setIOFromJoins(ForeignKey fk, Object[][] joins) { List<Column> cols = getColumns(); _io = null; if (cols.isEmpty()) return; int constIdx = 0; int idx; for (int i = 0; i < joins.length; i++) { // const columns are indexed after std join columns in fk IO if (joins[i][1]instanceof Column) idx = i - constIdx; else if ((joins[i][2] == Boolean.TRUE) == (_join == JOIN_INVERSE)) idx = fk.getColumns().length + constIdx++; else continue; setIOFromColumnFlags((Column) cols.get(i), idx); } }
/** * Use the join information to populate our internal column I/O data. */ private void setIOFromJoins(ForeignKey fk, Object[][] joins) { List<Column> cols = getColumns(); _io = null; if (cols.isEmpty()) return; int constIdx = 0; int idx; for (int i = 0; i < joins.length; i++) { // const columns are indexed after std join columns in fk IO if (joins[i][1]instanceof Column) idx = i - constIdx; else if ((joins[i][2] == Boolean.TRUE) == (_join == JOIN_INVERSE)) idx = fk.getColumns().length + constIdx++; else continue; setIOFromColumnFlags((Column) cols.get(i), idx); } }
/** * Use the join information to populate our internal column I/O data. */ private void setIOFromJoins(ForeignKey fk, Object[][] joins) { List<Column> cols = getColumns(); _io = null; if (cols.isEmpty()) return; int constIdx = 0; int idx; for (int i = 0; i < joins.length; i++) { // const columns are indexed after std join columns in fk IO if (joins[i][1]instanceof Column) idx = i - constIdx; else if ((joins[i][2] == Boolean.TRUE) == (_join == JOIN_INVERSE)) idx = fk.getColumns().length + constIdx++; else continue; setIOFromColumnFlags((Column) cols.get(i), idx); } }
/** * Use the join information to populate our internal column I/O data. */ private void setIOFromJoins(ForeignKey fk, Object[][] joins) { List<Column> cols = getColumns(); _io = null; if (cols.isEmpty()) return; int constIdx = 0; int idx; for (int i = 0; i < joins.length; i++) { // const columns are indexed after std join columns in fk IO if (joins[i][1]instanceof Column) idx = i - constIdx; else if ((joins[i][2] == Boolean.TRUE) == (_join == JOIN_INVERSE)) idx = fk.getColumns().length + constIdx++; else continue; setIOFromColumnFlags((Column) cols.get(i), idx); } }
/** * Serialize the columns in the given mapping info. */ private void serializeColumns(MappingInfo info, ColType type, String secondary, AnnotationBuilder ab, Object meta) { List<Column> cols = (List<Column>) info.getColumns(); if (cols == null) return; AnnotationBuilder abContainer = ab; if (cols.size() > 1) { Class grpType = type.getColumnGroupAnnotationType(); if (null != grpType) { AnnotationBuilder abGrp = newAnnotationBuilder(grpType); if (null == ab) addAnnotation(abGrp, meta); else ab.add(null, abGrp); abContainer = abGrp; } } for (Column col : cols) serializeColumn(col, type, secondary, info.getUnique() != null, abContainer, meta); }
/** * Serialize the columns in the given mapping info. */ private void serializeColumns(MappingInfo info, ColType type, String secondary, AnnotationBuilder ab, Object meta) { List<Column> cols = (List<Column>) info.getColumns(); if (cols == null) return; AnnotationBuilder abContainer = ab; if (cols.size() > 1) { Class grpType = type.getColumnGroupAnnotationType(); if (null != grpType) { AnnotationBuilder abGrp = newAnnotationBuilder(grpType); if (null == ab) addAnnotation(abGrp, meta); else ab.add(null, abGrp); abContainer = abGrp; } } for (Column col : cols) serializeColumn(col, type, secondary, info.getUnique() != null, abContainer, meta); }
/** * Serialize the columns in the given mapping info. */ private void serializeColumns(MappingInfo info, ColType type, String secondary, AnnotationBuilder ab, Object meta) { List<Column> cols = (List<Column>) info.getColumns(); if (cols == null) return; AnnotationBuilder abContainer = ab; if (cols.size() > 1) { Class grpType = type.getColumnGroupAnnotationType(); if (null != grpType) { AnnotationBuilder abGrp = newAnnotationBuilder(grpType); if (null == ab) addAnnotation(abGrp, meta); else ab.add(null, abGrp); abContainer = abGrp; } } for (Column col : cols) serializeColumn(col, type, secondary, info.getUnique() != null, abContainer, meta); }
/** * Serialize the columns in the given mapping info. */ private void serializeColumns(MappingInfo info, ColType type, String secondary, AnnotationBuilder ab, Object meta) { List<Column> cols = (List<Column>) info.getColumns(); if (cols == null) return; AnnotationBuilder abContainer = ab; if (cols.size() > 1) { Class grpType = type.getColumnGroupAnnotationType(); if (null != grpType) { AnnotationBuilder abGrp = newAnnotationBuilder(grpType); if (null == ab) addAnnotation(abGrp, meta); else ab.add(null, abGrp); abContainer = abGrp; } } for (Column col : cols) serializeColumn(col, type, secondary, info.getUnique() != null, abContainer, meta); }
/** * Parse map-key-join-column. */ private boolean startMapKeyJoinColumn(Attributes attrs) throws SAXException { boolean retVal = startMapKeyColumn(attrs); // check if name is not set, set it to default: the // concatenation of the name of the referencing property // or field name, "-", "KEY" FieldMapping fm = (FieldMapping) peekElement(); MappingInfo info = fm.getKeyMapping().getValueInfo(); List<Column> cols = info.getColumns(); Column col = cols.get(0); if (DBIdentifier.isNull(col.getIdentifier())) { col.setIdentifier(DBIdentifier.newColumn(fm.getName() + "_" + "KEY", delimit())); } return retVal; }
/** * Parse map-key-join-column. */ private boolean startMapKeyJoinColumn(Attributes attrs) throws SAXException { boolean retVal = startMapKeyColumn(attrs); // check if name is not set, set it to default: the // concatenation of the name of the referencing property // or field name, "-", "KEY" FieldMapping fm = (FieldMapping) peekElement(); MappingInfo info = fm.getKeyMapping().getValueInfo(); List<Column> cols = info.getColumns(); Column col = cols.get(0); if (DBIdentifier.isNull(col.getIdentifier())) { col.setIdentifier(DBIdentifier.newColumn(fm.getName() + "_" + "KEY", delimit())); } return retVal; }
/** * Parse map-key-join-column. */ private boolean startMapKeyJoinColumn(Attributes attrs) throws SAXException { boolean retVal = startMapKeyColumn(attrs); // check if name is not set, set it to default: the // concatenation of the name of the referencing property // or field name, "-", "KEY" FieldMapping fm = (FieldMapping) peekElement(); MappingInfo info = fm.getKeyMapping().getValueInfo(); List<Column> cols = info.getColumns(); Column col = cols.get(0); if (DBIdentifier.isNull(col.getIdentifier())) { col.setIdentifier(DBIdentifier.newColumn(fm.getName() + "_" + "KEY", delimit())); } return retVal; }