Skip to content

Commit

Permalink
issue #3437 javadoc review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Arnold <[email protected]>
  • Loading branch information
punktilious committed Jun 15, 2022
1 parent 5f7e25d commit 150e3c3
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ public default String doubleClause() {
return "DOUBLE";
}

/**
* Generate a clause for smallint data type
* @return
*/
public default String smallintClause() {
return "SMALLINT";
}

/**
* Generate a clause for VARCHAR
* @param size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public void createIndex(String schemaName, String tableName, String indexName, S
public void activateRowAccessControl(String schemaName, String tableName);

/**
* Deactivate row access control on a table ALTER TABLE <tbl> DEACTIVATE ROW
* Deactivate row access control on a table ALTER TABLE tbl_name DEACTIVATE ROW
* ACCESS CONTROL
*
* @param schemaName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ public class SchemaApplyContext {
protected SchemaApplyContext(boolean includeForeignKeys) {
this.includeForeignKeys = includeForeignKeys;
}

/**
* Get the includeForeignKeys flag
* @return
*/
public boolean isIncludeForeignKeys() {
return this.includeForeignKeys;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
/**
* DAO to configure the Citus database connection when performing schema build
* activities. This must be performed before any of the following UDFs are called:
* - create_distributed_table
* - create_reference_table
* <ul>
* <li>create_distributed_table
* <li>create_reference_table
* </ul>
* to avoid the following error:
* <pre>
* org.postgresql.util.PSQLException: ERROR: cannot modify table "common_token_values" because there was a parallel operation on a distributed table in the transaction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@
*/
public class PreparedStatementHelper {
// The PreparedStatement we delegate everything to
private final Calendar UTC = CalendarHelper.getCalendarForUTC();
private final PreparedStatement ps;

// The calendar to make sure all times are treated as UTC
private final Calendar UTC = CalendarHelper.getCalendarForUTC();

// The current parameter index in the statement
private int index = 1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public interface IDatabaseObject {
/**
* Apply the DDL, but within its own transaction
* @param target the target database we apply to
* @param context the context used to modify how the schema objects are applied
* @param cp of thread-specific transactions
* @param vhs the service interface for adding this object to the version history table
*/
Expand Down Expand Up @@ -107,6 +108,7 @@ public interface IDatabaseObject {
* executed concurrently (but in the right order)
* @param tc
* @param target
* @param context
* @param tp
* @param vhs
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,13 @@ public boolean isUnique() {

/**
* Apply this object to the given database target
*
* @param schemaName
* @param tableName
* @param tenantColumnName
* @param target
* @param distributionRules
* @param distributionType
* @param distributionColumn
*/
public void apply(String schemaName, String tableName, String tenantColumnName, ISchemaAdapter target,
DistributionType distributionType, String distributionColumn) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public SmallIntColumn(String name, boolean nullable, String defaultValue) {

@Override
public String getTypeInfo(IDatabaseTypeAdapter adapter) {
// TODO ask the adapter for the type name to use for a smallint type column.
return "SMALLINT";
return adapter.smallintClause();
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2020
* (C) Copyright IBM Corp. 2020, 2022
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2020
* (C) Copyright IBM Corp. 2020, 2022
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,11 @@ public interface JDBCIdentityCache {
* Get a list of logical_resource_id values matching the given logicalId without
* knowing the resource type. This means we could get back multiple ids, one per
* resource type, such as:
* Claim/foo
* Observation/foo
* Patient/foo
* <ul>
* <li>Claim/foo
* <li>Observation/foo
* <li>Patient/foo
* </ul>
* @param tokenValue
* @return
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ List<ResourceChangeLogRecord> changes(FHIRPersistenceContext context, int resour
/**
* Erases part or a whole of a resource in the data layer.
*
* @param context
* @param context the FHIRPersistenceContext associated with this request
* @param eraseDto the details of the user input
* @return a record indicating the success or partial success of the erase
* @throws FHIRPersistenceException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ public Builder withIfNoneMatch(Integer ifNoneMatch) {
}

/**
* Build with the shardKey value
* @param shardKey
* Build with the requestShard value
* @param requestShard
* @return
*/
public Builder withRequestShard(String requestShard) {
Expand Down

0 comments on commit 150e3c3

Please sign in to comment.