Package com.gpudb.protocol
Class GetGraphEntitiesRequest
- java.lang.Object
-
- com.gpudb.protocol.GetGraphEntitiesRequest
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class GetGraphEntitiesRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.getGraphEntities.Retrieves node or edge entities from an existing graph, with pagination support via offset and limit. Use
GPUdb.showGraphto obtain the total number of nodes and edges.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGetGraphEntitiesRequest.OptionsA set of string constants for theGetGraphEntitiesRequestparameteroptions.
-
Constructor Summary
Constructors Constructor Description GetGraphEntitiesRequest()Constructs a GetGraphEntitiesRequest object with default parameters.GetGraphEntitiesRequest(String graphName, long offset, long limit, Map<String,String> options)Constructs a GetGraphEntitiesRequest object with the specified parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.StringgetGraphName()Name of the graph from which to retrieve entities.longgetLimit()Number of entities to retrieve starting fromoffset.longgetOffset()Starting index of the entities to retrieve (0-based).Map<String,String>getOptions()Optional parameters.org.apache.avro.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.GetGraphEntitiesRequestsetGraphName(String graphName)Name of the graph from which to retrieve entities.GetGraphEntitiesRequestsetLimit(long limit)Number of entities to retrieve starting fromoffset.GetGraphEntitiesRequestsetOffset(long offset)Starting index of the entities to retrieve (0-based).GetGraphEntitiesRequestsetOptions(Map<String,String> options)Optional parameters.StringtoString()
-
-
-
Constructor Detail
-
GetGraphEntitiesRequest
public GetGraphEntitiesRequest()
Constructs a GetGraphEntitiesRequest object with default parameters.
-
GetGraphEntitiesRequest
public GetGraphEntitiesRequest(String graphName, long offset, long limit, Map<String,String> options)
Constructs a GetGraphEntitiesRequest object with the specified parameters.- Parameters:
graphName- Name of the graph from which to retrieve entities.offset- Starting index of the entities to retrieve (0-based). The default value is 0.limit- Number of entities to retrieve starting fromoffset. A value of -1 returns all entities from the offset to the end. Note: theentitiesIntorentitiesStringarray size will be 2x this value for nodes (stride 2) or 4x for edges (stride 4). The default value is 10000.options- Optional parameters.ENTITY_TYPE: The type of entity to retrieve. Supported values: The default value isEDGE.SERVER_ID: Indicates which graph server to send the request to. Required when the graph is distributed across multiple servers. The default value is '0'.
Map.
-
-
Method Detail
-
getClassSchema
public static org.apache.avro.Schema getClassSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Returns:
- The schema for the class.
-
getGraphName
public String getGraphName()
Name of the graph from which to retrieve entities.- Returns:
- The current value of
graphName.
-
setGraphName
public GetGraphEntitiesRequest setGraphName(String graphName)
Name of the graph from which to retrieve entities.- Parameters:
graphName- The new value forgraphName.- Returns:
thisto mimic the builder pattern.
-
getOffset
public long getOffset()
Starting index of the entities to retrieve (0-based). The default value is 0.- Returns:
- The current value of
offset.
-
setOffset
public GetGraphEntitiesRequest setOffset(long offset)
Starting index of the entities to retrieve (0-based). The default value is 0.- Parameters:
offset- The new value foroffset.- Returns:
thisto mimic the builder pattern.
-
getLimit
public long getLimit()
Number of entities to retrieve starting fromoffset. A value of -1 returns all entities from the offset to the end. Note: theentitiesIntorentitiesStringarray size will be 2x this value for nodes (stride 2) or 4x for edges (stride 4). The default value is 10000.- Returns:
- The current value of
limit.
-
setLimit
public GetGraphEntitiesRequest setLimit(long limit)
Number of entities to retrieve starting fromoffset. A value of -1 returns all entities from the offset to the end. Note: theentitiesIntorentitiesStringarray size will be 2x this value for nodes (stride 2) or 4x for edges (stride 4). The default value is 10000.- Parameters:
limit- The new value forlimit.- Returns:
thisto mimic the builder pattern.
-
getOptions
public Map<String,String> getOptions()
Optional parameters.ENTITY_TYPE: The type of entity to retrieve. Supported values: The default value isEDGE.SERVER_ID: Indicates which graph server to send the request to. Required when the graph is distributed across multiple servers. The default value is '0'.
Map.- Returns:
- The current value of
options.
-
setOptions
public GetGraphEntitiesRequest setOptions(Map<String,String> options)
Optional parameters.ENTITY_TYPE: The type of entity to retrieve. Supported values: The default value isEDGE.SERVER_ID: Indicates which graph server to send the request to. Required when the graph is distributed across multiple servers. The default value is '0'.
Map.- Parameters:
options- The new value foroptions.- Returns:
thisto mimic the builder pattern.
-
getSchema
public org.apache.avro.Schema getSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getSchemain interfaceorg.apache.avro.generic.GenericContainer- Returns:
- The schema object describing this class.
-
get
public Object get(int index)
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to get- Returns:
- value of the field with the given index.
- Throws:
IndexOutOfBoundsException
-
put
public void put(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-