当前位置: 首页>>代码示例>>Java>>正文


Java BasicException类代码示例

本文整理汇总了Java中com.openbravo.basic.BasicException的典型用法代码示例。如果您正苦于以下问题:Java BasicException类的具体用法?Java BasicException怎么用?Java BasicException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BasicException类属于com.openbravo.basic包,在下文中一共展示了BasicException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: findNext

import com.openbravo.basic.BasicException; //导入依赖的package包/类
public final int findNext(int index, Finder f) throws BasicException {
    int i = index + 1;
    
    // search up to the end of the recordset
    while (i < m_aData.size()) {
        if (f.match(this.getElementAt(i))) {
            return i;
        }
        i++;
    }    
    // search from the begining
    i = 0;
    while (i < index) {
        if (f.match(this.getElementAt(i))) {
            return i;
        }
        i++;
    }    
    
    // No se ha encontrado
    return -1;
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:23,代码来源:BrowsableData.java

示例2: valueChanged

import com.openbravo.basic.BasicException; //导入依赖的package包/类
public void valueChanged(ListSelectionEvent evt) {
    
    if (!evt.getValueIsAdjusting()) {
        int i = m_jlist.getSelectedIndex();
        if (i >= 0) {
            if (!m_bd.isAdjusting()) {

                try {
                    m_bd.moveTo(i);
                } catch (BasicException eD) {
                    MessageInf msg = new MessageInf(MessageInf.SGN_NOTICE, LocalRes.getIntString("message.nomove"), eD);
                    msg.show(this);
                    // Y ahora tendriamos que seleccionar silenciosamente el registro donde estabamos.
                }
            }
            // Lo hago visible...
            Rectangle oRect = m_jlist.getCellBounds(i, i);
            m_jlist.scrollRectToVisible(oRect);       
        }
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:22,代码来源:JListNavigator.java

示例3: writeValues

import com.openbravo.basic.BasicException; //导入依赖的package包/类
public void writeValues(DataWrite dp) throws BasicException {
    dp.setString(1, m_sTicket);
    dp.setInt(2, new Integer(m_iLine));
    dp.setString(3, productid);
    dp.setString(4, attsetinstid);

    dp.setDouble(5, new Double(multiply));
    dp.setDouble(6, new Double(price));

    dp.setString(7, tax.getId());
    try {
        ByteArrayOutputStream o = new ByteArrayOutputStream();
        attributes.storeToXML(o, AppLocal.APP_NAME, "UTF-8");
        dp.setBytes(8, o.toByteArray());
    } catch (IOException e) {
        dp.setBytes(8, null);
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:19,代码来源:TicketLineInfo.java

示例4: deleteTicket

import com.openbravo.basic.BasicException; //导入依赖的package包/类
public void deleteTicket() {
    
    if (m_ticketCopy != null) {           
        // Para editar borramos el ticket anterior
        try {               
            m_dlSales.deleteTicket(m_ticketCopy, m_App.getInventoryLocation());
        } catch (BasicException eData) {
            MessageInf msg = new MessageInf(MessageInf.SGN_NOTICE, AppLocal.getIntString("message.nosaveticket"), eData);
            msg.show(this);                
        }            
    }
    
    m_ticket = null;
    m_ticketCopy = null;
    resetToTicket(); 
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:17,代码来源:JTicketsBagTicket.java

示例5: jEditAttributesActionPerformed

import com.openbravo.basic.BasicException; //导入依赖的package包/类
private void jEditAttributesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jEditAttributesActionPerformed

        int i = m_ticketlines.getSelectedIndex();
        if (i < 0) {
            Toolkit.getDefaultToolkit().beep(); // no line selected
        } else {
            try {
                TicketLineInfo line = m_oTicket.getLine(i);
                JProductAttEdit attedit = JProductAttEdit.getAttributesEditor(this, m_App.getSession());
                attedit.editAttributes(line.getProductAttSetId(), line.getProductAttSetInstId());
                attedit.setVisible(true);
                if (attedit.isOK()) {
                    // The user pressed OK
                    line.setProductAttSetInstId(attedit.getAttributeSetInst());
                    line.setProductAttSetInstDesc(attedit.getAttributeSetInstDescription());
                    paintTicketLine(i, line);
                }
            } catch (BasicException ex) {
                MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindattributes"), ex);
                msg.show(this);
            }
        }
        
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:25,代码来源:JPanelTicket.java

示例6: getReservationsUpdate

import com.openbravo.basic.BasicException; //导入依赖的package包/类
public final SentenceExec getReservationsUpdate() {
    return new SentenceExecTransaction(s) {
        public int execInTransaction(Object params) throws BasicException {  

            new PreparedSentence(s
                , "DELETE FROM RESERVATION_CUSTOMERS WHERE ID = ?"
                , new SerializerWriteBasicExt(customerdatas, new int[]{0})).exec(params);
            if (((Object[]) params)[3] != null) {
                new PreparedSentence(s
                    , "INSERT INTO RESERVATION_CUSTOMERS (ID, CUSTOMER) VALUES (?, ?)"
                    , new SerializerWriteBasicExt(customerdatas, new int[]{0, 3})).exec(params);                
            }
            return new PreparedSentence(s
                , "UPDATE RESERVATIONS SET ID = ?, CREATED = ?, DATENEW = ?, TITLE = ?, CHAIRS = ?, ISDONE = ?, DESCRIPTION = ? WHERE ID = ?"
                , new SerializerWriteBasicExt(customerdatas, new int[]{0, 1, 2, 6, 7, 8, 9, 0})).exec(params);
        }
    };
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:19,代码来源:DataLogicCustomers.java

示例7: deleteTicket

import com.openbravo.basic.BasicException; //导入依赖的package包/类
public void deleteTicket() {
    
    if (m_PlaceCurrent != null) {
        
        String id = m_PlaceCurrent.getId();
        try {
            dlReceipts.deleteSharedTicket(id);
        } catch (BasicException e) {
            new MessageInf(e).show(this);
        }       
        
        m_PlaceCurrent.setPeople(false);
        
        m_PlaceCurrent = null;
    }        
    
    printState();     
    m_panelticket.setActiveTicket(null, null); 
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:20,代码来源:JTicketsBagRestaurantMap.java

示例8: AttributeUseEditor

import com.openbravo.basic.BasicException; //导入依赖的package包/类
/** 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));
        }}
    );
    attributemodel = new ComboBoxValModel();

    initComponents();

    jLineno.getDocument().addDocumentListener(dirty);
    jAttribute.addActionListener(dirty);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:18,代码来源:AttributeUseEditor.java

示例9: next

import com.openbravo.basic.BasicException; //导入依赖的package包/类
public boolean next() throws JRException {
    
    if (SRS == null) {
        throw new JRException(AppLocal.getIntString("exception.unavailabledataset"));
    }
    
    try {
        if (SRS.next()) {
            current = SRS.getCurrent();
            return true;
        } else {                
            current = null;
            SRS = null;
            sent.closeExec();
            sent = null;
            return false;
        }                
    } catch (BasicException e) {
        throw new JRException(e);
    }      
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:22,代码来源:JRDataSourceBasic.java

示例10: actionClosingForm

import com.openbravo.basic.BasicException; //导入依赖的package包/类
public boolean actionClosingForm(Component c) throws BasicException {
    if (m_Dirty.isDirty()) {
        int res = JOptionPane.showConfirmDialog(c, LocalRes.getIntString("message.wannasave"), LocalRes.getIntString("title.editor"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
        if (res == JOptionPane.YES_OPTION) {
            saveData();
            return true;
        } else if (res == JOptionPane.NO_OPTION) {
            refreshCurrent();
            return true;
        } else {
            return false;
        }
    } else {
        return true;
    }
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:17,代码来源:BrowsableEditableData.java

示例11: syncCategory

import com.openbravo.basic.BasicException; //导入依赖的package包/类
public void syncCategory(final CategoryInfo cat) throws BasicException {
    
    Transaction t = new Transaction(s) {
        public Object transact() throws BasicException {
            // Sync the Category in a transaction
            
            // Try to update
            if (new PreparedSentence(s, 
                        "UPDATE CATEGORIES SET NAME = ?, IMAGE = ? WHERE ID = ?", 
                        SerializerWriteParams.INSTANCE
                        ).exec(new DataParams() { public void writeValues() throws BasicException {
                             setString(1, cat.getName());
                             setBytes(2, ImageUtils.writeImage(cat.getImage()));
                             setString(3, cat.getID());                                   
                        }}) == 0) {
                   
                // If not updated, try to insert
                new PreparedSentence(s, 
                    "INSERT INTO CATEGORIES(ID, NAME, IMAGE) VALUES (?, ?, ?)",
                    SerializerWriteParams.INSTANCE
                    ).exec(new DataParams() { public void writeValues() throws BasicException {
                        setString(1, cat.getID());
                        setString(2, cat.getName());
                        setBytes(3, ImageUtils.writeImage(cat.getImage()));
                    }});
            }
            return null;        
        }
    };
    t.execute();        
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:32,代码来源:DataLogicIntegration.java

示例12: getTicketPayments

import com.openbravo.basic.BasicException; //导入依赖的package包/类
public List getTicketPayments(final String ticket) throws BasicException {
    return new PreparedSentence(s
            , "SELECT TOTAL, PAYMENT FROM PAYMENTS WHERE RECEIPT = ?"
            , SerializerWriteString.INSTANCE
            , new SerializerRead() {
                public Object readValues(DataRead dr) throws BasicException {
                    return new PaymentInfoTicket(
                            dr.getDouble(1),
                            dr.getString(2));
                }                
            }).list(ticket);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:13,代码来源:DataLogicIntegration.java

示例13: createValue

import com.openbravo.basic.BasicException; //导入依赖的package包/类
public Object createValue() throws BasicException {
    return new Object[] {
        id,
        attid,
        Formats.STRING.formatValue(jValue.getText())
    };
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:8,代码来源:AttributeValuesEditor.java

示例14: syncTaxCategory

import com.openbravo.basic.BasicException; //导入依赖的package包/类
public void syncTaxCategory(final TaxCategoryInfo taxcat) throws BasicException {
    
    Transaction t = new Transaction(s) {
        public Object transact() throws BasicException {
            // Sync the Tax in a transaction
            
            // Try to update                
            if (new PreparedSentence(s, 
                        "UPDATE TAXCATEGORIES SET NAME = ?  WHERE ID = ?",
                        SerializerWriteParams.INSTANCE
                        ).exec(new DataParams() { public void writeValues() throws BasicException {
                            setString(1, taxcat.getName());
                            setString(2, taxcat.getID());                                    
                        }}) == 0) {
                   
                // If not updated, try to insert
                new PreparedSentence(s, 
                        "INSERT INTO TAXCATEGORIES(ID, NAME) VALUES (?, ?)", 
                        SerializerWriteParams.INSTANCE
                        ).exec(new DataParams() { public void writeValues() throws BasicException {
                            setString(1, taxcat.getID());
                            setString(2, taxcat.getName());
                        }});
            }
            
            return null;
        }
    };
    t.execute();                   
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:31,代码来源:DataLogicIntegration.java

示例15: getProductCatalog

import com.openbravo.basic.BasicException; //导入依赖的package包/类
public List<ProductInfoExt> getProductCatalog(String category) throws BasicException  {
    return new PreparedSentence(s
        , "SELECT P.ID, P.REFERENCE, P.CODE, P.NAME, P.ISCOM, P.ISSCALE, P.PRICEBUY, P.PRICESELL, P.TAXCAT, P.CATEGORY, P.ATTRIBUTESET_ID, P.IMAGE, P.ATTRIBUTES " +
          "FROM PRODUCTS P, PRODUCTS_CAT O WHERE P.ID = O.PRODUCT AND P.CATEGORY = ? " +
          "ORDER BY O.CATORDER, P.NAME"
        , SerializerWriteString.INSTANCE
        , ProductInfoExt.getSerializerRead()).list(category);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:9,代码来源:DataLogicSales.java


注:本文中的com.openbravo.basic.BasicException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。