Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
View | Details | Raw Unified | Return to bug 154176 | Differences between
and this patch

Collapse All | Expand All

(-)db.metadata.model/manifest.mf (-1 / +1 lines)
 Lines 1-5    Link Here 
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.db.metadata.model/1
2
OpenIDE-Module: org.netbeans.modules.db.metadata.model/1
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/db/metadata/model/resources/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/db/metadata/model/resources/Bundle.properties
4
OpenIDE-Module-Specification-Version: 1.1
4
OpenIDE-Module-Specification-Version: 1.2
5
AutoUpdate-Show-In-Client: false
5
AutoUpdate-Show-In-Client: false
(-)db.metadata.model/src/org/netbeans/modules/db/metadata/model/api/Table.java (+4 lines)
 Lines 134-139    Link Here 
134
        return "Table[name='" + getName() + "']"; // NOI18N
134
        return "Table[name='" + getName() + "']"; // NOI18N
135
    }
135
    }
136
136
137
    public boolean isSystem() {
138
        return impl.isSystem();
139
    }
140
    
137
    /**
141
    /**
138
     * Used to find a foreign key if the actual name is null
142
     * Used to find a foreign key if the actual name is null
139
     */
143
     */
(-)db.metadata.model/src/org/netbeans/modules/db/metadata/model/jdbc/JDBCSchema.java (-3 / +4 lines)
 Lines 151-158    Link Here 
151
        return "JDBCSchema[name='" + name + "',default=" + _default + ",synthetic=" + synthetic + "]"; // NOI18N
151
        return "JDBCSchema[name='" + name + "',default=" + _default + ",synthetic=" + synthetic + "]"; // NOI18N
152
    }
152
    }
153
153
154
    protected JDBCTable createJDBCTable(String name) {
154
    protected JDBCTable createJDBCTable(String name, boolean system) {
155
        return new JDBCTable(this, name);
155
        return new JDBCTable(this, name, system);
156
    }
156
    }
157
157
158
    protected JDBCProcedure createJDBCProcedure(String procedureName) {
158
    protected JDBCProcedure createJDBCProcedure(String procedureName) {
 Lines 175-182    Link Here 
175
                    jdbcCatalog.getName(), name, "%", new String[]{"TABLE", "SYSTEM TABLE"}); // NOI18N
175
                    jdbcCatalog.getName(), name, "%", new String[]{"TABLE", "SYSTEM TABLE"}); // NOI18N
176
            try {
176
            try {
177
                while (rs.next()) {
177
                while (rs.next()) {
178
                    String type = MetadataUtilities.trimmed(rs.getString("TABLE_TYPE")); // NOI18N
178
                    String tableName = MetadataUtilities.trimmed(rs.getString("TABLE_NAME")); // NOI18N
179
                    String tableName = MetadataUtilities.trimmed(rs.getString("TABLE_NAME")); // NOI18N
179
                    Table table = createJDBCTable(tableName).getTable();
180
                    Table table = createJDBCTable(tableName, type.contains("SYSTEM")).getTable();
180
                    newTables.put(tableName, table);
181
                    newTables.put(tableName, table);
181
                    LOGGER.log(Level.FINE, "Created table {0}", table);
182
                    LOGGER.log(Level.FINE, "Created table {0}", table);
182
                }
183
                }
(-)db.metadata.model/src/org/netbeans/modules/db/metadata/model/jdbc/JDBCTable.java (-1 / +8 lines)
 Lines 64-69    Link Here 
64
64
65
    private final JDBCSchema jdbcSchema;
65
    private final JDBCSchema jdbcSchema;
66
    private final String name;
66
    private final String name;
67
    private final boolean system;
67
68
68
    private Map<String, Column> columns;
69
    private Map<String, Column> columns;
69
    private Map<String, Index> indexes;
70
    private Map<String, Index> indexes;
 Lines 76-84    Link Here 
76
    private boolean primaryKeyInitialized = false;
77
    private boolean primaryKeyInitialized = false;
77
    private static final String SQL_EXCEPTION_NOT_YET_IMPLEMENTED = "not yet implemented";
78
    private static final String SQL_EXCEPTION_NOT_YET_IMPLEMENTED = "not yet implemented";
78
79
79
    public JDBCTable(JDBCSchema jdbcSchema, String name) {
80
    public JDBCTable(JDBCSchema jdbcSchema, String name, boolean system) {
80
        this.jdbcSchema = jdbcSchema;
81
        this.jdbcSchema = jdbcSchema;
81
        this.name = name;
82
        this.name = name;
83
        this.system = system;
82
    }
84
    }
83
85
84
    @Override
86
    @Override
 Lines 134-139    Link Here 
134
    }
136
    }
135
137
136
    @Override
138
    @Override
139
    public boolean isSystem() {
140
        return system;
141
    }
142
143
    @Override
137
    public String toString() {
144
    public String toString() {
138
        return "JDBCTable[name='" + name + "']"; // NOI18N
145
        return "JDBCTable[name='" + name + "']"; // NOI18N
139
    }
146
    }
(-)db.metadata.model/src/org/netbeans/modules/db/metadata/model/jdbc/oracle/OracleSchema.java (-1 / +3 lines)
 Lines 54-59    Link Here 
54
import java.util.Set;
54
import java.util.Set;
55
import java.util.logging.Level;
55
import java.util.logging.Level;
56
import java.util.logging.Logger;
56
import java.util.logging.Logger;
57
import org.netbeans.modules.db.metadata.model.MetadataUtilities;
57
import org.netbeans.modules.db.metadata.model.api.MetadataException;
58
import org.netbeans.modules.db.metadata.model.api.MetadataException;
58
import org.netbeans.modules.db.metadata.model.api.Procedure;
59
import org.netbeans.modules.db.metadata.model.api.Procedure;
59
import org.netbeans.modules.db.metadata.model.api.Table;
60
import org.netbeans.modules.db.metadata.model.api.Table;
 Lines 87-95    Link Here 
87
            ResultSet rs = dmd.getTables(jdbcCatalog.getName(), name, "%", new String[]{"TABLE"}); // NOI18N
88
            ResultSet rs = dmd.getTables(jdbcCatalog.getName(), name, "%", new String[]{"TABLE"}); // NOI18N
88
            try {
89
            try {
89
                while (rs.next()) {
90
                while (rs.next()) {
91
                    String type = MetadataUtilities.trimmed(rs.getString("TABLE_TYPE")); // NOI18N
90
                    String tableName = rs.getString("TABLE_NAME"); // NOI18N
92
                    String tableName = rs.getString("TABLE_NAME"); // NOI18N
91
                    if (!recycleBinTables.contains(tableName)) {
93
                    if (!recycleBinTables.contains(tableName)) {
92
                        Table table = createJDBCTable(tableName).getTable();
94
                        Table table = createJDBCTable(tableName, type.contains("SYSTEM")).getTable();
93
                        newTables.put(tableName, table);
95
                        newTables.put(tableName, table);
94
                        LOGGER.log(Level.FINE, "Created table {0}", table);
96
                        LOGGER.log(Level.FINE, "Created table {0}", table);
95
                    } else {
97
                    } else {
(-)db.metadata.model/src/org/netbeans/modules/db/metadata/model/spi/TableImplementation.java (+2 lines)
 Lines 85-88    Link Here 
85
    public abstract ForeignKey getForeignKeyByInternalName(String internalName);
85
    public abstract ForeignKey getForeignKeyByInternalName(String internalName);
86
86
87
    public abstract void refresh();
87
    public abstract void refresh();
88
    
89
    public abstract boolean isSystem();
88
}
90
}

Return to bug 154176
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo