Package oracle.pgx.api
Class PartitionedIdBuilder
- java.lang.Object
-
- oracle.pgx.api.PartitionedIdBuilder
-
- All Implemented Interfaces:
IdBuilder<oracle.pgx.common.PartitionedId,PartitionedIdBuilder.WithTableName>
@BetaApi public class PartitionedIdBuilder extends java.lang.Object implements IdBuilder<oracle.pgx.common.PartitionedId,PartitionedIdBuilder.WithTableName>
A builder for partitioned IDs for a specific graph. UsePartitionedIdBuilderFactory.newId()to obtain an instance of this class.To build a
PartitionedId, first provide the table/provider name usingwithTableName(String). Then, specify a value for each key column of the provider.For example, assume a provider called
Personwith two key columns calledfirst_nameandlast_name, both of type STRING:PartitionedIdBuilderFactory idFactory = PartitionedIdBuilderFactory.forGraph(myGraph); PartitionedId id = idFactory.newId(). // Get instance of this builder class withTableName("Person"). // Specify table name withKeyValue("first_name", "Joanne"). withKeyValue("last_name", "Doe"). // Specify key column values build(); // Build the final ID. // Build more IDs, if needed PartitionedId anotherId = idFactory.newId()...The
PartitionedIdBuilder.WithTableName.withKeyValue(String, Object)function will fail, if either the key column does not exist for the table or the provided key value has the wrong type. ThePartitionedIdBuilder.WithTableName.build()function will fail, if the ID is incomplete, i.e., if there is at least one key column for which no key value was provided.- Since:
- 25.2.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPartitionedIdBuilder.WithTableNameBuilder stage for partitioned IDs for a specific entity provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PartitionedIdBuilder.WithTableNamewithTableName(java.lang.String tableName)Set the table name for the ID.
-
-
-
Method Detail
-
withTableName
public PartitionedIdBuilder.WithTableName withTableName(java.lang.String tableName)
Description copied from interface:IdBuilderSet the table name for the ID.- Specified by:
withTableNamein interfaceIdBuilder<oracle.pgx.common.PartitionedId,PartitionedIdBuilder.WithTableName>- Parameters:
tableName- The table name.- Returns:
- The next stage of this builder, which can be used to set key column names.
-
-