本文整理汇总了Java中com.openbravo.data.loader.SerializerWriteString类的典型用法代码示例。如果您正苦于以下问题:Java SerializerWriteString类的具体用法?Java SerializerWriteString怎么用?Java SerializerWriteString使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SerializerWriteString类属于com.openbravo.data.loader包,在下文中一共展示了SerializerWriteString类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getSharedTicket
import com.openbravo.data.loader.SerializerWriteString; //导入依赖的package包/类
public final TicketInfo getSharedTicket(String Id) throws BasicException {
if (Id == null) {
return null;
} else {
Object[]record = (Object[]) new StaticSentence(s
, "SELECT CONTENT FROM SHAREDTICKETS WHERE ID = ?"
, SerializerWriteString.INSTANCE
, new SerializerReadBasic(new Datas[] {Datas.SERIALIZABLE})).find(Id);
return record == null ? null : (TicketInfo) record[0];
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:13,代码来源:DataLogicReceipts.java
示例2: getTicketLines
import com.openbravo.data.loader.SerializerWriteString; //导入依赖的package包/类
public List getTicketLines(final String ticket) throws BasicException {
return new PreparedSentence(s
, "SELECT L.TICKET, L.LINE, L.PRODUCT, L.UNITS, L.PRICE, T.ID, T.NAME, T.CATEGORY, T.CUSTCATEGORY, T.PARENTID, T.RATE, T.RATECASCADE, T.RATEORDER, L.ATTRIBUTES " +
"FROM TICKETLINES L, TAXES T WHERE L.TAXID = T.ID AND L.TICKET = ?"
, SerializerWriteString.INSTANCE
, new SerializerReadClass(TicketLineInfo.class)).list(ticket);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:8,代码来源:DataLogicIntegration.java
示例3: getTicketPayments
import com.openbravo.data.loader.SerializerWriteString; //导入依赖的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
示例4: getSharedTicket
import com.openbravo.data.loader.SerializerWriteString; //导入依赖的package包/类
/**
*
* @param Id
* @return
* @throws BasicException
*/
public final TicketInfo getSharedTicket(String Id) throws BasicException {
if (Id == null) {
return null;
} else {
Object[]record = (Object[]) new StaticSentence(s
, "SELECT CONTENT FROM SHAREDTICKETS WHERE ID = ?"
, SerializerWriteString.INSTANCE
, new SerializerReadBasic(new Datas[] {Datas.SERIALIZABLE})).find(Id);
return record == null ? null : (TicketInfo) record[0];
}
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:19,代码来源:DataLogicReceipts.java
示例5: deleteSharedTicket
import com.openbravo.data.loader.SerializerWriteString; //导入依赖的package包/类
/**
*
* @param id
* @throws BasicException
*/
public final void deleteSharedTicket(final String id) throws BasicException {
new StaticSentence(s
, "DELETE FROM SHAREDTICKETS WHERE ID = ?"
, SerializerWriteString.INSTANCE).exec(id);
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:12,代码来源:DataLogicReceipts.java
示例6: getPickupId
import com.openbravo.data.loader.SerializerWriteString; //导入依赖的package包/类
/**
*
* @param Id
* @return
* @throws BasicException
*/
public final Integer getPickupId(String Id) throws BasicException {
if (Id == null) {
return null;
} else {
Object[]record = (Object[]) new StaticSentence(s
, "SELECT PICKUPID FROM SHAREDTICKETS WHERE ID = ?"
, SerializerWriteString.INSTANCE
, new SerializerReadBasic(new Datas[] {Datas.INT})).find(Id);
return record == null ? 0 : (Integer)record[0];
}
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:19,代码来源:DataLogicReceipts.java
示例7: deleteSharedTicket
import com.openbravo.data.loader.SerializerWriteString; //导入依赖的package包/类
public final void deleteSharedTicket(final String id) throws BasicException {
new StaticSentence(s
, "DELETE FROM SHAREDTICKETS WHERE ID = ?"
, SerializerWriteString.INSTANCE).exec(id);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:7,代码来源:DataLogicReceipts.java
示例8: getSerializerWrite
import com.openbravo.data.loader.SerializerWriteString; //导入依赖的package包/类
@Override
public SerializerWrite getSerializerWrite() {
return SerializerWriteString.INSTANCE;
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:5,代码来源:AuxiliarFilter.java
示例9: getSerializerWrite
import com.openbravo.data.loader.SerializerWriteString; //导入依赖的package包/类
public SerializerWrite getSerializerWrite() {
return SerializerWriteString.INSTANCE;
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:4,代码来源:AttributeFilter.java
示例10: syncProduct
import com.openbravo.data.loader.SerializerWriteString; //导入依赖的package包/类
public void syncProduct(final ProductInfoExt prod) throws BasicException {
Transaction t = new Transaction(s) {
public Object transact() throws BasicException {
// Sync the Product in a transaction
// Try to update
if (new PreparedSentence(s,
"UPDATE PRODUCTS SET REFERENCE = ?, CODE = ?, NAME = ?, PRICEBUY = ?, PRICESELL = ?, CATEGORY = ?, TAXCAT = ?, IMAGE = ? WHERE ID = ?",
SerializerWriteParams.INSTANCE
).exec(new DataParams() { public void writeValues() throws BasicException {
setString(1, prod.getReference());
setString(2, prod.getCode());
setString(3, prod.getName());
// setBoolean(x, p.isCom());
// setBoolean(x, p.isScale());
setDouble(4, prod.getPriceBuy());
setDouble(5, prod.getPriceSell());
setString(6, prod.getCategoryID());
setString(7, prod.getTaxCategoryID());
setBytes(8, ImageUtils.writeImage(prod.getImage()));
// setDouble(x, 0.0);
// setDouble(x, 0.0);
setString(9, prod.getID());
}}) == 0) {
// If not updated, try to insert
new PreparedSentence(s,
"INSERT INTO PRODUCTS (ID, REFERENCE, CODE, NAME, ISCOM, ISSCALE, PRICEBUY, PRICESELL, CATEGORY, TAXCAT, IMAGE, STOCKCOST, STOCKVOLUME) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
SerializerWriteParams.INSTANCE
).exec(new DataParams() { public void writeValues() throws BasicException {
setString(1, prod.getID());
setString(2, prod.getReference());
setString(3, prod.getCode());
setString(4, prod.getName());
setBoolean(5, prod.isCom());
setBoolean(6, prod.isScale());
setDouble(7, prod.getPriceBuy());
setDouble(8, prod.getPriceSell());
setString(9, prod.getCategoryID());
setString(10, prod.getTaxCategoryID());
setBytes(11, ImageUtils.writeImage(prod.getImage()));
setDouble(12, 0.0);
setDouble(13, 0.0);
}});
}
// Insert in catalog
new StaticSentence(s,
"INSERT INTO PRODUCTS_CAT(PRODUCT, CATORDER) VALUES (?, NULL)",
SerializerWriteString.INSTANCE
).exec(prod.getID());
return null;
}
};
t.execute();
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:59,代码来源:DataLogicIntegration.java
示例11: getSerializerWrite
import com.openbravo.data.loader.SerializerWriteString; //导入依赖的package包/类
/**
*
* @return
*/
@Override
public SerializerWrite getSerializerWrite() {
return SerializerWriteString.INSTANCE;
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:9,代码来源:AuxiliarFilter.java
示例12: getMarkers
import com.openbravo.data.loader.SerializerWriteString; //导入依赖的package包/类
public final List<Geomarker> getMarkers(String layerId) throws BasicException {
return new PreparedSentence(s, "SELECT ID, NAME, LATITUDE, LONGITUDE, VISIBLE, GEOLAYER FROM GEOMARKERS WHERE GEOLAYER = ? ORDER BY NAME", SerializerWriteString.INSTANCE, new SerializerReadClass(Geomarker.class)).list(layerId);
}
开发者ID:nordpos,项目名称:nordpos,代码行数:4,代码来源:DataLogicGeomap.java
示例13: syncProduct
import com.openbravo.data.loader.SerializerWriteString; //导入依赖的package包/类
public void syncProduct(final ProductInfoExt prod) throws BasicException {
Transaction t = new Transaction(s) {
public Object transact() throws BasicException {
// Sync the Product in a transaction
// Try to update
if (new PreparedSentence(s,
"UPDATE PRODUCTS SET REFERENCE = ?, CODE = ?, NAME = ?, PRICEBUY = ?, PRICESELL = ?, CATEGORY = ?, TAXCAT = ?, IMAGE = ? WHERE ID = ?",
SerializerWriteParams.INSTANCE
).exec(new DataParams() { public void writeValues() throws BasicException {
setString(1, prod.getReference());
setString(2, prod.getCode());
setString(3, prod.getName());
// setBoolean(x, p.isCom());
// setBoolean(x, p.isScale());
setDouble(4, prod.getPriceBuy());
setDouble(5, prod.getPriceSell());
setString(6, prod.getCategoryID());
setString(7, prod.getTaxCategoryID());
setBytes(8, ImageUtils.writeImage(prod.getImage()));
// setDouble(x, 0.0);
// setDouble(x, 0.0);
setString(9, prod.getID());
}}) == 0) {
// If not updated, try to insert
new PreparedSentence(s,
"INSERT INTO PRODUCTS (ID, REFERENCE, CODE, NAME, ISCOM, ISSCALE, ISKITCHENPRINT, PRICEBUY, PRICESELL, CATEGORY, TAXCAT, IMAGE, STOCKCOST, STOCKVOLUME) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
SerializerWriteParams.INSTANCE
).exec(new DataParams() { public void writeValues() throws BasicException {
setString(1, prod.getID());
setString(2, prod.getReference());
setString(3, prod.getCode());
setString(4, prod.getName());
setBoolean(5, prod.isCom());
setBoolean(6, prod.isScale());
setBoolean(7, prod.isKitchenPrint());
setDouble(8, prod.getPriceBuy());
setDouble(9, prod.getPriceSell());
setString(10, prod.getCategoryID());
setString(11, prod.getTaxCategoryID());
setBytes(12, ImageUtils.writeImage(prod.getImage()));
setDouble(13, 0.0);
setDouble(14, 0.0);
}});
}
// Insert in catalog
new StaticSentence(s,
"INSERT INTO PRODUCTS_CAT(PRODUCT, CATORDER) VALUES (?, NULL)",
SerializerWriteString.INSTANCE
).exec(prod.getID());
return null;
}
};
t.execute();
}
开发者ID:ZarGate,项目名称:OpenbravoPOS,代码行数:60,代码来源:DataLogicIntegration.java
注:本文中的com.openbravo.data.loader.SerializerWriteString类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论