ttomcat-1778514358873.zip-extract/_dependencies/maven/com.h2database_h2-2.2.220/org/h2/expression/ParameterRemote.java

Path
ttomcat-1778514358873.zip-extract/_dependencies/maven/com.h2database_h2-2.2.220/org/h2/expression/ParameterRemote.java
Status
scanned
Type
file
Name
ParameterRemote.java
Extension
.java
Programming language
Java
Mime type
text/x-java
File type
Java source, ASCII text
Tag

      
    
Rootfs path

      
    
Size
2230 (2.2 KB)
MD5
d64547f61b84aa22ed14dc584a890b56
SHA1
6099c58038d339bde9dec35d51997f4df3ca0ff0
SHA256
3c06f7b9d095af0c05dac9facf17b337515fc028a546a14dac53c3a1a6ac2e4a
SHA512

      
    
SHA1_git
84d89a3fccd40d3246ab658c346c055f74c88d09
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
ParameterRemote.java | 2.2 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.expression; import java.io.IOException; import java.sql.ResultSetMetaData; import org.h2.api.ErrorCode; import org.h2.message.DbException; import org.h2.value.Transfer; import org.h2.value.TypeInfo; import org.h2.value.Value; import org.h2.value.ValueLob; /** * A client side (remote) parameter. */ public class ParameterRemote implements ParameterInterface { private Value value; private final int index; private TypeInfo type = TypeInfo.TYPE_UNKNOWN; private int nullable = ResultSetMetaData.columnNullableUnknown; public ParameterRemote(int index) { this.index = index; } @Override public void setValue(Value newValue, boolean closeOld) { if (closeOld && value instanceof ValueLob) { ((ValueLob) value).remove(); } value = newValue; } @Override public Value getParamValue() { return value; } @Override public void checkSet() { if (value == null) { throw DbException.get(ErrorCode.PARAMETER_NOT_SET_1, "#" + (index + 1)); } } @Override public boolean isValueSet() { return value != null; } @Override public TypeInfo getType() { return value == null ? type : value.getType(); } @Override public int getNullable() { return nullable; } /** * Read the parameter meta data from the transfer object. * * @param transfer the transfer object * @throws IOException on failure */ public void readMetaData(Transfer transfer) throws IOException { type = transfer.readTypeInfo(); nullable = transfer.readInt(); } /** * Write the parameter meta data to the transfer object. * * @param transfer the transfer object * @param p the parameter * @throws IOException on failure */ public static void writeMetaData(Transfer transfer, ParameterInterface p) throws IOException { transfer.writeTypeInfo(p.getType()).writeInt(p.getNullable()); } }
Detected license expression

      
    
Detected license expression (SPDX)

      
    
Percentage of license text
4.95
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