Package com.openbravo.data.loader

Examples of com.openbravo.data.loader.StaticSentence


    public void syncProductsBefore() throws BasicException {
        new StaticSentence(s, "DELETE FROM PRODUCTS_CAT").exec();
    }
   
    public void syncProductsAfter() throws BasicException {
        new StaticSentence(s, "DELETE FROM CATEGORIES WHERE ID NOT IN ( SELECT CATEGORY  FROM PRODUCTS GROUP BY CATEGORY )").exec();
    }  
View Full Code Here


                            }});
                }

                if (incatalog) {
                // Insert in catalog
                new StaticSentence(s,
                        "INSERT INTO PRODUCTS_CAT(PRODUCT, CATORDER) VALUES ((SELECT ID FROM PRODUCTS WHERE CODE=?), NULL)",
                        SerializerWriteString.INSTANCE
                        ).exec(prod.getCode());  
                }
                return null;       
View Full Code Here

                    }               
                }).list(ticket);
    }   

    public void execTicketUpdate() throws BasicException {
        new StaticSentence(s, "UPDATE TICKETS SET STATUS = 1 WHERE STATUS = 0").exec();
    }
View Full Code Here

    public void execTicketUpdate() throws BasicException {
        new StaticSentence(s, "UPDATE TICKETS SET STATUS = 1 WHERE STATUS = 0").exec();
    }

  public void syncOrdersBefore()  throws BasicException {
    new StaticSentence(s, "UPDATE TICKETS SET CUSTOMER = '0' WHERE CUSTOMER IS NULL").exec();
    new StaticSentence(s, "UPDATE TICKETLINES SET PRODUCT = '0' WHERE PRODUCT IS NULL").exec();
   
  }
View Full Code Here

       
    }

    // CustomerList list
    public SentenceList getCustomerList() {
        return new StaticSentence(s
            , new QBFBuilder("SELECT ID, TAXID, SEARCHKEY, NAME, CURDEBT, EMAIL FROM CUSTOMERS WHERE VISIBLE = " + s.DB.TRUE() + " AND ?(QBF_FILTER) ORDER BY NAME", new String[] {"TAXID", "SEARCHKEY", "NAME", "CURDEBT"})
            , new SerializerWriteBasic(new Datas[] {Datas.OBJECT, Datas.STRING, Datas.OBJECT, Datas.STRING, Datas.OBJECT, Datas.STRING, Datas.OBJECT, Datas.DOUBLE})
            , new SerializerRead() {
                    public Object readValues(DataRead dr) throws BasicException {
                        CustomerInfo c = new CustomerInfo(dr.getString(1));
View Full Code Here

    private Object insertid;

    /** Creates new form AttributeSetEditor */
    public AttributeUseEditor(AppView app, DirtyManager dirty) {

        attributesent = new StaticSentence(app.getSession()
            , "SELECT ID, NAME FROM ATTRIBUTE ORDER BY NAME"
            , null
            , new SerializerRead() { public Object readValues(DataRead dr) throws BasicException {
                return new AttributeInfo(dr.getString(1), dr.getString(2));
            }}
View Full Code Here

        initComponents();
    }

    public void init(AppView app) {

        attsent = new StaticSentence(app.getSession()
            , "SELECT ID, NAME FROM ATTRIBUTE ORDER BY NAME"
            , null
            , new SerializerRead() { public Object readValues(DataRead dr) throws BasicException {
                return new AttributeInfo(dr.getString(1), dr.getString(2));
            }});
View Full Code Here

        m_PlaceCurrent = null;
        m_PlaceClipboard = null;
        customer = null;
           
        try {
            SentenceList sent = new StaticSentence(
                    app.getSession(),
                    "SELECT ID, NAME, IMAGE FROM FLOORS ORDER BY NAME",
                    null,
                    new SerializerReadClass(Floor.class));
            m_afloors = sent.list();
              
               
           
        } catch (BasicException eD) {
            m_afloors = new ArrayList<Floor>();
        }
        try {
            SentenceList sent = new StaticSentence(
                    app.getSession(),
                    "SELECT ID, NAME, X, Y, FLOOR FROM PLACES ORDER BY FLOOR",
                    null,
                    new SerializerReadClass(Place.class));
            m_aplaces = sent.list();
        } catch (BasicException eD) {
            m_aplaces = new ArrayList<Place>();
        }
       
        initComponents();
View Full Code Here

    public void init(Session s) {
        this.s = s;
    }
    
    public void syncCustomersBefore() throws BasicException {
        new StaticSentence(s, "UPDATE CUSTOMERS SET VISIBLE = " + s.DB.FALSE()).exec();
    }
View Full Code Here

        t.execute();
    }
       
   
    public void syncProductsBefore() throws BasicException {
        new StaticSentence(s, "DELETE FROM PRODUCTS_CAT").exec();
    }  
View Full Code Here

TOP

Related Classes of com.openbravo.data.loader.StaticSentence

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.