Search in sources :

Example 1 with X_AD_View

use of org.adempiere.model.X_AD_View in project adempiere by adempiere.

the class ViewElementHandler method create.

public void create(Properties ctx, TransformerHandler document) throws SAXException {
    int AD_View_ID = Env.getContextAsInt(ctx, "AD_View_ID");
    PackOut packOut = (PackOut) ctx.get("PackOutProcess");
    X_AD_View m_View = new X_AD_View(ctx, AD_View_ID, null);
    AttributesImpl atts = new AttributesImpl();
    createViewBinding(atts, m_View);
    document.startElement("", "", "view", atts);
    // Tab Tag
    StringBuilder whereClause = new StringBuilder(I_AD_View.COLUMNNAME_AD_View_ID).append("=?");
    List<MViewDefinition> viewDefinitions = new Query(ctx, I_AD_View_Definition.Table_Name, whereClause.toString(), getTrxName(ctx)).setParameters(m_View.getAD_View_ID()).setOrderBy(X_AD_View_Definition.COLUMNNAME_SeqNo + "," + X_AD_View_Definition.COLUMNNAME_AD_View_Definition_ID).list();
    for (MViewDefinition vd : viewDefinitions) {
        //Is not export table definition because maybe cause changes in tables
        //So that of tables should are created before to import Browser
        //packOut.createTable(vd.getAD_Table_ID(), document);
        createViewDefinition(ctx, document, vd.getAD_View_Definition_ID());
    }
    // Loop tags.
    document.endElement("", "", "view");
}
Also used : AttributesImpl(org.xml.sax.helpers.AttributesImpl) Query(org.compiere.model.Query) PackOut(org.adempiere.pipo.PackOut) MViewDefinition(org.adempiere.model.MViewDefinition) X_AD_View(org.adempiere.model.X_AD_View)

Aggregations

MViewDefinition (org.adempiere.model.MViewDefinition)1 X_AD_View (org.adempiere.model.X_AD_View)1 PackOut (org.adempiere.pipo.PackOut)1 Query (org.compiere.model.Query)1 AttributesImpl (org.xml.sax.helpers.AttributesImpl)1