|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mpxj.primavera.PrimaveraDatabaseReader
public final class PrimaveraDatabaseReader
This class provides a generic front end to read project data from a database.
| Constructor Summary | |
|---|---|
PrimaveraDatabaseReader()
|
|
| Method Summary | |
|---|---|
void |
addProjectListener(ProjectListener listener)
Add a listener to receive events as a project is being read. |
String |
getSchema()
Retrieve the name of the schema containing the Primavera tables. |
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 file where a File instance is supplied. |
ProjectFile |
read(InputStream inputStream)
Read a file where the contents of the project file are supplied via an input stream. |
ProjectFile |
read(String fileName)
Read a file where the file name is supplied. |
List<ProjectFile> |
readAll()
Convenience method which allows all projects in the database to be read in a single operation. |
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. |
void |
setSchema(String schema)
Set the name of the schema containing the Primavera tables. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PrimaveraDatabaseReader()
| Method Detail |
|---|
public void addProjectListener(ProjectListener listener)
addProjectListener in interface ProjectReaderlistener - ProjectListener instance
public Map<Integer,String> listProjects()
throws MPXJException
MPXJException
public ProjectFile read()
throws MPXJException
MPXJException
public List<ProjectFile> readAll()
throws MPXJException
MPXJExceptionpublic void setProjectID(int projectID)
projectID - project IDpublic void setDataSource(DataSource dataSource)
dataSource - data sourcepublic void setConnection(Connection connection)
connection - database connectionpublic ProjectFile read(String fileName)
read in interface ProjectReaderfileName - file name
public ProjectFile read(File file)
read in interface ProjectReaderfile - File instance
public ProjectFile read(InputStream inputStream)
read in interface ProjectReaderinputStream - InputStream instance
public void setSchema(String schema)
schema - schema name.public String getSchema()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||