
com.alicloud.openservices.tablestore.ecosystem.LeftMatchResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tablestore Show documentation
Show all versions of tablestore Show documentation
Aliyun Open Services SDK for Java Copyright (C) Alibaba Cloud Computing All rights reserved. 版权所有
(C)阿里云计算有限公司 http://www.aliyun.com
The newest version!
package com.alicloud.openservices.tablestore.ecosystem;
import com.alicloud.openservices.tablestore.model.TableMeta;
import java.util.ArrayList;
import java.util.List;
/**
* LeftMatchResult for global index selection
*/
public class LeftMatchResult{
private List leftMatchKeyList;
public void setCanAppendNewKey(boolean canAppendNewKey) {
this.canAppendNewKey = canAppendNewKey;
}
private boolean canAppendNewKey;
private int beginPkIndex;
private String tableName;
private TableMeta meta;
private boolean matchedAll;
public List getLeftMatchKeyList() {
return leftMatchKeyList;
}
public int getCount() {
return leftMatchKeyList.size();
}
public boolean canMatchedAll() {
return getCount() == meta.getPrimaryKeyList().size();
}
public void append(List keyList){
leftMatchKeyList.addAll(keyList);
}
public String getTableName() {
return tableName;
}
public boolean getCanAppendNewKey() {
return canAppendNewKey;
}
public TableMeta getTableMeta() {
return this.meta;
}
public int getBeginPkIndex() {
return this.beginPkIndex;
}
public LeftMatchResult(String tableName, List keyList, boolean canAppend, int beginIndex, TableMeta meta) {
this.tableName = tableName;
this.leftMatchKeyList = keyList;
this.canAppendNewKey = canAppend;
this.beginPkIndex = beginIndex;
this.meta = meta;
}
public LeftMatchResult(String indexName, TableMeta meta) {
this.canAppendNewKey = true;
this.beginPkIndex = 0;
this.tableName = indexName;
this.meta = meta;
this.leftMatchKeyList = new ArrayList();
}
public LeftMatchResult() {
this.leftMatchKeyList = new ArrayList();
this.canAppendNewKey = false;
}
public void copyTo(LeftMatchResult target) {
target.leftMatchKeyList.addAll(this.leftMatchKeyList);
target.tableName = this.tableName;
target.canAppendNewKey = this.canAppendNewKey;
target.beginPkIndex = this.beginPkIndex;
target.meta = this.meta;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy