public class ExternalResource extends java.lang.Object implements Deletable, WrappedResource, java.io.Externalizable
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Long |
id
The resource ID.
|
| Constructor and Description |
|---|
ExternalResource() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Perform actual delete of an resource.
|
boolean |
equals(java.lang.Object obj)
Check if this instance equals the given one.
|
int |
hashCode()
Compute the hashcode of this instance.
|
java.lang.Long |
id()
Get this resource's ID.
|
void |
id(long id)
Set this resource's ID.
|
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
boolean |
unknown()
Reports if this object is unknown.
|
boolean |
valid()
Reports if this object is valid for use.
|
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitallowDeletepublic boolean valid()
valid in interface WrappedResourcetrue.public boolean unknown()
unknown in interface WrappedResourcefalse.public java.lang.Long id()
id in interface WrappedResourcepublic void id(long id)
id in interface WrappedResourceid - The resource's ID.public void delete()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The object to check.true if obj is a ExternalResource and its
id is the same as the one in this instance.public int hashCode()
hashCode in class java.lang.ObjectLong.hashCode(long) called on the id.public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizableout - The output destination to which fields will be saved.java.io.IOException - In case of I/O errors.public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablein - The input source from which fields will be restored.java.io.IOException - In case of I/O errors.java.lang.ClassNotFoundException - If payload can't be instantiated.