Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package pt.webdetails.cda.dataaccess;
  
  
  import  org.apache.commons.logging.Log;
  import  org.apache.commons.logging.LogFactory;
  import  org.dom4j.Element;
Class to join 2 datatables Created by Pedro Alves User: pedro Date: Mar 9, 2010 Time: 1:13:11 PM
 
 {
 
   private static final Log logger = LogFactory.getLog(UnionCompoundDataAccess.class);
   private static final String TYPE = "union";
   private String topId;
   private String bottomId;
 
 
   {
   }
 
 
   public UnionCompoundDataAccess(final Element element)
   {
     super(element);
 
     Element top = (Element) element.selectSingleNode("Top");
     Element bottom = (Element) element.selectSingleNode("Bottom");
 
      = top.attributeValue("id");
      = bottom.attributeValue("id");
 
   }
 
 
   public String getType()
   {
     return ;
   }
 
 
   protected TableModel queryDataSource(final QueryOptions queryOptionsthrows QueryException
   {
 
 
     try
     {
       QueryOptions croppedOptions = (QueryOptionsqueryOptions.clone();
       croppedOptions.setSortBy(new ArrayList<String>());
       croppedOptions.setPageSize(0);
       croppedOptions.setPageStart(0);
       final TableModel tableModelA = this.getCdaSettings().getDataAccess().doQuery(queryOptions);
       final TableModel tableModelB = this.getCdaSettings().getDataAccess().doQuery(queryOptions);
 
       return TableModelUtils.getInstance().appendTableModel(tableModelAtableModelB);
 
     }
     catch (CloneNotSupportedException e)
     {
      throw new QueryException("Couldn't clone settings "e);
     }
     catch (UnknownDataAccessException e)
     {
       throw new QueryException("Unknown Data access in CompoundDataAccess "e);
     }
 
 
   }
 
 
   @Override
   {
     return .;
   }
 
 
   @Override
   {
     ArrayList<PropertyDescriptorproperties = new ArrayList<PropertyDescriptor>();
     return properties;
   }
  public String getTopId() {
	  return ;
  }
  public String getBottomId() {
	  return ;
  }
  public void setQuery(String query) {
	  // Do nothing
  }
New to GrepCode? Check out our FAQ X