|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mpxj.mpd.MPD9DatabaseReader
public final class MPD9DatabaseReader
This class reads project data from an MPD9 format database.
| Field Summary | |
|---|---|
protected ProjectFile |
m_project
|
protected Integer |
m_projectID
|
| Constructor Summary | |
|---|---|
MPD9DatabaseReader()
|
|
| Method Summary | |
|---|---|
void |
addProjectListener(ProjectListener listener)
Add a listener to receive events as a project is being read. |
Double |
getDefaultOnNull(Double value,
Double defaultValue)
Returns a default value if a null value is found. |
Integer |
getDefaultOnNull(Integer value,
Integer defaultValue)
Returns a default value if a null value is found. |
Map<Integer,String> |
listProjects()
Populates a Map instance representing the IDs and names of projects available in the current database. |
protected void |
postProcessing()
Carry out any post-processing required to tidy up the data read from the database. |
protected void |
processAssignment(net.sf.mpxj.mpd.Row row)
Process a resource assignment. |
protected void |
processAssignmentBaseline(net.sf.mpxj.mpd.Row row)
Read resource assignment baseline values. |
protected void |
processCalendar(net.sf.mpxj.mpd.Row row)
Read a calendar. |
protected void |
processCalendarData(ProjectCalendar calendar,
net.sf.mpxj.mpd.Row row)
Read calendar hours and exception data. |
protected void |
processDateField(net.sf.mpxj.mpd.Row row)
Read a single date field extended attribute. |
protected void |
processDurationField(net.sf.mpxj.mpd.Row row)
Read a single duration field extended attribute. |
protected void |
processField(net.sf.mpxj.mpd.Row row,
String fieldIDColumn,
Integer entityID,
Object value)
Generic method to process an extended attribute field. |
protected void |
processField(net.sf.mpxj.mpd.Row row,
String fieldIDColumn,
String entityIDColumn,
Object value)
Generic method to process an extended attribute field. |
protected void |
processFlagField(net.sf.mpxj.mpd.Row row)
Read a single flag field extended attribute. |
protected void |
processLink(net.sf.mpxj.mpd.Row row)
Process a relationship between two tasks. |
protected void |
processNumberField(net.sf.mpxj.mpd.Row row)
Read a single number field extended attribute. |
protected void |
processOutlineCodeField(Integer entityID,
net.sf.mpxj.mpd.Row row)
Read a single outline code field extended attribute. |
protected void |
processProjectHeader(net.sf.mpxj.mpd.Row row)
Reads the project header. |
protected void |
processProjectListItem(Map<Integer,String> result,
net.sf.mpxj.mpd.Row row)
Retrieve the details of a single project from the database. |
protected void |
processResource(net.sf.mpxj.mpd.Row row)
Process a resource. |
protected void |
processResourceBaseline(net.sf.mpxj.mpd.Row row)
Read resource baseline values. |
protected void |
processTask(net.sf.mpxj.mpd.Row row)
Process a task. |
protected void |
processTaskBaseline(net.sf.mpxj.mpd.Row row)
Read task baseline values. |
protected void |
processTextField(net.sf.mpxj.mpd.Row row)
Read a single text field extended attribute. |
ProjectFile |
read()
Read a project from the current data source. |
protected void |
reset()
Called to reset internal state prior to reading a new project. |
void |
setConnection(Connection connection)
Sets the connection to be used to read the project data. |
void |
setDataSource(DataSource dataSource)
Sets the data source used to read the project data. |
void |
setPreserveNoteFormatting(boolean preserveNoteFormatting)
This method sets a flag to indicate whether the RTF formatting associated with notes should be preserved or removed. |
void |
setProjectID(Integer projectID)
Sets the ID of the project to be read. |
protected void |
updateBaseCalendarNames()
The way calendars are stored in an MPP9 file means that there can be forward references between the base calendar unique ID for a derived calendar, and the base calendar itself. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Integer m_projectID
protected ProjectFile m_project
| Constructor Detail |
|---|
public MPD9DatabaseReader()
| Method Detail |
|---|
public void addProjectListener(ProjectListener listener)
listener - ProjectListener instance
public Map<Integer,String> listProjects()
throws MPXJException
MPXJException
public ProjectFile read()
throws MPXJException
MPXJExceptionpublic void setDataSource(DataSource dataSource)
dataSource - data sourcepublic void setConnection(Connection connection)
connection - database connectionprotected void reset()
protected void processProjectListItem(Map<Integer,String> result,
net.sf.mpxj.mpd.Row row)
result - Map instance containing the resultsrow - result set row read from the databaseprotected void processProjectHeader(net.sf.mpxj.mpd.Row row)
row - project header dataprotected void processCalendar(net.sf.mpxj.mpd.Row row)
row - calendar data
protected void processCalendarData(ProjectCalendar calendar,
net.sf.mpxj.mpd.Row row)
calendar - parent calendarrow - calendar hours and exception dataprotected void updateBaseCalendarNames()
protected void processResource(net.sf.mpxj.mpd.Row row)
row - resource dataprotected void processResourceBaseline(net.sf.mpxj.mpd.Row row)
row - result set rowprotected void processTextField(net.sf.mpxj.mpd.Row row)
row - field dataprotected void processNumberField(net.sf.mpxj.mpd.Row row)
row - field dataprotected void processFlagField(net.sf.mpxj.mpd.Row row)
row - field dataprotected void processDurationField(net.sf.mpxj.mpd.Row row)
row - field dataprotected void processDateField(net.sf.mpxj.mpd.Row row)
row - field data
protected void processOutlineCodeField(Integer entityID,
net.sf.mpxj.mpd.Row row)
entityID - parent entityrow - field data
protected void processField(net.sf.mpxj.mpd.Row row,
String fieldIDColumn,
String entityIDColumn,
Object value)
row - extended attribute datafieldIDColumn - column containing the field IDentityIDColumn - column containing the entity IDvalue - field value
protected void processField(net.sf.mpxj.mpd.Row row,
String fieldIDColumn,
Integer entityID,
Object value)
row - extended attribute datafieldIDColumn - column containing the field IDentityID - parent entity IDvalue - field valueprotected void processTask(net.sf.mpxj.mpd.Row row)
row - task dataprotected void processTaskBaseline(net.sf.mpxj.mpd.Row row)
row - result set rowprotected void processLink(net.sf.mpxj.mpd.Row row)
row - relationship dataprotected void processAssignment(net.sf.mpxj.mpd.Row row)
row - resource assignment dataprotected void processAssignmentBaseline(net.sf.mpxj.mpd.Row row)
row - result set rowprotected void postProcessing()
public Double getDefaultOnNull(Double value,
Double defaultValue)
value - value under testdefaultValue - default if value is null
public Integer getDefaultOnNull(Integer value,
Integer defaultValue)
value - value under testdefaultValue - default if value is null
public void setProjectID(Integer projectID)
projectID - project IDpublic void setPreserveNoteFormatting(boolean preserveNoteFormatting)
preserveNoteFormatting - boolean flag
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||