Class SerialDatalink
- java.lang.Object
-
- javax.sql.rowset.serial.SerialDatalink
- All Implemented Interfaces:
- Serializable, Cloneable
public class SerialDatalink extends Object implements Serializable, Cloneable
A serialized mapping in the Java programming language of an SQL DATALINK value. A DATALINK value references a file outside of the underlying data source that the data source manages.
RowSet implementations can use the method RowSet.getURL to retrieve a java.net.URL object, which can be used to manipulate the external data.
java.net.URL url = rowset.getURL(1);
Thread safety
A SerialDatalink is not safe for use by multiple concurrent threads. If a SerialDatalink is to be used by more than one thread then access to the SerialDatalink should be controlled by appropriate synchronization.- See Also:
- Serialized Form
Constructors
| Constructor and Description |
|---|
SerialDatalink(URL url) Constructs a new |
Methods
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() Returns a clone of this |
boolean |
equals(Object obj) Compares this |
URL |
getDatalink() Returns a new URL that is a copy of this |
int |
hashCode() Returns a hash code for this |
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait Constructors
SerialDatalink
public SerialDatalink(URL url)
throws SerialException Constructs a new SerialDatalink object from the given java.net.URL object.
- Parameters:
-
url- theURLto create theSerialDataLinkfrom - Throws:
-
SerialException- if url parameter is a null
Methods
getDatalink
public URL getDatalink()
throws SerialException Returns a new URL that is a copy of this SerialDatalink object.
- Returns:
- a copy of this
SerialDatalinkobject as aURLobject in the Java programming language. - Throws:
-
SerialException- if theURLobject cannot be de-serialized
equals
public boolean equals(Object obj)
Compares this SerialDatalink to the specified object. The result is true if and only if the argument is not null and is a SerialDatalink object whose URL is identical to this object's URL
- Overrides:
-
equalsin classObject - Parameters:
-
obj- The object to compare thisSerialDatalinkagainst - Returns:
-
trueif the given object represents aSerialDatalinkequivalent to this SerialDatalink,falseotherwise - See Also:
-
Object.hashCode(),HashMap
hashCode
public int hashCode()
Returns a hash code for this SerialDatalink. The hash code for a SerialDatalink object is taken as the hash code of the URL it stores
- Overrides:
-
hashCodein classObject - Returns:
- a hash code value for this object.
- See Also:
-
Object.equals(java.lang.Object),System.identityHashCode(java.lang.Object)
clone
public Object clone()
Returns a clone of this SerialDatalink.
© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/javase/8/docs/api/javax/sql/rowset/serial/SerialDatalink.html