Package org.openspp.dto

Examples of org.openspp.dto.ObjectKey


      jdbcTemplate.update(RG_UPDATE_SQL,
          new Object[]{rg.isInService(), rg.getPriority(), new java.sql.Timestamp(System.currentTimeMillis()), rg.getRouteGroupName(), rg.getOrganizationId()}) ;
    }
   
    // Get RouteGroupID for the newly added/updated group
    ObjectKey key = new ObjectKey() ;
    key.setObjectName(rg.getRouteGroupName()) ;
    key.setRegistrantName(rg.getOrganizationName()) ;
   
    RouteGroup rg1 = getRouteGroup(key) ;
   
    rg.setRouteGroupId(rg1.getRouteGroupId()) ;
   
    if (rg.getRouteRecordList() !=null)
    {
      // Loop thru and insert/update row in RouteGroup_RouteRecord table
      RouteRecordDAO dao = (RouteRecordDAO)SpringAppContext.getBean("RouteRecordDAO") ;
      for(RouteRecord rr : rg.getRouteRecordList())
      {
        //TODO handle error conditions
     
        ObjectKey key1 = new ObjectKey() ;
        key1.setObjectName(rr.getRouteRecordName()) ;
        key1.setRegistrantName(rr.getOrganizationName()) ;
       
        RouteRecord rr1 = dao.getRouteRecord(key1) ;
        if(rr1 == null)
        {
          throw new RuntimeException("RouteRecord "+rr.getRouteRecordName() + " does not exist") ;
View Full Code Here


  /**
   * Test method for {@link org.openspp.dao.impl.RouteRecDAOImpl#getRouteRecord(org.openspp.dto.ObjectKey)}.
   */
  @Test
  public void testGetRouteRecord() {
    ObjectKey key = new ObjectKey() ;
    key.setObjectName("rr1") ;
    key.setRegistrantName("rant111") ;
    RouteRecord rec = dao.getRouteRecord(key) ;
    if(rec !=null)
    {
      System.out.println(rec.toString()) ;
    }
View Full Code Here

  }
 
  @Test
  public void testGetNAPTR()
  {
    ObjectKey key = new ObjectKey() ;
    key.setObjectName("rr1") ;
    key.setRegistrantName("rant112") ;
    NAPTR rec = dao.getNAPTR(key) ;
      System.out.println(rec.toString())
  }
View Full Code Here

      logger.log(Level.SEVERE, "addOrUpdateRouteGroup - exception occurred", e) ;
      throw new RuntimeException("Could not persist Route Group to DB, some error occurred - " + e.getMessage()) ;
    }
   
    // Get RouteGroupID for the newly added/updated group
    ObjectKey key = new ObjectKey() ;
    key.setObjectName(rg.getRouteGroupName()) ;
    key.setRegistrantName(rg.getOrganizationName()) ;
   
    RouteGroup rg1 = getRouteGroup(key) ;
   
    rg.setRouteGroupId(rg1.getRouteGroupId()) ;
   
    if (rg.getRouteRecordList() !=null)
    {
      // Loop thru and insert/update row in RouteGroup_RouteRecord table
      RouteRecordDAO dao = (RouteRecordDAO)SpringAppContext.getBean("RouteRecordDAO") ;
      for(RouteRecord rr : rg.getRouteRecordList())
      {
        //TODO handle error conditions
     
        ObjectKey key1 = new ObjectKey() ;
        key1.setObjectName(rr.getRouteRecordName()) ;
        key1.setRegistrantName(rr.getOrganizationName()) ;
       
        RouteRecord rr1 = dao.getRouteRecord(key1) ;
       
        if(rr1 == null)
        {
          throw new RuntimeException("RouteRecord "+rr.getRouteRecordName() + " with registrant " + key1.getRegistrantName() + " does not exist") ;
        }
        rr.setRouteRecordId(rr1.getRouteRecordId()) ;
       
        addRteGrpRteRec(rg,rr) ;
      }
View Full Code Here

TOP

Related Classes of org.openspp.dto.ObjectKey

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.