public Table(String name) { setName( name ); }
); final Table idTable = new Table(); idTable.setName( idTableName ); idTable.setComment( "Used to hold id values for the " + entityBinding.getEntityName() + " entity" );
table = new DenormalizedTable( namespace, subselect, isAbstract, denormalizedSuperTable ); table.setName( logicalTableName.render() );
public Table(String name) { this(); setName(name); }
public Table(String name) { this(); setName( name ); }
public Table(String name) { this(); setName( name ); }
public Table(String name) { this(); setName( name ); }
private static void bindTables(List<?> tables, OverrideRepository repository) { Iterator<?> iterator = tables.iterator(); while ( iterator.hasNext() ) { Element element = (Element) iterator.next(); Table table = new Table(); table.setCatalog( element.attributeValue("catalog") ); table.setSchema( element.attributeValue("schema") ); table.setName( element.attributeValue("name") ); String wantedClassName = element.attributeValue("class"); Element primaryKey = element.element("primary-key"); bindPrimaryKey(primaryKey, table, repository); List<?> columns = element.elements("column"); bindColumns(columns, table, repository); List<?> foreignKeys = element.elements("foreign-key"); bindForeignKeys(foreignKeys, table, repository); bindMetaAttributes(element, table, repository); repository.addTable(table,wantedClassName); } }
public Table addTable(String schema, String catalog, String name) { String key = TableNameQualifier.qualify(quote(catalog), quote(schema), quote(name)); Table table = (Table) tables.get(key); if (table == null) { table = new Table(); table.setAbstract(false); table.setName(name); table.setSchema(schema); table.setCatalog(catalog); tables.put(key, table); String qualifier = StringHelper.qualifier(key); List<Table> schemaList = qualifiers.get(qualifier); if(schemaList==null) { schemaList = new ArrayList<Table>(); qualifiers.put(qualifier, schemaList); } schemaList.add(table); } else { table.setAbstract(false); } return table; }
public Table addDenormalizedTable( String schema, String catalog, String name, boolean isAbstract, String subselect, Table includedTable) throws MappingException { String key = subselect==null ? Table.qualify(catalog, schema, name, '.') : subselect; if ( tables.containsKey(key) ) { throw new MappingException("duplicate table: " + name); } Table table = new DenormalizedTable(includedTable); table.setAbstract(isAbstract); table.setName(name); table.setSchema(schema); table.setCatalog(catalog); table.setSubselect(subselect); tables.put(key, table); return table; }
public Table addTable(String schema, String catalog, String name, String subselect, boolean isAbstract ) { String key = subselect==null ? Table.qualify(catalog, schema, name, '.') : subselect; Table table = (Table) tables.get(key); if (table == null) { table = new Table(); table.setAbstract(isAbstract); table.setName(name); table.setSchema(schema); table.setCatalog(catalog); table.setSubselect(subselect); tables.put(key, table); } else { if (!isAbstract) table.setAbstract(false); } return table; }
public Table addTable(String schema, String catalog, String name, String subselect, boolean isAbstract ) { String key = subselect==null ? Table.qualify(catalog, schema, name) : subselect; Table table = (Table) tables.get(key); if (table == null) { table = new Table(); table.setAbstract(isAbstract); table.setName(name); table.setSchema(schema); table.setCatalog(catalog); table.setSubselect(subselect); tables.put(key, table); } else { if (!isAbstract) table.setAbstract(false); } return table; }
public Table addDenormalizedTable( String schema, String catalog, String name, boolean isAbstract, String subselect, Table includedTable) throws MappingException { String key = subselect==null ? Table.qualify(catalog, schema, name) : subselect; if ( tables.containsKey(key) ) { throw new DuplicateMappingException("table", name); } Table table = new DenormalizedTable(includedTable); table.setAbstract(isAbstract); table.setName(name); table.setSchema(schema); table.setCatalog(catalog); table.setSubselect(subselect); tables.put(key, table); return table; }
public void prepareTemporaryTables(Mapping mapping, Dialect dialect) { if ( dialect.supportsTemporaryTables() ) { temporaryIdTableName = dialect.generateTemporaryTableName( getTable().getName() ); Table table = new Table(); table.setName( temporaryIdTableName ); Iterator itr = getTable().getPrimaryKey().getColumnIterator(); while( itr.hasNext() ) { Column column = (Column) itr.next(); table.addColumn( (Column) column.clone() ); } temporaryIdTableDDL = table.sqlTemporaryTableCreateString( dialect, mapping ); } }
public void prepareTemporaryTables(Mapping mapping, Dialect dialect) { if ( dialect.supportsTemporaryTables() ) { temporaryIdTableName = dialect.generateTemporaryTableName( getTable().getName() ); Table table = new Table(); table.setName( temporaryIdTableName ); Iterator itr = getTable().getPrimaryKey().getColumnIterator(); while( itr.hasNext() ) { Column column = (Column) itr.next(); table.addColumn( (Column) column.clone() ); } temporaryIdTableDDL = table.sqlTemporaryTableCreateString( dialect, mapping ); } }
public Table addDenormalizedTable( String schema, String catalog, String name, boolean isAbstract, String subselect, Table includedTable) throws DuplicateMappingException { name = getObjectNameNormalizer().normalizeIdentifierQuoting( name ); schema = getObjectNameNormalizer().normalizeIdentifierQuoting( schema ); catalog = getObjectNameNormalizer().normalizeIdentifierQuoting( catalog ); String key = subselect == null ? Table.qualify(catalog, schema, name) : subselect; if ( tables.containsKey( key ) ) { throw new DuplicateMappingException( "table", name ); } Table table = new DenormalizedTable( includedTable ); table.setAbstract( isAbstract ); table.setName( name ); table.setSchema( schema ); table.setCatalog( catalog ); table.setSubselect( subselect ); tables.put( key, table ); return table; }
private static void bindTables( ArrayList<Element> tables, OverrideRepository repository) { for (Element element : tables) { Table table = new Table(); table.setCatalog(getAttribute(element, "catalog")); table.setSchema(getAttribute(element, "schema")); table.setName(getAttribute(element, "name")); ArrayList<Element> primaryKeys = getChildElements(element, "primary-key"); if (primaryKeys.size() > 0) { bindPrimaryKey(primaryKeys.get(0), table, repository); } bindColumns(getChildElements(element, "column"), table, repository); bindForeignKeys(getChildElements(element, "foreign-key"), table, repository); bindMetaAttributes(element, table, repository); repository.addTable(table, getAttribute(element, "class")); } }
public Table addDenormalizedTable( String schema, String catalog, String name, boolean isAbstract, String subselect, Table includedTable) throws DuplicateMappingException { name = getObjectNameNormalizer().normalizeIdentifierQuoting( name ); schema = getObjectNameNormalizer().normalizeIdentifierQuoting( schema ); catalog = getObjectNameNormalizer().normalizeIdentifierQuoting( catalog ); String key = subselect == null ? Table.qualify(catalog, schema, name) : subselect; if ( tables.containsKey( key ) ) { throw new DuplicateMappingException( "table", name ); } Table table = new DenormalizedTable( includedTable ); table.setAbstract( isAbstract ); table.setName( name ); table.setSchema( schema ); table.setCatalog( catalog ); table.setSubselect( subselect ); tables.put( key, table ); return table; }
public Table addTable( String schema, String catalog, String name, String subselect, boolean isAbstract) { name = getObjectNameNormalizer().normalizeIdentifierQuoting( name ); schema = getObjectNameNormalizer().normalizeIdentifierQuoting( schema ); catalog = getObjectNameNormalizer().normalizeIdentifierQuoting( catalog ); String key = subselect == null ? Table.qualify( catalog, schema, name ) : subselect; Table table = tables.get( key ); if ( table == null ) { table = new Table(); table.setAbstract( isAbstract ); table.setName( name ); table.setSchema( schema ); table.setCatalog( catalog ); table.setSubselect( subselect ); tables.put( key, table ); } else { if ( !isAbstract ) { table.setAbstract( false ); } } return table; }
public Table addTable( String schema, String catalog, String name, String subselect, boolean isAbstract) { name = getObjectNameNormalizer().normalizeIdentifierQuoting( name ); schema = getObjectNameNormalizer().normalizeIdentifierQuoting( schema ); catalog = getObjectNameNormalizer().normalizeIdentifierQuoting( catalog ); String key = subselect == null ? Table.qualify( catalog, schema, name ) : subselect; Table table = tables.get( key ); if ( table == null ) { table = new Table(); table.setAbstract( isAbstract ); table.setName( name ); table.setSchema( schema ); table.setCatalog( catalog ); table.setSubselect( subselect ); tables.put( key, table ); } else { if ( !isAbstract ) { table.setAbstract( false ); } } return table; }