cvm.ucm.repository
Class SourceDBLoader

java.lang.Object
  extended by cvm.ucm.repository.SourceDBLoader
All Implemented Interfaces:
Sources

public class SourceDBLoader
extends java.lang.Object
implements Sources

This class retrieves a Macro from a database given a function name. There is no overloading of a function name. The schema for the table Macros, stored in the Repository db, is {name:string, returnType:string, paramTypeList:string, paramNameList:string, script:string}.

Author:
Abhishek B. and Marylurdys H.

Method Summary
static SourceDBLoader Instance(java.sql.Connection c)
          * This is the Instance implementation of Singleton Design Pattern.
 Macro loader(java.lang.String name)
          Construct the Macro object from the information stored in the database
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

Instance

public static SourceDBLoader Instance(java.sql.Connection c)
* This is the Instance implementation of Singleton Design Pattern.

Parameters:
c - Connection DB object.
Returns:
SourceDBLoader instance.

loader

public Macro loader(java.lang.String name)
             throws java.lang.Exception
Construct the Macro object from the information stored in the database

Specified by:
loader in interface Sources
Parameters:
name - : the name of the function
Returns:
Macro : the Macro object for the given function.
Throws:
java.lang.Exception
See Also:
Macro