All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.dorm4.fls.StdLibraryObject

java.lang.Object
   |
   +----org.dorm4.fls.StdLibraryObject

public abstract class StdLibraryObject
extends Object
implements Serializable, Cloneable, ILibraryConstants
Base class for all library object classes to extend. There is a specific way for adding properties and creating the proper property arrays. See Book.java for an example.

See Also:
Book

Variable Index

 o m_homeLibrary

Constructor Index

 o StdLibraryObject(String, IRemoteLibrary)

Method Index

 o add()
Adds the object to the database
 o add(Object[][], Object[][])
Subclasses should call this to add their properties to the superclasses properties
 o clearProperty(int)
Clears the property property
 o clone()
Creates a clone of this object
 o equals(Object)
Tests if this object is exactly the same as obj.
 o getEditor()
Returns a (GUI?) editor specific for the type of object
 o getExtendedProperties()
Returns the extended propterties of this class.
 o getId()
Gets the id for this object
 o getProperties()
Gets all the properties of this object
 o getProperty(int)
Gets the property property of this object
 o getPropertyNames()
Gets the names of the property fields
 o remove()
Removes the object in the database
 o renumber(String)
Gives the object a new number in the database
 o setProperty(int, Object)
Sets the property property with the value value
 o toString()
 o update()
Updates the object in the database
 o validate()
Verifies that the object is in the database and sets its properties to the values in the database.

Variables

 o m_homeLibrary
 protected IRemoteLibrary m_homeLibrary

Constructors

 o StdLibraryObject
 protected StdLibraryObject(String id,
                            IRemoteLibrary library)

Methods

 o add
 protected static final Object[][] add(Object additionalPropertyNames[][],
                                       Object propertyNames[][])
Subclasses should call this to add their properties to the superclasses properties

 o getId
 public final String getId()
Gets the id for this object

 o getProperty
 public final Object getProperty(int property)
Gets the property property of this object

 o getProperties
 public final Object[] getProperties()
Gets all the properties of this object

 o setProperty
 public final void setProperty(int property,
                               Object value)
Sets the property property with the value value

 o clearProperty
 public final void clearProperty(int property)
Clears the property property

 o getPropertyNames
 public final String[] getPropertyNames()
Gets the names of the property fields

 o getExtendedProperties
 public abstract Object[][] getExtendedProperties()
Returns the extended propterties of this class. Non-static so that it may be overriden.

 o getEditor
 public IObjectEditor getEditor()
Returns a (GUI?) editor specific for the type of object

 o validate
 public StdLibraryObject validate() throws RecordNotFoundException, RemoteException
Verifies that the object is in the database and sets its properties to the values in the database.

Returns:
this
Throws: RecordNotFoundException
Thrown if the object isn't in the database.
 o add
 public void add() throws CannotAllowException, RemoteException
Adds the object to the database

Returns:
Returns true if the method succeeded, false otherwise.
Throws: CannotAllowException
Thrown if access is denied.
 o remove
 public void remove() throws CannotAllowException, RecordNotFoundException, RemoteException
Removes the object in the database

Returns:
Returns true if the method succeeded, false otherwise.
Throws: CannotAllowException
Thrown if access is denied.
Throws: RecordNotFoundException
Thrown if the object isn't in the database.
 o update
 public void update() throws CannotAllowException, RecordNotFoundException, RemoteException
Updates the object in the database

Returns:
Returns true if the method succeeded, false otherwise.
Throws: CannotAllowException
Thrown if access is denied.
Throws: RecordNotFoundException
Thrown if the object isn't in the database.
 o renumber
 public void renumber(String newid) throws CannotAllowException, RecordNotFoundException, RemoteException
Gives the object a new number in the database

Returns:
Returns true if the method succeeded, false otherwise.
Throws: CannotAllowException
Thrown if access is denied.
Throws: RecordNotFoundException
Thrown if the object isn't in the database.
 o toString
 public String toString()
Overrides:
toString in class Object
 o clone
 public final Object clone()
Creates a clone of this object

Overrides:
clone in class Object
 o equals
 public boolean equals(Object obj)
Tests if this object is exactly the same as obj.

Overrides:
equals in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index