Package org.xooof.xooofoscope.struct

Examples of org.xooof.xooofoscope.struct.SInstrument


    throws XMLDispatcherUserException, XMLDispatcherAppException {
      InstrumentHome bc = (InstrumentHome) xdCtx.getBusinessClass("Instrument");
      SObjRef objRef = new SObjRef();
      objRef.setObjId(getInstrumentId());
      objRef.setObjClass(SObjRef.class.getName());
      SInstrument instrument = bc.query(xdCtx, objRef);
      SJobDetails jobDetails=new SJobDetails();
      jobDetails.setObjId(getId());
      jobDetails.setObjClass(SJobDetails.class.getName());
      jobDetails.setActualBeginDateTime(SQLtoXS(getActualBeginDateTime()));
      jobDetails.setDec(getDec());
View Full Code Here


  throws XMLDispatcherUserException, XMLDispatcherAppException {

    /* First check that the given Instrument exists */
   
    InstrumentHome bc = (InstrumentHome) xdCtx.getBusinessClass("Instrument");
    SInstrument instrument = bc.query(xdCtx, rqst.getInstrument());
   
    if (instrument == null) {
      /*
       * instrument does not exist in the database...
       */
 
View Full Code Here

  public SInstrument fetchByPK(Integer instrumentId) throws DAOException {

    if (instrumentId == null) {
      throw new InstrumentDAOException("instrumentId cannot be null");
    }
    SInstrument instrument = null;
    PreparedStatement statement = null;
    ResultSet result;   
    Connection connection = DAOHelper.getDBConnection();   
    try {   
      try
      {
      statement = connection.prepareStatement(FETCHBYPK_QRY);
      statement.setInt(1, instrumentId.intValue());
      result = statement.executeQuery();
      if(result.next())
      {
        instrument = new SInstrument();
        instrument.setObjId(result.getString("id"));
        instrument.setObjClass(SInstrument.class.getName());       
        instrument.setTelescopeId(result.getString("telescope_id"));
        instrument.setName(result.getString("name"));
        instrument.setDescr(result.getString("description"));
        if(result.next())
        {
        throw new InstrumentDAOException("Multiple rows exists for instrumentId " + instrumentId.toString());
        }
      }
View Full Code Here

    if (telescopeId == null) {
      throw new InstrumentDAOException("telescopeId cannot be null");
    }
    SInstrumentArrayList instrumentList = new SInstrumentArrayList();
    SInstrument instrument = null;
    PreparedStatement statement = null;
    ResultSet result;   
    Connection connection = DAOHelper.getDBConnection();   
    try {   
      try
      {
      statement = connection.prepareStatement(FETCHBYTELESCOPE_QRY);
      statement.setInt(1, telescopeId.intValue());
      result = statement.executeQuery();
      while(result.next())
      {
        instrument = new SInstrument();
        instrument.setObjId(result.getString("id"));
        instrument.setObjClass(SInstrument.class.getName());       
        instrument.setTelescopeId(result.getString("telescope_id"));
        instrument.setName(result.getString("name"));
        instrument.setDescr(result.getString("description"));
        instrumentList.add(instrument);
      }
      }
      catch(SQLException exc)
      {
View Full Code Here

  }

  public SInstrumentArrayList fetchAll() throws DAOException {

    SInstrumentArrayList instrumentList = new SInstrumentArrayList();
    SInstrument instrument = null;
    PreparedStatement statement = null;
    ResultSet result;  
    Connection connection = DAOHelper.getDBConnection();   
    try {  
      try
      {
      statement = connection.prepareStatement(FETCHALL_QRY);
      result = statement.executeQuery();
      while(result.next())
      {
        instrument = new SInstrument();
        instrument.setObjId(result.getString("id"));
        instrument.setObjClass(SInstrument.class.getName());       
        instrument.setTelescopeId(result.getString("telescope_id"));
        instrument.setName(result.getString("name"));
        instrument.setDescr(result.getString("description"));
        instrumentList.add(instrument);
      }
      }
      catch(SQLException exc)
      {
View Full Code Here

TOP

Related Classes of org.xooof.xooofoscope.struct.SInstrument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.