ajax.wrappers.file
Class FileWrapper
java.lang.Object
|
+--ajax.wrappers.file.FileWrapper
- All Implemented Interfaces:
- Wrapper
- public class FileWrapper
- extends java.lang.Object
- implements Wrapper
Implements the access to a file
Storage units are files
Constructor Summary |
FileWrapper(java.lang.String createQuery)
Create a file wrapper with the given query. |
Method Summary |
void |
close()
Close the file associated to this wrapper |
java.sql.ResultSet |
executeQuery(java.lang.String query)
Execute the select query given in argument. |
int |
executeUpdate(java.lang.String sql)
Execute the update query given in argument. |
static Wrapper |
open(java.lang.String fileName)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FileWrapper
public FileWrapper(java.lang.String createQuery)
throws WrapperException
- Create a file wrapper with the given query.
- Parameters:
createQuery
- SQL CREATE query
executeQuery
public java.sql.ResultSet executeQuery(java.lang.String query)
throws java.sql.SQLException
- Execute the select query given in argument.
- Specified by:
executeQuery
in interface Wrapper
- Parameters:
querySQL
- SELECT query- Returns:
- the result
executeUpdate
public int executeUpdate(java.lang.String sql)
throws WrapperException
- Execute the update query given in argument.
- Specified by:
executeUpdate
in interface Wrapper
- Parameters:
querySQL
- INSERT query- See Also:
Statement.executeUpdate(String)
open
public static Wrapper open(java.lang.String fileName)
throws WrapperException
close
public void close()
throws WrapperException
- Close the file associated to this wrapper
- Specified by:
close
in interface Wrapper
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object