public String page() { if (this.page != null) { E.checkState(this.limit != Query.NO_LIMIT, "Must set limit when using paging"); E.checkState(this.limit != 0L, "Can't set limit=0 when using paging"); E.checkState(this.offset == 0L, "Can't set offset when using paging, but got '%s'", this.offset); } return this.page; }
public Node(Id id, Node parent) { E.checkArgumentNotNull(id, "Id of Node can't be null"); this.id = id; this.parent = parent; }
public UserpropRelation(Id key, RelationType op, Object value) { E.checkNotNull(op, "relation type"); this.key = key; this.relation = op; this.value = value; }
@Override public VertexLabelBuilder idStrategy(IdStrategy idStrategy) { E.checkArgument(this.idStrategy == IdStrategy.DEFAULT || this.idStrategy == idStrategy, "Not allowed to change id strategy for " + "vertex label '%s'", this.name); this.idStrategy = idStrategy; return this; }
public static final void check() { // Check version of hugegraph-core. Firstly do check from version 0.3 VersionUtil.check(CoreVersion.VERSION, "0.9", "0.10", CoreVersion.NAME); } }
@Override public String toString() { return "0x" + Bytes.toHex(this.bytes); } }
@Override public int compareTo(BackendColumn other) { if (other == null) { return 1; } return Bytes.compare(this.name, other.name); }
/** * Split a composite id into multiple ids with IDS_SPLITOR * @param ids the string id value to be splitted * @return splitted string values */ public static String[] split(String ids) { return StringUtil.unescape(ids, IDS_SPLITOR_STR, ESCAPE_STR); }
@Override public VertexLabelBuilder useAutomaticId() { E.checkArgument(this.idStrategy == IdStrategy.DEFAULT || this.idStrategy == IdStrategy.AUTOMATIC, "Not allowed to change id strategy for " + "vertex label '%s'", this.name); this.idStrategy = IdStrategy.AUTOMATIC; return this; }
@Override public GraphManager provide() { E.checkState(this.manager != null, "Please wait for the server to initialize"); return this.manager; }
public IdPrefixQuery(HugeType resultType, Query originQuery, Id start, boolean inclusive, Id prefix) { super(resultType, originQuery); E.checkArgumentNotNull(start, "The start parameter can't be null"); this.start = start; this.inclusiveStart = inclusive; this.prefix = prefix; }
public SyspropRelation(HugeKeys key, RelationType op, Object value) { E.checkNotNull(op, "relation type"); this.key = key; this.relation = op; this.value = value; }
@Override public VertexLabelBuilder useCustomizeStringId() { E.checkArgument(this.idStrategy == IdStrategy.DEFAULT || this.idStrategy == IdStrategy.CUSTOMIZE_STRING, "Not allowed to change id strategy for " + "vertex label '%s'", this.name); this.idStrategy = IdStrategy.CUSTOMIZE_STRING; return this; }
public final synchronized Cluster cluster() { E.checkState(this.cluster != null, "Cassandra cluster has not been initialized"); return this.cluster; }
public HugeEdge(final HugeGraph graph, Id id, EdgeLabel label) { super(graph, id); E.checkArgumentNotNull(label, "Edge label can't be null"); this.label = label; this.name = null; this.ownerVertex = null; this.sourceVertex = null; this.targetVertex = null; }
@Override public VertexLabelBuilder usePrimaryKeyId() { E.checkArgument(this.idStrategy == IdStrategy.DEFAULT || this.idStrategy == IdStrategy.PRIMARY_KEY, "Not allowed to change id strategy for " + "vertex label '%s'", this.name); this.idStrategy = IdStrategy.PRIMARY_KEY; return this; }
public IdRangeQuery(HugeType resultType, Query originQuery, Id start, boolean inclusiveStart, Id end, boolean inclusiveEnd) { super(resultType, originQuery); E.checkArgumentNotNull(start, "The start parameter can't be null"); this.start = start; this.end = end; this.inclusiveStart = inclusiveStart; this.inclusiveEnd = inclusiveEnd; }
private RemoveLeftIndexJob(ConditionQuery query, HugeElement element) { E.checkArgumentNotNull(query, "query"); E.checkArgumentNotNull(element, "element"); this.query = query; this.element = element; }
@Override public void checkCreate(boolean isBatch) { E.checkArgumentNotNull(this.name, "The name of vertex label can't be null"); }