- 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 SQLDATALINK
value. ADATALINK
value references a file outside of the underlying data source that the data source manages.RowSet
implementations can use the methodRowSet.getURL
to retrieve ajava.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.- Since:
- 1.5
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SerialDatalink(URL url)
Constructs a newSerialDatalink
object from the givenjava.net.URL
object.
-
Method Summary
Modifier and Type Method Description Object
clone()
Returns a clone of thisSerialDatalink
.boolean
equals(Object obj)
Compares thisSerialDatalink
to the specified object.URL
getDatalink()
Returns a new URL that is a copy of thisSerialDatalink
object.int
hashCode()
Returns a hash code for thisSerialDatalink
.
-
-
-
Constructor Detail
-
SerialDatalink
public SerialDatalink(URL url) throws SerialException
Constructs a newSerialDatalink
object from the givenjava.net.URL
object.- Parameters:
url
- theURL
to create theSerialDataLink
from- Throws:
SerialException
- if url parameter is a null
-
-
Method Detail
-
getDatalink
public URL getDatalink() throws SerialException
Returns a new URL that is a copy of thisSerialDatalink
object.- Returns:
- a copy of this
SerialDatalink
object as aURL
object in the Java programming language. - Throws:
SerialException
- if theURL
object cannot be de-serialized
-
equals
public boolean equals(Object obj)
Compares thisSerialDatalink
to the specified object. The result istrue
if and only if the argument is notnull
and is aSerialDatalink
object whose URL is identical to this object's URL- Overrides:
equals
in classObject
- Parameters:
obj
- The object to compare thisSerialDatalink
against- Returns:
true
if the given object represents aSerialDatalink
equivalent to this SerialDatalink,false
otherwise- See Also:
Object.hashCode()
,HashMap
-
hashCode
public int hashCode()
Returns a hash code for thisSerialDatalink
. The hash code for aSerialDatalink
object is taken as the hash code of theURL
it stores- Overrides:
hashCode
in classObject
- Returns:
- a hash code value for this object.
- See Also:
Object.equals(java.lang.Object)
,System.identityHashCode(java.lang.Object)
-
-