Examples of SFamousPlace


Examples of org.xooof.xooofoscope.struct.SFamousPlace

  public SFamousPlace fetchByPK(Integer famousPlaceId) throws DAOException {

    if (famousPlaceId == null) {
      throw new FamousPlaceDAOException("famousPlaceId cannot be null");
    }
    SFamousPlace famousPlace = null;
    PreparedStatement statement = null;
    ResultSet result;   
    Connection connection = DAOHelper.getDBConnection();   
    try {   
      try
      {
        statement = connection.prepareStatement(FETCHBYPK_QRY);
        statement.setInt(1, famousPlaceId.intValue());
        result = statement.executeQuery();
        if(result.next())
        {
          famousPlace = new SFamousPlace();
          famousPlace.setObjId(result.getString("id"));
          famousPlace.setObjClass(SFamousPlace.class.getName());
          famousPlace.setName(result.getString("name"));
          famousPlace.setDescr(result.getString("description"));
          famousPlace.setRa(result.getBigDecimal("ra"));
          famousPlace.setDec(result.getBigDecimal("dec"));
        if(result.next())
        {
          throw new FamousPlaceDAOException("Multiple rows exists for famousPlaceId " + famousPlaceId.toString());
        }
        }
View Full Code Here

Examples of org.xooof.xooofoscope.struct.SFamousPlace

  public SFamousPlace fetchByName(String famousPlaceName) throws DAOException {

    if (famousPlaceName == null) {
      throw new FamousPlaceDAOException("famousPlaceName cannot be null");
    }
    SFamousPlace famousPlace = null;
    PreparedStatement statement = null;
    ResultSet result;  
    Connection connection = DAOHelper.getDBConnection();   
    try {  
      try
      {
        statement = connection.prepareStatement(FETCHBYNAME_QRY);
        statement.setString(1, famousPlaceName);
        result = statement.executeQuery();
        if(result.next())
        {
          famousPlace = new SFamousPlace();
          famousPlace.setObjId(result.getString("id"));
          famousPlace.setObjClass(SFamousPlace.class.getName());
          famousPlace.setName(result.getString("name"));
          famousPlace.setDescr(result.getString("description"));
          famousPlace.setRa(result.getBigDecimal("ra"));
          famousPlace.setDec(result.getBigDecimal("dec"));
        if(result.next())
        {
          throw new FamousPlaceDAOException("Multiple rows exists for famousPlaceName " + famousPlaceName);
        }
        }
View Full Code Here

Examples of org.xooof.xooofoscope.struct.SFamousPlace

   * @see org.xooof.xooofoscope.dao.IFamousPlaceDAO#fetchAll()
   */
  public SFamousPlaceArrayList fetchAll() throws DAOException {


    SFamousPlace famousPlace = null;
    SFamousPlaceArrayList famousPlaceList = new SFamousPlaceArrayList();
    PreparedStatement statement = null;
    ResultSet result;   
    Connection connection = DAOHelper.getDBConnection();   
    try {   
      try
      {
        statement = connection.prepareStatement(FETCHALL_QRY);
        result = statement.executeQuery();
        while(result.next())
        {
        famousPlace = new SFamousPlace();
        famousPlace.setObjId(result.getString("id"));
        famousPlace.setObjClass(SFamousPlace.class.getName());
        famousPlace.setName(result.getString("name"));
        famousPlace.setDescr(result.getString("description"));
        famousPlace.setRa(result.getBigDecimal("ra"));
        famousPlace.setDec(result.getBigDecimal("dec"));
        famousPlaceList.add(famousPlace);
        }
      }
      catch(SQLException exc)
      {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.