All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class org.dorm4.fls.Maintainer
java.lang.Object
   |
   +----org.dorm4.fls.Maintainer
  -  public class Maintainer
  -  extends Object
  -  implements ILibraryConstants
Class to maintain tables in the library
   
  -   Maintainer(OutputStream, Connection) Maintainer(OutputStream, Connection)
-   
   
  -   addType(Item, int) addType(Item, int)
-   Creates a table for an Item and associates a default loan period and registers it
 
  
-   addType(StdLibraryObject) addType(StdLibraryObject)
-   Creates a table for the object and registers it
 
  
-   createDefaultDatabase(String, String) createDefaultDatabase(String, String)
-   Does most of the default setup and creation for a new database
 
  
-   getInfo(String) getInfo(String)
-   Gets a value from the info table
  
-   getName() getName()
-   Gets the name of the library
  
-   getRegisteredTypes() getRegisteredTypes()
-   Gets an array of class names for all registered types
  
-   isTypeRegistered(StdLibraryObject) isTypeRegistered(StdLibraryObject)
-   Checks to see if the type is registered
  
-   main(String[]) main(String[])
-  
  
-   removeType(StdLibraryObject) removeType(StdLibraryObject)
-   Removes the table for the object and unregisters it
 
  
-   setInfo(String, String) setInfo(String, String)
-   Sets a value in the info table
  
-   setLoanPeriod(Item, int) setLoanPeriod(Item, int)
-   Associates a default loan period with an Item
 
  
-   setName(String) setName(String)
-   Sets the name of the library
 
   
 Maintainer
Maintainer
 public Maintainer(OutputStream out,
                   Connection con)
  - 
    -  Parameters:
    
-  out - The OutputStreamthat log messages are sent to.
-  con - The connection to the database.
  
 
   
 main
main
 public static void main(String args[])
 getName
getName
 public String getName()
  -  Gets the name of the library
 
 setName
setName
 public boolean setName(String name)
  -  Sets the name of the library
   
- 
    -  Returns:
    
-  success
  
 
 addType
addType
 public boolean addType(StdLibraryObject obj)
  -  Creates a table for the object and registers it
   
- 
    -  Parameters:
    
-  obj - Object to model the table after
    
-  Returns:
    
-  success
    
-  Throws: IllegalArgumentException
    
-  Thrown if the object already has a table
  
 
 addType
addType
 public boolean addType(Item itemType,
                        int loanPeriod)
  -  Creates a table for an Item and associates a default loan period and registers it
   
- 
    -  Parameters:
    
-  obj - Item to model the table after
    -  loanPeriod - Default loan period for the item in days
    
-  Returns:
    
-  success
    
-  Throws: IllegalArgumentException
    
-  Thrown if the object already has a table
  
 
 removeType
removeType
 public boolean removeType(StdLibraryObject obj)
  -  Removes the table for the object and unregisters it
   
- 
    -  Parameters:
    
-  obj - Object the table is modelled after
    
-  Returns:
    
-  success
  
 
 getRegisteredTypes
getRegisteredTypes
 public String[] getRegisteredTypes()
  -  Gets an array of class names for all registered types
 
 isTypeRegistered
isTypeRegistered
 public boolean isTypeRegistered(StdLibraryObject obj)
  -  Checks to see if the type is registered
 
 getInfo
getInfo
 public String getInfo(String key)
  -  Gets a value from the info table
 
 setInfo
setInfo
 public boolean setInfo(String key,
                        String value)
  -  Sets a value in the info table
 
 setLoanPeriod
setLoanPeriod
 public boolean setLoanPeriod(Item itemType,
                              int loanPeriod)
  -  Associates a default loan period with an Item
   
- 
    -  Parameters:
    
-  itemType - Item set the loan period for
    -  loanPeriod - Default loan period for the Item in days
    
-  Returns:
    
-  success
  
 
 createDefaultDatabase
createDefaultDatabase
 public boolean createDefaultDatabase(String name,
                                      String altName)
  -  Does most of the default setup and creation for a new database
   
- 
    -  Returns:
    
-  success
  
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index