Sunday, 15 October 2017

getCountRows

=====================================================
public long getCountRows(){
   ViewObjectImpl vo = getCountryEOView1();
   return vo.getEstimatedRowCount();
}
=====================================================
public void createRow()
{
 ViewObjectImpl vo= getCountryView1();
 Row newRow=vo.createRow();
 newRow.setAttribute("CountryId","CI");
 newRow.setAttribute("CountryName","CINDIA");
 newRow.setAttribute("RegionId","4");
 vo.insertRow(newRow);
 getDBTransaction().commit();
}
=====================================================
public void createRow()
{
 ViewObjectImpl vo= getCountryView1();
 Row newRow=vo.createRow();
 newRow.setAttribute("CountryId","CI");
 newRow.setAttribute("CountryName","CINDIA");
 newRow.setAttribute("RegionId","4");
 vo.insertRow(newRow);
 getDBTransaction().commit();
}

public void removeCurrentRow()
{
ViewObjectImpl vo= getCountryView1();
Row newRow=vo.getCurrentRow();
newRow.remove();
getDBTransaction.commit();
}

public void removeCurrentRow()
{
ViewObjectImpl vo= getCountryView1();
Row newRow=vo.first();
newRow.remove();
getDBTransaction.commit();
}
public void printCoutries(){
        ViewObjectImpl vo = getCountryEOView1();
        RowSetIterator iter =  vo.createRowSetIterator(null);
        while(iter.hasNext()){
            Row r = iter.next();
            System.out.println(r.getAttribute("CountryName"));
        }
        iter.closeRowSetIterator();
    }

http://www.catgovind.com/adf/adf-table-performance-on-large-records/

No comments:

Post a Comment