public class AstaJdbcReader extends AbstractProjectFileReader
Constructor and Description |
---|
AstaJdbcReader() |
Modifier and Type | Method and Description |
---|---|
protected void |
allocateResources(File file)
Allocate any resources necessary to work with the database before we start reading.
|
protected List<net.sf.mpxj.asta.Row> |
getRows(String table,
Map<String,Integer> keys)
Retrieve a set of rows from a named table matching the supplied keys.
|
Map<Integer,String> |
listProjects()
Populates a Map instance representing the IDs and names of
projects available in the current database.
|
ProjectFile |
read()
Read a project from the current data source.
|
ProjectFile |
read(File file)
Read a single schedule from a file where a File instance is supplied.
|
List<ProjectFile> |
readAll(File file)
Default implementation of readAll.
|
protected void |
releaseResources()
Release any resources once we've finished reading.
|
void |
setConnection(Connection connection)
Sets the connection.
|
void |
setDataSource(DataSource dataSource)
Set the data source.
|
void |
setProjectID(int projectID)
Set the ID of the project to be read.
|
read, read, readAll, readAll
addListenersToProject, addListenersToReader, addProjectListener
public void setDataSource(DataSource dataSource)
dataSource
- data sourcepublic void setConnection(Connection connection)
connection
- database connectionprotected List<net.sf.mpxj.asta.Row> getRows(String table, Map<String,Integer> keys) throws net.sf.mpxj.asta.AstaDatabaseException
table
- table to retrieve rows fromkeys
- name and integer value keysnet.sf.mpxj.asta.AstaDatabaseException
protected void allocateResources(File file) throws net.sf.mpxj.asta.AstaDatabaseException
file
- database filenet.sf.mpxj.asta.AstaDatabaseException
protected void releaseResources()
public Map<Integer,String> listProjects() throws MPXJException
MPXJException
public ProjectFile read() throws MPXJException
MPXJException
public void setProjectID(int projectID)
projectID
- project IDpublic ProjectFile read(File file) throws MPXJException
ProjectReader
file
- File instanceMPXJException
public List<ProjectFile> readAll(File file) throws MPXJException
AbstractProjectFileReader
readAll
in interface ProjectReader
readAll
in class AbstractProjectFileReader
file
- File instanceMPXJException
Copyright © 2000–2024 Packwood Software. All rights reserved.