ttomcat-1778514358873.zip-extract/_dependencies/maven/com.h2database_h2-2.2.220/org/h2/schema/MetaSchema.java

Path
ttomcat-1778514358873.zip-extract/_dependencies/maven/com.h2database_h2-2.2.220/org/h2/schema/MetaSchema.java
Status
scanned
Type
file
Name
MetaSchema.java
Extension
.java
Programming language
Java
Mime type
text/html
File type
HTML document, ASCII text
Tag

      
    
Rootfs path

      
    
Size
2676 (2.6 KB)
MD5
337b331784eb44b28105b501f7f937c5
SHA1
d5239da01121fd170f242447f76d858d1bb37b89
SHA256
59e0cb063542063e0fec8882fe35b8b1ea19d866d903a784f31deee2c475a845
SHA512

      
    
SHA1_git
27f984d987b1f3c7d92330bfe939145629b3f9db
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
MetaSchema.java | 2.6 KB |

/* * Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0, * and the EPL 1.0 (https://h2database.com/html/license.html). * Initial Developer: H2 Group */ package org.h2.schema; import java.util.ArrayList; import java.util.Collection; import java.util.Map; import org.h2.engine.Database; import org.h2.engine.SessionLocal; import org.h2.engine.User; import org.h2.table.Table; /** * Meta data schema. */ public abstract class MetaSchema extends Schema { /** * Creates a new instance of meta data schema. * * @param database * the database * @param id * the object id * @param schemaName * the schema name * @param owner * the owner of the schema */ public MetaSchema(Database database, int id, String schemaName, User owner) { super(database, id, schemaName, owner, true); } @Override public Table findTableOrView(SessionLocal session, String name) { Map<String, Table> map = getMap(session); Table table = map.get(name); if (table != null) { return table; } return super.findTableOrView(session, name); } @Override public Collection<Table> getAllTablesAndViews(SessionLocal session) { Collection<Table> userTables = super.getAllTablesAndViews(session); if (session == null) { return userTables; } Collection<Table> systemTables = getMap(session).values(); if (userTables.isEmpty()) { return systemTables; } ArrayList<Table> list = new ArrayList<>(systemTables.size() + userTables.size()); list.addAll(systemTables); list.addAll(userTables); return list; } @Override public Table getTableOrView(SessionLocal session, String name) { Map<String, Table> map = getMap(session); Table table = map.get(name); if (table != null) { return table; } return super.getTableOrView(session, name); } @Override public Table getTableOrViewByName(SessionLocal session, String name) { Map<String, Table> map = getMap(session); Table table = map.get(name); if (table != null) { return table; } return super.getTableOrViewByName(session, name); } /** * Returns map of tables in this schema. * * @param session the session * @return map of tables in this schema */ protected abstract Map<String, Table> getMap(SessionLocal session); @Override public boolean isEmpty() { return false; } }
Detected license expression

      
    
Detected license expression (SPDX)

      
    
Percentage of license text
4.03
Copyrights
- end_line: 2
  copyright: Copyright 2004-2023 H2 Group. Multiple-Licensed
  start_line: 2
Holders
- holder: H2 Group. Multiple-Licensed
  end_line: 2
  start_line: 2
Authors

      
    
License expression License clue details
(mpl-2.0 OR epl-1.0) AND proprietary-license {'score': 20.37, 'matcher': '3-seq', 'end_line': 3, 'rule_url': 'https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mpl-2.0_or_epl-1.0_and_proprietary-license_2.RULE', 'from_file': None, 'start_line': 2, 'matched_text': ' * Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0,\n * and the EPL 1.0 (https://h2database.com/html/license.html).', 'match_coverage': 20.37, 'matched_length': 11, 'rule_relevance': 100, 'rule_identifier': 'mpl-2.0_or_epl-1.0_and_proprietary-license_2.RULE', 'license_expression': '(mpl-2.0 OR epl-1.0) AND proprietary-license', 'license_expression_spdx': '(MPL-2.0 OR EPL-1.0) AND LicenseRef-scancode-proprietary-license'}
URL Start line End line
https://h2database.com/html/license.html 3 3
Package URL License Primary language
pkg:osgi/com.h2database.source@2.2.220