private boolean startIndex(Attributes attrs) throws SAXException { FieldMapping fm = (FieldMapping) peekElement(); parseIndex(fm.getValueInfo(), attrs.getValue("name"), Boolean.parseBoolean(attrs.getValue("enabled")), Boolean.parseBoolean(attrs.getValue("unique"))); return true; }
private boolean startIndex(Attributes attrs) throws SAXException { FieldMapping fm = (FieldMapping) peekElement(); parseIndex(fm.getValueInfo(), attrs.getValue("name"), Boolean.parseBoolean(attrs.getValue("enabled")), Boolean.parseBoolean(attrs.getValue("unique"))); return true; }
private boolean startIndex(Attributes attrs) throws SAXException { FieldMapping fm = (FieldMapping) peekElement(); parseIndex(fm.getValueInfo(), attrs.getValue("name"), Boolean.parseBoolean(attrs.getValue("enabled")), Boolean.parseBoolean(attrs.getValue("unique"))); return true; }
/** * Parse map-key-column. */ private boolean startMapKeyColumn(Attributes attrs) throws SAXException { FieldMapping fm = (FieldMapping) peekElement(); Column col = parseColumn(attrs); MappingInfo info = fm.getKeyMapping().getValueInfo(); List<Column> cols = new ArrayList<Column>(); cols.add(col); info.setColumns(cols); return true; }
/** * Parse map-key-column. */ private boolean startMapKeyColumn(Attributes attrs) throws SAXException { FieldMapping fm = (FieldMapping) peekElement(); Column col = parseColumn(attrs); MappingInfo info = fm.getKeyMapping().getValueInfo(); List<Column> cols = new ArrayList<Column>(); cols.add(col); info.setColumns(cols); return true; }
/** * Parse map-key-column. */ private boolean startMapKeyColumn(Attributes attrs) throws SAXException { FieldMapping fm = (FieldMapping) peekElement(); Column col = parseColumn(attrs); MappingInfo info = fm.getKeyMapping().getValueInfo(); List<Column> cols = new ArrayList<Column>(); cols.add(col); info.setColumns(cols); return true; }
private void endVersionColumns() { if (_versionColumnsList == null) { throw new InternalException(); } if (_versionColumnsList.size() > 0) { ClassMapping cm = (ClassMapping)peekElement(); cm.getVersion().getMappingInfo().setColumns(_versionColumnsList); _versionColumnsList= null; } }
private void endVersionColumns() { if (_versionColumnsList == null) { throw new InternalException(); } if (_versionColumnsList.size() > 0) { ClassMapping cm = (ClassMapping)peekElement(); cm.getVersion().getMappingInfo().setColumns(_versionColumnsList); _versionColumnsList= null; } }
/** * Parse collectionTable. */ private boolean startCollectionTable(Attributes attrs) throws SAXException { FieldMapping fm = (FieldMapping) peekElement(); FieldMappingInfo info = fm.getMappingInfo(); DBIdentifier ctbl = parseCollectionTable(attrs); info.setTableIdentifier(ctbl); return true; }
private void endVersionColumns() { if (_versionColumnsList == null) { throw new InternalException(); } if (_versionColumnsList.size() > 0) { ClassMapping cm = (ClassMapping)peekElement(); cm.getVersion().getMappingInfo().setColumns(_versionColumnsList); _versionColumnsList= null; } }
/** * Parse collectionTable. */ private boolean startCollectionTable(Attributes attrs) throws SAXException { FieldMapping fm = (FieldMapping) peekElement(); FieldMappingInfo info = fm.getMappingInfo(); DBIdentifier ctbl = parseCollectionTable(attrs); info.setTableIdentifier(ctbl); return true; }
/** * Parse collectionTable. */ private boolean startCollectionTable(Attributes attrs) throws SAXException { FieldMapping fm = (FieldMapping) peekElement(); FieldMappingInfo info = fm.getMappingInfo(); DBIdentifier ctbl = parseCollectionTable(attrs); info.setTableIdentifier(ctbl); return true; }
/** * Process OrderColumn. */ protected boolean startOrderColumn(Attributes attrs) throws SAXException { Column col = parseOrderColumn(attrs); Object obj = peekElement(); if (obj instanceof FieldMapping) { FieldMapping fm = (FieldMapping)obj; fm.getMappingInfo().setOrderColumn(col); } return true; } /**
/** * Process OrderColumn. */ protected boolean startOrderColumn(Attributes attrs) throws SAXException { Column col = parseOrderColumn(attrs); Object obj = peekElement(); if (obj instanceof FieldMapping) { FieldMapping fm = (FieldMapping)obj; fm.getMappingInfo().setOrderColumn(col); } return true; } /**
/** * Process OrderColumn. */ protected boolean startOrderColumn(Attributes attrs) throws SAXException { Column col = parseOrderColumn(attrs); Object obj = peekElement(); if (obj instanceof FieldMapping) { FieldMapping fm = (FieldMapping)obj; fm.getMappingInfo().setOrderColumn(col); } return true; } /**
private boolean startDatastoreIdCol(Attributes attrs) throws SAXException { ClassMapping cm = (ClassMapping) peekElement(); Column col = new Column(); String name = attrs.getValue("name"); if (!StringUtil.isEmpty(name)); col.setIdentifier(DBIdentifier.newColumn(name, delimit())); String columnDefinition= attrs.getValue("column-definition"); if (!StringUtil.isEmpty(columnDefinition)) col.setTypeIdentifier(DBIdentifier.newColumnDefinition(columnDefinition)); int precision = Integer.parseInt(attrs.getValue("precision")); if (precision != 0) col.setSize(precision); col.setFlag(Column.FLAG_UNINSERTABLE, !Boolean.parseBoolean(attrs.getValue("insertable"))); col.setFlag(Column.FLAG_UNUPDATABLE, !Boolean.parseBoolean(attrs.getValue("updatable"))); cm.getMappingInfo().setColumns(Arrays.asList(new Column[]{ col })); return true; }
private boolean startDatastoreIdCol(Attributes attrs) throws SAXException { ClassMapping cm = (ClassMapping) peekElement(); Column col = new Column(); String name = attrs.getValue("name"); if (!StringUtil.isEmpty(name)); col.setIdentifier(DBIdentifier.newColumn(name, delimit())); String columnDefinition= attrs.getValue("column-definition"); if (!StringUtil.isEmpty(columnDefinition)) col.setTypeIdentifier(DBIdentifier.newColumnDefinition(columnDefinition)); int precision = Integer.parseInt(attrs.getValue("precision")); if (precision != 0) col.setSize(precision); col.setFlag(Column.FLAG_UNINSERTABLE, !Boolean.parseBoolean(attrs.getValue("insertable"))); col.setFlag(Column.FLAG_UNUPDATABLE, !Boolean.parseBoolean(attrs.getValue("updatable"))); cm.getMappingInfo().setColumns(Arrays.asList(new Column[]{ col })); return true; }
/** * 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; }