|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface define the common operations that a source of data must provide.
Field Summary | |
static java.lang.String |
BEGIN_TABLE_TOKEN
This token marks the beginning of the data stored in a table when exporting/importing data to a file |
static java.lang.String |
END_TABLE_TOKEN
This token marks the end of the data of stored in a table when exporting/importing data to a file |
static java.lang.String |
EOL
This tokes marks the end of line when exporting/importing data to a file |
Method Summary | |
void |
commit()
This method commits the changes to the database and cleans the data maintained to allow rollback |
void |
connect()
Establish the connection to database and check the application user identification |
java.lang.String[] |
create(java.lang.String InitialDataSetFileName)
Creates a repository from an initial data file |
void |
disconnect()
This method disconnects from the database. |
void |
exportToFile(java.io.Writer w)
Export all the table data to file |
java.lang.String |
getCnnPassword()
This method returns the passsword used for JDBC connection to the repository |
java.lang.String |
getCnnUser()
Returns the user name used for JDBC connection |
java.sql.Connection |
getConnection()
Returns the JDBC connection |
Table |
getTable(java.lang.String name)
Returns the table that have the specified name. |
Table[] |
getTableList()
Returns the list of tables defined in the repository. |
java.lang.String |
getURLpath()
Returns the url to connect to the repository. |
TableRow |
getUser()
Returns the row in the Users table representing the application user |
java.lang.String |
getUserCode()
Returns the value of the application user code. |
java.lang.String |
getUserName()
Returns the value of the application user name. |
void |
importFromFile(java.io.Reader r)
Import all the tables data from a file |
boolean |
isModified()
Indicates if modifications have been done since last commit or rollback |
void |
markAsModified()
Marks the repository as modified, so commit or rollback is required |
void |
rollback()
This method undoes the changes made to the rows since the last commit or rollback |
void |
setConnectData(java.lang.String URLpath,
java.lang.String user,
java.lang.String password)
This method sets the connection data for a DefaultRepository object, with a given url, user and password. |
void |
setUser(java.lang.String userName,
java.lang.String password)
Sets the application user name and password, to be searched at the Users table at connection time |
Field Detail |
public static final java.lang.String BEGIN_TABLE_TOKEN
public static final java.lang.String END_TABLE_TOKEN
public static final java.lang.String EOL
Method Detail |
public void commit() throws RepositoryException
public void connect() throws RpConnectionException
public java.lang.String[] create(java.lang.String InitialDataSetFileName) throws WorkbenchException
InitialDataSetFileName
- java.lang.String The name of the file with the initial data (null if no initial data)public void disconnect() throws RpConnectionException
public void exportToFile(java.io.Writer w) throws WorkbenchException, java.io.IOException
w
- java.io.Writerpublic java.lang.String getCnnPassword()
public java.lang.String getCnnUser()
public java.sql.Connection getConnection()
public Table getTable(java.lang.String name)
public Table[] getTableList()
public java.lang.String getURLpath()
public TableRow getUser()
public java.lang.String getUserCode()
public java.lang.String getUserName()
public void importFromFile(java.io.Reader r) throws WorkbenchException, java.io.IOException
r
- java.io.Readerpublic boolean isModified()
public void markAsModified()
public void rollback() throws RepositoryException
public void setConnectData(java.lang.String URLpath, java.lang.String user, java.lang.String password)
URLpath
- java.lang.Stringuser
- java.lang.Stringpassword
- java.lang.Stringpublic void setUser(java.lang.String userName, java.lang.String password) throws WorkbenchException
userName
- java.lang.Stringpassword
- java.lang.String
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |