
com.aliyun.openservices.ots.model.condition.CompositeCondition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ots-public Show documentation
Show all versions of ots-public Show documentation
Aliyun Open Services SDK for Java Copyright (C) Alibaba Cloud Computing All rights reserved. 版权所有 (C)阿里云计算有限公司 http://www.aliyun.com
package com.aliyun.openservices.ots.model.condition;
import com.google.protobuf.ByteString;
import java.util.ArrayList;
import java.util.List;
public class CompositeCondition implements ColumnCondition {
public static enum LogicOperator {
NOT, AND, OR
}
private LogicOperator type;
private List subConditions;
public CompositeCondition(LogicOperator loType) {
this.type = loType;
this.subConditions = new ArrayList();
}
public CompositeCondition addCondition(ColumnCondition condition) {
this.subConditions.add(condition);
return this;
}
public void clear() {
this.subConditions.clear();
}
/**
* 查看当前设置的逻辑关系。
*
* @return 逻辑关系符号。
*/
public LogicOperator getOperationType() {
return this.type;
}
public List getSubConditions() {
return this.subConditions;
}
@Override
public ColumnConditionType getType() {
return ColumnConditionType.COMPOSITE_CONDITION;
}
@Override
public ByteString serialize() {
return ColumnConditionBuilder.buildCompositeCondition(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy