Methods Summary |
---|
public final void | addPropertyChangeListener(java.beans.PropertyChangeListener l)Add a property change listener.
getImpl().addPropertyChangeListener(l);
|
public final void | addVetoableChangeListener(java.beans.VetoableChangeListener l)Add a vetoable change listener.
getImpl().addVetoableChangeListener(l);
|
public int | compareTo(java.lang.Object o)Compares this object with the specified object for order. Returns a negative integer, zero,
or a positive integer as this object is less than, equal to, or greater than the specified object.
The specified object must be persistence element, meaning it must be an instance of class
PersistenceElement or any subclass. If not a ClassCastException is thrown.
The order of PersistenceElement objects is defined by the order of their names.
Persistence elements without name are considered to be less than any named persistence element.
// null is not allowed
if (o == null)
throw new ClassCastException();
if (o == this)
return 0;
String thisName = getName();
// the following statement throws a ClassCastException if o is not a PersistenceElement
String otherName = ((PersistenceElement)o).getName();
// if this does not have a name it should compare less than any named object
if (thisName == null)
return (otherName == null) ? 0 : -1;
// if this is named and o does not have a name it should compare greater
if (otherName == null)
return 1;
// now we know that this and o are named persistence elements =>
// use locale-sensitive String comparison
int ret = Collator.getInstance().compare(thisName, otherName);
// if both names are equal, both objects might have different types.
// If so order both objects by their type names (necessary to be consistent with equals)
if ((ret == 0) && (getClass() != o.getClass()))
ret = getClass().getName().compareTo(o.getClass().getName());
return ret;
|
public boolean | equals(java.lang.Object obj)Overrides Object's equals method by comparing the name of this persistence element
with the name of the argument obj. The method returns false if obj does not have
the same dynamic type as this persistence element.
if (obj == null)
return false;
if (obj == this)
return true;
// check for the right class and then do the name check by calling compareTo.
return (getClass() == obj.getClass()) && (compareTo(obj) == 0);
|
public final com.sun.jdo.api.persistence.model.jdo.PersistenceElement$Impl | getImpl() return _impl;
|
protected static final java.util.ResourceBundle | getMessages() return _messages;
|
public java.lang.String | getName()Get the name of this persistence element. return getImpl().getName();
|
public int | hashCode()Overrides Object's hashCode method to return the hashCode of this persistence element's name.
return (getName()==null) ? 0 : getName().hashCode();
|
public final void | removePropertyChangeListener(java.beans.PropertyChangeListener l)Remove a property change listener.
getImpl().removePropertyChangeListener(l);
|
public final void | removeVetoableChangeListener(java.beans.VetoableChangeListener l)Remove a vetoable change listener.
getImpl().removeVetoableChangeListener(l);
|
public void | setImpl(com.sun.jdo.api.persistence.model.jdo.PersistenceElement$Impl impl)Set the implementation factory of this persistence element.
This method should only be used internally and for cloning
and archiving.
_impl = impl;
if (_impl != null)
getImpl().attachToElement(this);
|
public void | setName(java.lang.String name)Set the name of this persistence element.
getImpl().setName(name);
|
public java.lang.String | toString()Overrides Object's toString method to return the name
of this persistence element. return getName();
|