本文整理汇总了Java中com.openbravo.data.loader.SerializerRead类的典型用法代码示例。如果您正苦于以下问题:Java SerializerRead类的具体用法?Java SerializerRead怎么用?Java SerializerRead使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SerializerRead类属于com.openbravo.data.loader包,在下文中一共展示了SerializerRead类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSerializerRead
import com.openbravo.data.loader.SerializerRead; //导入依赖的package包/类
public static SerializerRead getSerializerRead() {
return new SerializerRead() { public Object readValues(DataRead dr) throws BasicException {
ProductInfoExt product = new ProductInfoExt();
product.m_ID = dr.getString(1);
product.m_sRef = dr.getString(2);
product.m_sCode = dr.getString(3);
product.m_sName = dr.getString(4);
product.m_bCom = dr.getBoolean(5).booleanValue();
product.m_bScale = dr.getBoolean(6).booleanValue();
product.m_dPriceBuy = dr.getDouble(7).doubleValue();
product.m_dPriceSell = dr.getDouble(8).doubleValue();
product.taxcategoryid = dr.getString(9);
product.categoryid = dr.getString(10);
product.attributesetid = dr.getString(11);
product.m_Image = ImageUtils.readImage(dr.getBytes(12));
product.attributes = ImageUtils.readProperties(dr.getBytes(13));
return product;
}};
}
示例2: AttributeUseEditor
import com.openbravo.data.loader.SerializerRead; //导入依赖的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);
}
示例3: getSerializerRead
import com.openbravo.data.loader.SerializerRead; //导入依赖的package包/类
/**
*
* @return
*/
public static SerializerRead getSerializerRead() {
return new SerializerRead() { public Object readValues(DataRead dr) throws BasicException {
return new PromoInfo(
dr.getString(1),
dr.getString(2),
dr.getInt(3),
dr.getInt(4),
dr.getString(5),
dr.getString(6),
dr.getInt(7),
dr.getDouble(8),
dr.getInt(9),
dr.getInt(10),
dr.getInt(11),
dr.getInt(12),
dr.getString(13),
dr.getString(14)
);
}};
}
示例4: AttributeUseEditor
import com.openbravo.data.loader.SerializerRead; //导入依赖的package包/类
/** Creates new form AttributeSetEditor
* @param app
* @param dirty */
public AttributeUseEditor(AppView app, DirtyManager dirty) {
attributesent = new StaticSentence(app.getSession()
, "SELECT ID, NAME FROM ATTRIBUTE ORDER BY NAME"
, null
, new SerializerRead() {@Override
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);
}
示例5: getSerializerRead
import com.openbravo.data.loader.SerializerRead; //导入依赖的package包/类
public static SerializerRead getSerializerRead() {
return new SerializerRead() { public Object readValues(DataRead dr) throws BasicException {
ProductInfoExt product = new ProductInfoExt();
product.m_ID = dr.getString(1);
product.m_sRef = dr.getString(2);
product.m_sCode = dr.getString(3);
product.m_sName = dr.getString(4);
product.m_bCom = dr.getBoolean(5).booleanValue();
product.m_bScale = dr.getBoolean(6).booleanValue();
product.m_bKitchenPrint = dr.getBoolean(7).booleanValue();
product.m_dPriceBuy = dr.getDouble(8).doubleValue();
product.m_dPriceSell = dr.getDouble(9).doubleValue();
product.taxcategoryid = dr.getString(10);
product.categoryid = dr.getString(11);
product.attributesetid = dr.getString(12);
product.m_Image = ImageUtils.readImage(dr.getBytes(13));
product.attributes = ImageUtils.readProperties(dr.getBytes(14));
return product;
}};
}
示例6: getCustomerList
import com.openbravo.data.loader.SerializerRead; //导入依赖的package包/类
public SentenceList getCustomerList() {
return new StaticSentence(s
, new QBFBuilder("SELECT ID, TAXID, SEARCHKEY, NAME FROM CUSTOMERS WHERE VISIBLE = " + s.DB.TRUE() + " AND ?(QBF_FILTER) ORDER BY NAME", new String[] {"TAXID", "SEARCHKEY", "NAME"})
, new SerializerWriteBasic(new Datas[] {Datas.OBJECT, Datas.STRING, Datas.OBJECT, Datas.STRING, Datas.OBJECT, Datas.STRING})
, new SerializerRead() {
public Object readValues(DataRead dr) throws BasicException {
CustomerInfo c = new CustomerInfo(dr.getString(1));
c.setTaxid(dr.getString(2));
c.setSearchkey(dr.getString(3));
c.setName(dr.getString(4));
return c;
}
});
}
示例7: init
import com.openbravo.data.loader.SerializerRead; //导入依赖的package包/类
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));
}});
attmodel = new ComboBoxValModel();
}
示例8: init
import com.openbravo.data.loader.SerializerRead; //导入依赖的package包/类
public void init(AppView app) {
attusesent = new StaticSentence(app.getSession()
, "SELECT ID, NAME FROM ATTRIBUTESET ORDER BY NAME"
, null
, new SerializerRead() { public Object readValues(DataRead dr) throws BasicException {
return new AttributeSetInfo(dr.getString(1), dr.getString(2));
}});
attusemodel = new ComboBoxValModel();
}
示例9: getTicketPayments
import com.openbravo.data.loader.SerializerRead; //导入依赖的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);
}
示例10: getSerializerRead
import com.openbravo.data.loader.SerializerRead; //导入依赖的package包/类
public static SerializerRead getSerializerRead() {
return new SerializerRead() {
@Override
public Object readValues(DataRead dr) throws BasicException {
return new HostInfo(dr.getString(1), dr.getString(2), dr.getString(3));
}
};
}
示例11: getSerializerRead
import com.openbravo.data.loader.SerializerRead; //导入依赖的package包/类
/**
*
* @return
*/
public static SerializerRead getSerializerRead() {
return new SerializerRead() {@Override
public Object readValues(DataRead dr) throws BasicException {
return new SalesDetailInfo(dr.getInt(1), dr.getString(2), dr.getDouble(3));
}};
}
示例12: getSerializerRead
import com.openbravo.data.loader.SerializerRead; //导入依赖的package包/类
/**
*
* @return
*/
public static SerializerRead getSerializerRead() {
return new SerializerRead() {
@Override
public Object readValues(DataRead dr) throws BasicException {
System.out.println("dr.getDataField().length:"+dr.getDataField().length);
ProductInfoExt product = new ProductInfoExt();
product.m_ID = dr.getString(1);
product.m_sRef = dr.getString(2);
product.m_sCode = dr.getString(3);
product.m_sName = dr.getString(4);
product.m_bCom = dr.getBoolean(5);
product.m_bScale = dr.getBoolean(6);
product.m_dPriceBuy = dr.getDouble(7);
product.m_dPriceSell = dr.getDouble(8);
product.taxcategoryid = dr.getString(9);
product.categoryid = dr.getString(10);
product.attributesetid = dr.getString(11);
product.m_Image = ImageUtils.readImage(dr.getBytes(12));
product.attributes = ImageUtils.readProperties(dr.getBytes(13));
product.m_bKitchen = dr.getBoolean(14);
product.m_bService = dr.getBoolean(15);
// ADDED JG 13 Nov 12 - Display
product.m_sDisplay = dr.getString(16);
// ADDED JDL 19.12.12
product.m_bVprice = dr.getBoolean(17);
// ADDED JDL 09.0.2.13 for Chris
product.m_bVerpatrib = dr.getBoolean(18);
// ADDED JDL 09.04.13
product.m_sTextTip = dr.getString(19);
// ADDED JDL 25.04.13
product.m_bWarranty = dr.getBoolean(20);
// JG July 2014 - added for Stock count
product.m_dStockUnits = dr.getDouble(21);
return product;
}
};
}
示例13: getSerializerRead
import com.openbravo.data.loader.SerializerRead; //导入依赖的package包/类
/**
*
* @return
*/
public static SerializerRead getSerializerRead() {
return new SerializerRead() {@Override
public Object readValues(DataRead dr) throws BasicException {
return new CategoryInfo(dr.getString(1), dr.getString(2), ImageUtils.readImage(dr.getBytes(3)),dr.getString(4),dr.getBoolean(5));
}};
}
示例14: getSerializerRead
import com.openbravo.data.loader.SerializerRead; //导入依赖的package包/类
/**
*
* @return ticketlines for this customer
*/
public static SerializerRead getSerializerRead() {
return new SerializerRead() {
@Override
public Object readValues(DataRead dr) throws BasicException {
String ticketId = dr.getString(1);
String productName = dr.getString(2);
String unit = dr.getString(3);
Double amount = dr.getDouble(4);
Double total = dr.getDouble(5);
String dateValue = dr.getString(6);
String customerName = dr.getString(7);
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
Date date = null;
try {
date = formatter.parse(dateValue);
} catch (ParseException ex) {
Logger.getLogger(DataLogicSales.class.getName()).log(Level.SEVERE, null, ex);
}
return new CustomerTransaction(ticketId, productName, unit, amount, total, date, customerName);
}
};
}
示例15: getSerializerRead
import com.openbravo.data.loader.SerializerRead; //导入依赖的package包/类
/**
*
* @return
*/
public static SerializerRead getSerializerRead() {
return new SerializerRead() {
@Override
public Object readValues(DataRead dr) throws BasicException {
return new ReturnInfo(
dr.getInt(1));
}
};
}