本文整理汇总了Java中com.odoo.core.orm.ODataRow.getInt方法的典型用法代码示例。如果您正苦于以下问题:Java ODataRow.getInt方法的具体用法?Java ODataRow.getInt怎么用?Java ODataRow.getInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.odoo.core.orm.ODataRow
的用法示例。
在下文中一共展示了ODataRow.getInt方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onPostExecute
import com.odoo.core.orm.ODataRow; //导入方法依赖的package包/类
@Override
protected void onPostExecute(ODataRow row) {
super.onPostExecute(row);
if (row != null) {
ONotificationBuilder.cancelNotification(mContext, row.getInt(OColumn.ROW_ID));
ONotificationBuilder builder = new ONotificationBuilder(mContext,
row.getInt(OColumn.ROW_ID));
builder.allowVibrate(true);
builder.withRingTone(true);
builder.setTitle(row.getString("name"));
builder.setText("Download Complete");
builder.setBigText("Download Complete");
if (row.getString("file_type").contains("image")) {
Bitmap bmp = getBitmapFromURI(Uri.parse(row.getString("file_uri")));
builder.setBigPicture(bmp);
}
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse(row.getString("file_uri")), row.getString("file_type"));
builder.setResultIntent(intent);
builder.build().show();
} else {
ONotificationBuilder.cancelNotification(mContext);
}
}
示例2: getAttributes
import com.odoo.core.orm.ODataRow; //导入方法依赖的package包/类
private HashMap<String, List<ODataRow>> getAttributes(List<ODataRow> variants) {
HashMap<String, List<ODataRow>> attributes = new HashMap<>();
List<String> attValIds = new ArrayList<>();
for (ODataRow variant : variants) {
List<ODataRow> attrVals = variant.getM2MRecord("attribute_value_ids").browseEach();
for (ODataRow attrVal : attrVals) {
ODataRow attribute = attrVal.getM2ORecord("attribute_id").browse();
String key = "attr_" + attribute.getInt(OColumn.ROW_ID);
attributesItems.put(key, attribute);
List<ODataRow> attValues = new ArrayList<>();
if (attributes.containsKey(key)) {
attValues.addAll(attributes.get(key));
}
if (!attValIds.contains("attr_val_" + attrVal.getString(OColumn.ROW_ID))) {
attValues.add(attrVal);
attValIds.add("attr_val_" + attrVal.getString(OColumn.ROW_ID));
}
attributes.put(key, attValues);
}
}
return attributes;
}
示例3: getPos
import com.odoo.core.orm.ODataRow; //导入方法依赖的package包/类
private int getPos() {
if (mResourceArray != -1 && mValue != null) {
return Integer.parseInt(mValue.toString());
} else if (mCol.getType().isAssignableFrom(OSelection.class)) {
if (items.size() <= 0) {
createItems();
}
for (ODataRow item : items) {
int index = items.indexOf(item);
if (item.getString("key").equals(mValue.toString())) {
return index;
}
}
} else {
ODataRow rec = getValueForM2O();
if (rec != null) {
return rec.getInt(OColumn.ROW_ID);
}
}
return -1;
}
示例4: onPostExecute
import com.odoo.core.orm.ODataRow; //导入方法依赖的package包/类
@Override
protected void onPostExecute(ODataRow row) {
super.onPostExecute(row);
if (row != null) {
ONotificationBuilder.cancelNotification(mActivity, row.getInt(OColumn.ROW_ID));
ONotificationBuilder builder = new ONotificationBuilder(mActivity,
row.getInt(OColumn.ROW_ID));
builder.allowVibrate(true);
builder.withRingTone(true);
builder.setTitle(row.getString("name"));
builder.setText("Download Complete");
builder.setBigText("Download Complete");
if (row.getString("file_type").contains("image")) {
Bitmap bmp = getBitmapFromURI(Uri.parse(row.getString("file_uri")));
builder.setBigPicture(bmp);
}
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse(row.getString("file_uri")), row.getString("file_type"));
builder.setResultIntent(intent);
builder.build().show();
} else {
ONotificationBuilder.cancelNotification(mActivity);
}
}
示例5: getAuthorImage
import com.odoo.core.orm.ODataRow; //导入方法依赖的package包/类
public String getAuthorImage(int row_id) {
ODataRow row = browse(new String[]{"author_id"}, row_id);
if (row.getInt("author_id") != 0) {
ODataRow author_id = row.getM2ORecord("author_id").browse();
return author_id.getString("image_small");
}
return "false";
}
示例6: onCreate
import com.odoo.core.orm.ODataRow; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.base_mail_chatter_message_compose);
getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
fileManager = new OFileManager(this);
Bundle extra = getIntent().getExtras();
mType = MessageType.valueOf(extra.getString("type"));
mModel = OModel.get(this, extra.getString("model"), null);
irAttachment = new IrAttachment(this);
mailMessage = new MailMessage(this);
server_id = extra.getInt("server_id");
if (mModel.getModelName().equals("res.partner")) {
partner_id = server_id;
} else {
ODataRow row = mModel.browse(mModel.selectRowId(server_id));
for (OColumn col : mModel.getColumns(false)) {
if (col.getType().isAssignableFrom(ResPartner.class)) {
if (col.getRelationType() != null
&& col.getRelationType() == OColumn.RelationType.ManyToOne) {
ODataRow partner = null;
if (!row.getString(col.getName()).equals("false")) {
partner = row.getM2ORecord(col.getName()).browse();
}
if (partner != null && partner.getInt("id") != 0) {
partner_id = partner.getInt("id");
}
}
}
}
}
findViewById(R.id.btnAttachment).setOnClickListener(this);
findViewById(R.id.btnSend).setOnClickListener(this);
findViewById(R.id.btnCancel).setOnClickListener(this);
edtSubject = (EditText) findViewById(R.id.messageSubject);
edtBody = (EditText) findViewById(R.id.messageBody);
horizontalScrollView = (LinearLayout) findViewById(R.id.attachmentsList);
init();
}
示例7: downloadAttachment
import com.odoo.core.orm.ODataRow; //导入方法依赖的package包/类
public void downloadAttachment(int attachment_id) {
ODataRow attachment = irAttachment.browse(attachment_id);
if (attachment != null) {
String uri = attachment.getString("file_uri");
if (uri.equals("false")) {
// Downloading new file
_download(attachment);
} else {
Uri file_uri = Uri.parse(uri);
if (fileExists(file_uri)) {
requestIntent(file_uri);
} else if (atLeastKitKat()) {
String file_path = getDocPath(file_uri);
if (file_path != null) {
file_uri = Uri.fromFile(new File(file_path));
requestIntent(file_uri);
} else if (attachment.getInt("id") != 0) {
// Downloading new file
_download(attachment);
} else {
// Failed to get file
OAlert.showAlert(mContext, "Unable to find file !");
}
} else if (fileExists(file_uri)) {
requestIntent(file_uri);
} else {
// Failed to get file
OAlert.showAlert(mContext, "Unable to find file !");
}
}
}
}
示例8: _download
import com.odoo.core.orm.ODataRow; //导入方法依赖的package包/类
private void _download(ODataRow attachment) {
ONotificationBuilder builder = new ONotificationBuilder(mContext,
attachment.getInt(OColumn.ROW_ID));
builder.setTitle("Downloading " + attachment.getString("name"));
builder.setText("Download in progress");
builder.setOngoing(true);
builder.setAutoCancel(true);
DownloadManager downloader = new DownloadManager(builder);
downloader.execute(attachment);
}
示例9: onAttributeValueSelect
import com.odoo.core.orm.ODataRow; //导入方法依赖的package包/类
@Override
public void onAttributeValueSelect(ODataRow attribute, ODataRow value) {
ODataRow price = productAttrPrice.browse(null, "value_id = ? and product_tmpl_id = ?",
new String[]{value.getInt(OColumn.ROW_ID) + "", product_tmpl_id + ""});
String key = "key_" + value.getInt("attribute_id");
float price_extra = 0;
if (price != null) {
price_extra = price.getFloat("price_extra");
}
price_extra_list.put(key, price_extra);
calculatePrice();
}
示例10: onClick
import com.odoo.core.orm.ODataRow; //导入方法依赖的package包/类
@Override
public void onClick(View v) {
ODataRow attr = (ODataRow) v.getTag();
if (selectedValue != -1 && selectedView != null) {
selectedView.setBackgroundResource(R.drawable.attr_value_item);
}
selectedValue = attr.getInt(OColumn.ROW_ID);
v.setBackgroundResource(R.drawable.attr_value_item_selected);
selectedView = v;
if (mOnAttributeSelectListener != null) {
mOnAttributeSelectListener.onAttributeValueSelect(mAttr, attr);
}
}
示例11: onCreate
import com.odoo.core.orm.ODataRow; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.base_mail_chatter_message_compose);
getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
fileManager = new OFileManager(this);
Bundle extra = getIntent().getExtras();
mType = MessageType.valueOf(extra.getString("type"));
mModel = OModel.get(this, extra.getString("model"), null);
irAttachment = new IrAttachment(this, null);
mailMessage = new MailMessage(this, null);
server_id = extra.getInt("server_id");
if (mModel.getModelName().equals("res.partner")) {
partner_id = server_id;
} else {
ODataRow row = mModel.browse(mModel.selectRowId(server_id));
for (OColumn col : mModel.getColumns(false)) {
if (col.getType().isAssignableFrom(ResPartner.class)) {
if (col.getRelationType() != null
&& col.getRelationType() == OColumn.RelationType.ManyToOne) {
ODataRow partner = null;
if (!row.getString(col.getName()).equals("false")) {
partner = row.getM2ORecord(col.getName()).browse();
}
if (partner != null && partner.getInt("id") != 0) {
partner_id = partner.getInt("id");
}
}
}
}
}
findViewById(R.id.btnAttachment).setOnClickListener(this);
findViewById(R.id.btnSend).setOnClickListener(this);
findViewById(R.id.btnCancel).setOnClickListener(this);
edtSubject = (EditText) findViewById(R.id.messageSubject);
edtBody = (EditText) findViewById(R.id.messageBody);
horizontalScrollView = (LinearLayout) findViewById(R.id.attachmentsList);
init();
}
示例12: _downloadAttachment
import com.odoo.core.orm.ODataRow; //导入方法依赖的package包/类
private void _downloadAttachment(int id) {
ODataRow attachment = irAttachment.browse(id);
if (attachment != null) {
String uri = attachment.getString("file_uri");
if (uri.equals("false")) {
// Downloading new file
_download(attachment);
} else {
Uri file_uri = Uri.parse(uri);
if (fileExists(file_uri)) {
requestIntent(file_uri);
} else if (atLeastKitKat()) {
String file_path = getDocPath(file_uri);
if (file_path != null) {
file_uri = Uri.fromFile(new File(file_path));
requestIntent(file_uri);
} else if (attachment.getInt("id") != 0) {
// Downloading new file
_download(attachment);
} else {
// Failed to get file
OAlert.showAlert(mActivity, "Unable to find file !");
}
} else if (fileExists(file_uri)) {
requestIntent(file_uri);
} else {
// Failed to get file
OAlert.showAlert(mActivity, "Unable to find file !");
}
}
}
}
示例13: _download
import com.odoo.core.orm.ODataRow; //导入方法依赖的package包/类
private void _download(ODataRow attachment) {
ONotificationBuilder builder = new ONotificationBuilder(mActivity,
attachment.getInt(OColumn.ROW_ID));
builder.setTitle("Downloading " + attachment.getString("name"));
builder.setText("Download in progress");
builder.setOngoing(true);
builder.setAutoCancel(true);
DownloadManager downloader = new DownloadManager(builder);
downloader.execute(attachment);
}