public class IlvJDBCGanttModel extends IlvTableGanttModel
An implementation of the IlvGanttModel interface
that connects to a database through JDBC to get the definition of the
activities, resources, constraints and reservation with simple mapping
configuration. Optionally modifications on the model will be forwarded
back to the database if read-only option is de-activated.
In practice IlvJDBCGanttModel is an
IlvTableGanttModel
subclass that uses IlvRowSetTableModel
instances to fill the model with activities, resources,
constraints and reservations.
If advanced features that are not available in this class are required (such
as switching off auto-commit or mapping to several columns for a single
property), it is possible to directly use the
IlvTableGanttModel
class and configure IlvTableModelMapper
instances.
The following is an example of how to use this class. Considering the given GANTT_TABLE in a database:
| ACTIVITY | ARRIVAL | DEPARTURE | RESOURCE | METADATA |
|---|---|---|---|---|
| A1 | 10/17/03 | 04/02/04 | R1 | Whatever |
| ... | ... | ... | ... | ... |
The following code allows you to read its content in the given gantt model:
// true in the constructor means that the model will be read-only
IlvJDBCGanttModel jdbcGanttModel = new IlvJDBCGanttModel(true);
Connection connection = DriverManager.getConnection(databaseURL, user, passwd);
Map activitiesMapping = new HashMap();
activitiesMapping.put(IlvTableActivity.ID_PROPERTY, "ACTIVITY");
activitiesMapping.put(IlvTableActivity.NAME_PROPERTY, "ACTIVITY");
activitiesMapping.put(IlvTableActivity.START_TIME_PROPERTY, "ARRIVAL");
activitiesMapping.put(IlvTableActivity.END_TIME_PROPERTY, "DEPARTURE");
activitiesMapping.put(IlvTableActivity.PARENT_ID_PROPERTY, "ACTIVITY_PARENT");
// user property
activitiesMapping.put("MyUserProperty", "METADATA");
jdbcGanttModel.setActivitiesQuery(connection, "select ACTIVITY,
ARRIVAL, DEPARTURE,
// no parent => Null
Null as ACTIVITY_PARENT,
METADATA
from GANTT_TABLE",
activitiesMapping);
Map resourcesMapping = new HashMap();
resourcesMapping.put(IlvTableResource.ID_PROPERTY, "RESOURCE");
resourcesMapping.put(IlvTableResource.NAME_PROPERTY, "RESOURCE");
resourcesMapping.put(IlvTableResource.PARENT_ID_PROPERTY, "RESOURCE_PARENT");
// for this one use column index for mapping not column name
resourcesMapping.put(IlvTableResource.QUANTITY_PROPERTY, new Integer(2));
jdbcGanttModel.setResourcesQuery(connection, "select RESOURCE,
// no parent => null
Null as RESOURCE_PARENT,
'1'
from GANTT_TABLE group by RESOURCE",
resourcesMapping);
Map reservationsMapping = new HashMap();
reservationsMapping.put(IlvTableReservation.ACTIVITY_ID_PROPERTY, "ACTIVITY");
reservationsMapping.put(IlvTableReservation.RESOURCE_ID_PROPERTY, "RESOURCE");
jdbcGanttModel.setReservationsQuery(connection, "select ACTIVITY, RESOURCE
from GANTT_TABLE",
reservationsMapping);
// read the data in the IlvJDBCGanttModel
jdbcGanttModel.initializeMapping();
ADJUSTING_PROPERTY, BATCHING_PROPERTY| Constructor and Description |
|---|
IlvJDBCGanttModel()
Builds a read-only
IlvJDBCGanttModel that will be configured
later on. |
IlvJDBCGanttModel(boolean readonly)
Builds
IlvJDBCGanttModel that will be configured later on. |
IlvJDBCGanttModel(Connection connection,
String activitiesQuery,
Map activitiesMapping,
String resourcesQuery,
Map resourcesMapping,
String constraintsQuery,
Map constraintsMapping,
Object[] constraintTypesMapping,
String reservationsQuery,
Map reservationsMapping)
Builds a read-only
IlvJDBCGanttModel from a single JDBC Connection,
four queries and mapping information from queries columns to gantt properties. |
IlvJDBCGanttModel(Connection connection,
String activitiesQuery,
Map activitiesMapping,
String resourcesQuery,
Map resourcesMapping,
String constraintsQuery,
Map constraintsMapping,
Object[] constraintTypesMapping,
String reservationsQuery,
Map reservationsMapping,
boolean readonly)
Builds a
IlvJDBCGanttModel from a single JDBC Connection,
four queries and mapping information from queries columns to gantt properties. |
IlvJDBCGanttModel(Connection connection,
String activitiesQuery,
Object[] activitiesQueryParameters,
Map activitiesMapping,
String resourcesQuery,
Object[] resourcesQueryParameters,
Map resourcesMapping,
String constraintsQuery,
Object[] constraintsQueryParameters,
Map constraintsMapping,
Object[] constraintTypesMapping,
String reservationsQuery,
Object[] reservationsQueryParameters,
Map reservationsMapping,
boolean readonly)
Builds a
IlvJDBCGanttModel from a single JDBC Connection,
four queries and mapping information from queries columns to gantt properties. |
IlvJDBCGanttModel(ResultSet activitiesResultSet,
Map activitiesMapping,
ResultSet resourcesResultSet,
Map resourcesMapping,
ResultSet constraintsResultSet,
Map constraintsMapping,
Object[] constraintTypesMapping,
ResultSet reservationsResultSet,
Map reservationsMapping)
Builds a read-only
IlvJDBCGanttModel from four ResultSet
and mapping information from queries columns to gantt properties. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isReadOnly()
Returns whether or not this model is read-only.
|
void |
setActivitiesQuery(Connection connection,
String query,
Map mapping)
Configures the
IlvJDBCGanttTableModel to use the given query
for activities. |
void |
setActivitiesQuery(Connection connection,
String query,
Object[] queryParameters,
Map mapping)
Configures the
IlvJDBCGanttTableModel to use the given query
for activities. |
void |
setActivitiesResultSet(ResultSet resultSet,
Map mapping)
Configures the
IlvJDBCGanttTableModel to use the given ResultSet
for activities. |
void |
setConstraintsQuery(Connection connection,
String query,
Map mapping,
Object[] typesMapping)
Configures the
IlvJDBCGanttTableModel to use the given query
for constraints. |
void |
setConstraintsQuery(Connection connection,
String query,
Object[] queryParameters,
Map mapping,
Object[] typesMapping)
Configures the
IlvJDBCGanttTableModel to use the given query
for constraints. |
void |
setConstraintsResultSet(ResultSet resultSet,
Map mapping,
Object[] typesMapping)
Configures the
IlvJDBCGanttTableModel to use the given ResultSet
for constraints. |
void |
setReservationsQuery(Connection connection,
String query,
Map mapping)
Configures the
IlvJDBCGanttTableModel to use the given query
for reservations. |
void |
setReservationsQuery(Connection connection,
String query,
Object[] queryParameters,
Map mapping)
Configures the
IlvJDBCGanttTableModel to use the given query
for reservations. |
void |
setReservationsResultSet(ResultSet resultSet,
Map mapping)
Configures the
IlvJDBCGanttTableModel to use the given ResultSet
for reservations. |
void |
setResourcesQuery(Connection connection,
String query,
Map mapping)
Configures the
IlvJDBCGanttTableModel to use the given query
for resources. |
void |
setResourcesQuery(Connection connection,
String query,
Object[] queryParameters,
Map mapping)
Configures the
IlvJDBCGanttTableModel to use the given query
for resources. |
void |
setResourcesResultSet(ResultSet resultSet,
Map mapping)
Configures the
IlvJDBCGanttTableModel to use the given ResultSet
for resources. |
addActivity, addConstraint, addReservation, addResource, configureHierarchyChart, configureHierarchyChart, constraintIterator, constraintIteratorFromActivity, constraintIteratorToActivity, contains, contains, contains, createActivityMapper, createActivityMapper, createActivityMapper, createConstraintMapper, createConstraintMapper, createConstraintMapper, createReservationMapper, createReservationMapper, createReservationMapper, createResourceMapper, createResourceMapper, createResourceMapper, fireReservationEvent, getActivitiesTableModel, getActivityMapper, getChildActivity, getChildActivityCount, getChildActivityIndex, getChildResource, getChildResourceCount, getChildResourceIndex, getConstraintMapper, getConstraintsTableModel, getParentActivity, getParentActivityIndex, getParentResource, getParentResourceIndex, getReservationMapper, getReservationsTableModel, getResourceMapper, getResourcesTableModel, getRootActivity, getRootResource, initializeMapping, isAdvanceCheckEnabled, isMultipleRootModeOn, moveActivity, moveResource, removeActivity, removeActivity, removeConstraint, removeReservation, removeResource, removeResource, reservationIterator, reservationIterator, reservationIterator, reservationIterator, setActivitiesTableModel, setActivityMapper, setAdvanceCheckEnabled, setConstraintMapper, setConstraintsTableModel, setMultipleRootModeOn, setReservationMapper, setReservationsTableModel, setResourceMapper, setResourcesTableModel, setRootActivity, setRootResource, tableChangedactivityPreorderIterator, activityPreorderIterator, addActivity, addActivityHierarchyListener, addActivityListener, addConstraintListener, addGanttModelPropertyListener, addReservationListener, addResource, addResourceHierarchyListener, addResourceListener, childActivityIterator, childResourceIterator, clear, fireActivitiesInserted, fireActivitiesInserted, fireActivitiesRemoved, fireActivitiesRemoved, fireActivityEvent, fireActivityInserted, fireActivityMoved, fireActivityRemoved, fireConstraintEvent, fireConstraintInserted, fireConstraintRemoved, fireConstraintRemoved, fireGanttModelPropertyEvent, fireReservationInserted, fireReservationRemoved, fireReservationRemoved, fireResourceEvent, fireResourceInserted, fireResourceMoved, fireResourceRemoved, fireResourcesInserted, fireResourcesInserted, fireResourcesRemoved, fireResourcesRemoved, getActivityHierarchyListeners, getActivityListeners, getChild, getChildCount, getChildIndex, getParent, getParentIndex, getResourceHierarchyListeners, getResourceListeners, isAdjusting, isBatching, registerEventListener, removeActivityHierarchyListener, removeActivityListener, removeConstraintListener, removeGanttModelPropertyListener, removeReservationListener, removeResourceHierarchyListener, removeResourceListener, resourcePreorderIterator, resourcePreorderIterator, setAdjusting, setBatching, writeEventListenerspublic IlvJDBCGanttModel()
IlvJDBCGanttModel that will be configured
later on. Once configured IlvTableGanttModel.initializeMapping()
must be called.setActivitiesQuery(Connection, String, Object[], Map),
setActivitiesResultSet(ResultSet, Map),
setResourcesQuery(Connection, String, Object[], Map),
setResourcesResultSet(ResultSet, Map),
setConstraintsQuery(Connection, String, Object[], Map, Object[]),
setConstraintsResultSet(ResultSet, Map, Object[]),
setReservationsQuery(Connection, String, Object[], Map),
setReservationsResultSet(ResultSet, Map)public IlvJDBCGanttModel(boolean readonly)
IlvJDBCGanttModel that will be configured later on.
Once configured IlvTableGanttModel.initializeMapping() must be
called.readonly - if true the model is read-only otherwise modifications
are allowed and will automatically be commited back to the databasesetActivitiesQuery(Connection, String, Object[], Map),
setActivitiesResultSet(ResultSet, Map),
setResourcesQuery(Connection, String, Object[], Map),
setResourcesResultSet(ResultSet, Map),
setConstraintsQuery(Connection, String, Object[], Map, Object[]),
setConstraintsResultSet(ResultSet, Map, Object[]),
setReservationsQuery(Connection, String, Object[], Map),
setReservationsResultSet(ResultSet, Map)public IlvJDBCGanttModel(Connection connection, String activitiesQuery, Map activitiesMapping, String resourcesQuery, Map resourcesMapping, String constraintsQuery, Map constraintsMapping, Object[] constraintTypesMapping, String reservationsQuery, Map reservationsMapping) throws SQLException, IlvTableModelMappingException
IlvJDBCGanttModel from a single JDBC Connection,
four queries and mapping information from queries columns to gantt properties.
If mapping information is not available a default mapping will be used, this
mapping will look up for columns in the database that have the same name
as the gantt properties involved (IlvTableActivity.ID_PROPERTY,
IlvTableActivity.PARENT_ID_PROPERTY...)connection - the Connection that will be used to connect
to the database.activitiesQuery - the query that returns the list table of activitiesactivitiesMapping - a Map filled with the association between
the IlvTableActivity properties (like IlvTableActivity.ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).resourcesQuery - the query that returns the list table of resourcesresourcesMapping - a Map filled with the association between
the IlvTableResource properties (like IlvTableResource.ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).constraintsQuery - the query that returns the list table of constraintsconstraintsMapping - a Map filled with the association between
the IlvTableConstraint properties (like IlvTableConstraint.FROM_ACTIVITY_ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).constraintTypesMapping - contains the Objects in the
TableModel that will represents, in that order, IlvConstraintType.START_START,
IlvConstraintType.START_END, IlvConstraintType.END_START,
IlvConstraintType.END_END.reservationsQuery - the query that returns the list table of reservationsreservationsMapping - a Map filled with the association between
the IlvTableReservation properties (like IlvTableReservation.ACTIVITY_ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).SQLException - if problems occurs with the database connectionIlvTableModelMappingExceptionpublic IlvJDBCGanttModel(Connection connection, String activitiesQuery, Map activitiesMapping, String resourcesQuery, Map resourcesMapping, String constraintsQuery, Map constraintsMapping, Object[] constraintTypesMapping, String reservationsQuery, Map reservationsMapping, boolean readonly) throws SQLException, IlvTableModelMappingException
IlvJDBCGanttModel from a single JDBC Connection,
four queries and mapping information from queries columns to gantt properties.
If mapping information is not available a default mapping will be used, this
mapping will look up for columns in the database that have the same name
as the gantt properties involved (IlvTableActivity.ID_PROPERTY,
IlvTableActivity.PARENT_ID_PROPERTY...)connection - the Connection that will be used to connect
to the database.activitiesQuery - the query that returns the list table of activitiesactivitiesMapping - a Map filled with the association between
the IlvTableActivity properties (like IlvTableActivity.ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).resourcesQuery - the query that returns the list table of resourcesresourcesMapping - a Map filled with the association between
the IlvTableResource properties (like IlvTableResource.ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).constraintsQuery - the query that returns the list table of constraintsconstraintsMapping - a Map filled with the association between
the IlvTableConstraint properties (like IlvTableConstraint.FROM_ACTIVITY_ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).constraintTypesMapping - contains the Objects in the
TableModel that will represents, in that order, IlvConstraintType.START_START,
IlvConstraintType.START_END, IlvConstraintType.END_START,
IlvConstraintType.END_END.reservationsQuery - the query that returns the list table of reservationsreservationsMapping - a Map filled with the association between
the IlvTableReservation properties (like IlvTableReservation.ACTIVITY_ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).readonly - if true the model is read-only otherwise modifications
are allowed and will automatically be commited back to the databaseSQLException - if problems occurs with the database connectionIlvTableModelMappingExceptionpublic IlvJDBCGanttModel(Connection connection, String activitiesQuery, Object[] activitiesQueryParameters, Map activitiesMapping, String resourcesQuery, Object[] resourcesQueryParameters, Map resourcesMapping, String constraintsQuery, Object[] constraintsQueryParameters, Map constraintsMapping, Object[] constraintTypesMapping, String reservationsQuery, Object[] reservationsQueryParameters, Map reservationsMapping, boolean readonly) throws SQLException, IlvTableModelMappingException
IlvJDBCGanttModel from a single JDBC Connection,
four queries and mapping information from queries columns to gantt properties.
If mapping information is not available a default mapping will be used, this
mapping will look up for columns in the database that have the same name
as the gantt properties involved (IlvTableActivity.ID_PROPERTY,
IlvTableActivity.PARENT_ID_PROPERTY...)connection - the Connection that will be used to connect
to the database.activitiesQuery - the query that returns the list table of activitiesactivitiesQueryParameters - The parameters for the query that returns
the list table of activities, or null.activitiesMapping - a Map filled with the association between
the IlvTableActivity properties (like IlvTableActivity.ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).resourcesQuery - the query that returns the list table of resourcesresourcesQueryParameters - The parameters for the query that returns
the list table of resources, or null.resourcesMapping - a Map filled with the association between
the IlvTableResource properties (like IlvTableResource.ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).constraintsQuery - the query that returns the list table of constraintsconstraintsQueryParameters - The parameters for the query that returns
the list table of constraints, or null.constraintsMapping - a Map filled with the association between
the IlvTableConstraint properties (like IlvTableConstraint.FROM_ACTIVITY_ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).constraintTypesMapping - contains the Objects in the
TableModel that will represents, in that order, IlvConstraintType.START_START,
IlvConstraintType.START_END, IlvConstraintType.END_START,
IlvConstraintType.END_END.reservationsQuery - the query that returns the list table of reservationsreservationsQueryParameters - The parameters for the query that returns
the list table of reservations, or null.reservationsMapping - a Map filled with the association between
the IlvTableReservation properties (like IlvTableReservation.ACTIVITY_ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).readonly - if true the model is read-only otherwise modifications
are allowed and will automatically be commited back to the databaseSQLException - if problems occurs with the database connectionIlvTableModelMappingExceptionpublic IlvJDBCGanttModel(ResultSet activitiesResultSet, Map activitiesMapping, ResultSet resourcesResultSet, Map resourcesMapping, ResultSet constraintsResultSet, Map constraintsMapping, Object[] constraintTypesMapping, ResultSet reservationsResultSet, Map reservationsMapping) throws IlvTableModelMappingException, SQLException
IlvJDBCGanttModel from four ResultSet
and mapping information from queries columns to gantt properties.
If mapping information is not available a default mapping will be used, this
mapping will look up for columns in the database that have the same name
as the gantt properties involved (IlvTableActivity.ID_PROPERTY,
IlvTableActivity.PARENT_ID_PROPERTY...)activitiesResultSet - the ResultSet than contains the values
needed for the definition of the activities.activitiesMapping - a Map filled with the association between
the IlvTableActivity properties (like IlvTableActivity.ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).resourcesResultSet - the ResultSet than contains the values
needed for the definition of the resources.resourcesMapping - a Map filled with the association between
the IlvTableResource properties (like IlvTableResource.ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).constraintsResultSet - the ResultSet than contains the values
needed for the definition of the constraints.constraintsMapping - a Map filled with the association between
the IlvTableConstraint properties (like IlvTableConstraint.FROM_ACTIVITY_ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).constraintTypesMapping - contains the Objects in the
TableModel that will represents, in that order, IlvConstraintType.START_START,
IlvConstraintType.START_END, IlvConstraintType.END_START,
IlvConstraintType.END_END.reservationsResultSet - the ResultSet than contains the values
needed for the definition of the reservations.reservationsMapping - a Map filled with the association between
the IlvTableReservation properties (like IlvTableReservation.ACTIVITY_ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).SQLException - if problems occurs with the database connectionIlvTableModelMappingExceptionpublic final boolean isReadOnly()
IlvJDBCGanttModel(boolean),
IlvJDBCGanttModel(Connection, String, Map, String, Map, String, Map, Object[], String, Map, boolean),
IlvJDBCGanttModel(Connection, String, Object[], Map, String, Object[], Map, String, Object[], Map, Object[], String, Object[], Map, boolean)public void setActivitiesQuery(Connection connection, String query, Map mapping) throws SQLException
IlvJDBCGanttTableModel to use the given query
for activities.connection - the Connection to be usedquery - the SQL query to be usedmapping - a Map filled with the association between
the IlvTableActivity properties (like IlvTableActivity.ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).SQLExceptionpublic void setActivitiesQuery(Connection connection, String query, Object[] queryParameters, Map mapping) throws SQLException
IlvJDBCGanttTableModel to use the given query
for activities.connection - the Connection to be usedquery - the SQL query to be usedqueryParameters - Parameters for the SQL query, or null for none.mapping - a Map filled with the association between
the IlvTableActivity properties (like IlvTableActivity.ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).SQLExceptionpublic void setActivitiesResultSet(ResultSet resultSet, Map mapping) throws SQLException
IlvJDBCGanttTableModel to use the given ResultSet
for activities. This model must be read-only to be configured from a
ResultSet.resultSet - the ResultSet to be used.mapping - a Map filled with the association between
the IlvTableActivity properties (like IlvTableActivity.ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).SQLExceptionisReadOnly()public void setResourcesQuery(Connection connection, String query, Map mapping) throws SQLException
IlvJDBCGanttTableModel to use the given query
for resources.connection - the Connection to be usedquery - the SQL query to be usedmapping - a Map filled with the association between
the IlvTableResource properties (like IlvTableResource.ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).SQLExceptionpublic void setResourcesQuery(Connection connection, String query, Object[] queryParameters, Map mapping) throws SQLException
IlvJDBCGanttTableModel to use the given query
for resources.connection - the Connection to be usedquery - the SQL query to be usedqueryParameters - Parameters for the SQL query, or null for none.mapping - a Map filled with the association between
the IlvTableResource properties (like IlvTableResource.ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).SQLExceptionpublic void setResourcesResultSet(ResultSet resultSet, Map mapping) throws SQLException
IlvJDBCGanttTableModel to use the given ResultSet
for resources. This model must be read-only to be configured from a
ResultSet.resultSet - the ResultSet to be used.mapping - a Map filled with the association between
the IlvTableResource properties (like IlvTableResource.ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).SQLExceptionisReadOnly()public void setConstraintsQuery(Connection connection, String query, Map mapping, Object[] typesMapping) throws SQLException
IlvJDBCGanttTableModel to use the given query
for constraints.connection - the Connection to be usedquery - the SQL query to be usedmapping - a Map filled with the association between
the IlvTableConstraint properties (like IlvTableConstraint.FROM_ACTIVITY_ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).typesMapping - contains the Objects in the TableModel
that will represents, in that order, IlvConstraintType.START_START,
IlvConstraintType.START_END, IlvConstraintType.END_START,
IlvConstraintType.END_END.SQLExceptionpublic void setConstraintsQuery(Connection connection, String query, Object[] queryParameters, Map mapping, Object[] typesMapping) throws SQLException
IlvJDBCGanttTableModel to use the given query
for constraints.connection - the Connection to be usedquery - the SQL query to be usedqueryParameters - Parameters for the SQL query, or null for none.mapping - a Map filled with the association between
the IlvTableConstraint properties (like IlvTableConstraint.FROM_ACTIVITY_ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).typesMapping - contains the Objects in the TableModel
that will represents, in that order, IlvConstraintType.START_START,
IlvConstraintType.START_END, IlvConstraintType.END_START,
IlvConstraintType.END_END.SQLExceptionpublic void setConstraintsResultSet(ResultSet resultSet, Map mapping, Object[] typesMapping) throws SQLException
IlvJDBCGanttTableModel to use the given ResultSet
for constraints. This model must be read-only to be configured from a
ResultSet.resultSet - the ResultSet to be used.mapping - a Map filled with the association between
the IlvTableConstraint properties (like IlvTableConstraint.FROM_ACTIVITY_ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).typesMapping - contains the Objects in the TableModel
that will represents, in that order, IlvConstraintType.START_START,
IlvConstraintType.START_END, IlvConstraintType.END_START,
IlvConstraintType.END_END.SQLExceptionisReadOnly()public void setReservationsQuery(Connection connection, String query, Map mapping) throws SQLException
IlvJDBCGanttTableModel to use the given query
for reservations.connection - the Connection to be usedquery - the SQL query to be usedmapping - a Map filled with the association between
the IlvTableReservation properties (like IlvTableReservation.ACTIVITY_ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).SQLExceptionpublic void setReservationsQuery(Connection connection, String query, Object[] queryParameters, Map mapping) throws SQLException
IlvJDBCGanttTableModel to use the given query
for reservations.connection - the Connection to be usedquery - the SQL query to be usedqueryParameters - Parameters for the SQL query, or null for none.mapping - a Map filled with the association between
the IlvTableReservation properties (like IlvTableReservation.ACTIVITY_ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).SQLExceptionpublic void setReservationsResultSet(ResultSet resultSet, Map mapping) throws SQLException
IlvJDBCGanttTableModel to use the given ResultSet
for reservations. This model must be read-only to be configured from a
ResultSet.resultSet - the ResultSet to be used.mapping - a Map filled with the association between
the IlvTableReservation properties (like IlvTableReservation.ACTIVITY_ID_PROPERTY
(keys) and columns indexes (Integer) or names (String) in
the JDBC query (values).SQLExceptionisReadOnly()© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.