use of cbit.vcell.model.Product in project vcell by virtualcell.
the class ReactPartTable method getReactionParticipant.
/**
* This method was created in VisualAge.
* @return cbit.vcell.model.ReactionParticipant
* @param rset java.sql.ResultSet
*/
public ReactionParticipant getReactionParticipant(KeyValue rpKey, java.sql.ResultSet rset) throws java.sql.SQLException, DataAccessException {
ReactionParticipant rp = null;
KeyValue key = rpKey;
String role = rset.getString(ReactPartTable.table.role.toString());
int stoichiometry = rset.getInt(ReactPartTable.table.stoich.toString());
if (role.equals(ROLE_CATALYST)) {
rp = new Catalyst(key, null, null);
} else if (role.equals(ROLE_PRODUCT)) {
rp = new Product(key, null, null, stoichiometry);
} else if (role.equals(ROLE_REACTANT)) {
rp = new Reactant(key, null, null, stoichiometry);
} else if (role.equals(ROLE_FLUX)) {
rp = new FluxReaction.Flux(key, null, null);
} else {
throw new DataAccessException("unexpected value of " + ReactPartTable.table.role.toString() + "'" + role + "'");
}
rp.setStoichiometry(stoichiometry);
return rp;
}
Aggregations