gov.virginia.dcjs.jini.service
Class AccessService
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
gov.virginia.dcjs.jini.service.GenericService
gov.virginia.dcjs.jini.service.GenericDatabaseService
gov.virginia.dcjs.jini.service.AccessService
- All Implemented Interfaces:
- net.jini.admin.Administrable, AdministrableRMI, DatabaseService, DatabaseServiceRMI, com.sun.jini.admin.DestroyAdmin, java.util.EventListener, java.rmi.Remote, java.io.Serializable, ServiceAdmin, net.jini.lookup.ServiceIDListener
- public class AccessService
- extends GenericDatabaseService
- implements DatabaseServiceRMI, AdministrableRMI
This class manages all MS Access DSNs on a particular machine that
* are to be utilized by Java clients.
- See Also:
- Serialized Form
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
|
Method Summary |
protected java.lang.String |
getDateFunction(int format)
Provides the database specific function for returning the current
* date, i.e. |
protected int |
getGeneralFieldType(java.lang.String name)
Generalize the field type into one of four categories:
*
* TEXT
* DATE
* BOOLEAN
* OTHERTYPE
*
* @param name Type name specific to the database. |
protected void |
initializeServiceName()
Specify this service's unique name. |
static void |
main(java.lang.String[] args)
|
protected java.lang.String |
makeBoolean(java.lang.String value)
Prepare the provided value to make it an acceptable boolean value. |
protected java.lang.String |
makeDate(java.lang.String value)
Prepare the provided value to make it an acceptable date literal value. |
protected java.lang.String |
makeNumeric(java.lang.String value)
Prepare the provided value to make it an acceptable numeric value. |
protected java.lang.String |
makeText(java.lang.String value)
Prepare the provided value to make it an acceptable text string. |
| Methods inherited from class gov.virginia.dcjs.jini.service.GenericDatabaseService |
addSource, delete, finalize, insert, insert, insert, isSentinal, logWrite, makeOther, obtainDataSources, releaseDataSources, select, select, start, stop, update |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.jini.admin.Administrable |
getAdmin |
AccessService
public AccessService()
throws java.rmi.RemoteException
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
initializeServiceName
protected void initializeServiceName()
- Specify this service's unique name. Called from
* GenericService topmost super class.
- Specified by:
initializeServiceName in class GenericService
getDateFunction
protected java.lang.String getDateFunction(int format)
- Provides the database specific function for returning the current
* date, i.e. 01/01/2001, or the current date AND time, i.e.
* 01/01/2001 00:00:01.
* @param format
DatabaseService constant representing
* the desired format, whether just the date, or the time as well.
* @return Function signature for obtaining the current date from
* the database.
- Specified by:
getDateFunction in class GenericDatabaseService
getGeneralFieldType
protected int getGeneralFieldType(java.lang.String name)
- Generalize the field type into one of four categories:
*
* - TEXT
* - DATE
* - BOOLEAN
* - OTHERTYPE
*
* @param name Type name specific to the database.
* @return Integer value depicting the general type.
- Specified by:
getGeneralFieldType in class GenericDatabaseService
makeText
protected java.lang.String makeText(java.lang.String value)
- Prepare the provided value to make it an acceptable text string.
* Essentially, the provided value is surrounded in single quotes,
* and existing single quotes within the string are changed to the
* grave (`) character.
* @param value Text field value to prepare.
* @return Properly formatted text field value.
- Specified by:
makeText in class GenericDatabaseService
makeBoolean
protected java.lang.String makeBoolean(java.lang.String value)
- Prepare the provided value to make it an acceptable boolean value.
* @param value Value to be prepared (either "true" or "false").
* @return Properly converted boolean representation for this value.
- Specified by:
makeBoolean in class GenericDatabaseService
makeNumeric
protected java.lang.String makeNumeric(java.lang.String value)
- Prepare the provided value to make it an acceptable numeric value.
* @param value Value to be prepared.
* @return Properly converted numeric representation for this value.
- Specified by:
makeNumeric in class GenericDatabaseService
makeDate
protected java.lang.String makeDate(java.lang.String value)
- Prepare the provided value to make it an acceptable date literal value.
* Note: Date function signatures will remain unchanged.
* @param value Date string to make into the literal
* @return Properly converted value into a date literal.
- Overrides:
makeDate in class GenericDatabaseService