Java 类com.amazonaws.services.dynamodb.model.ResourceNotFoundException 实例源码

项目:gora-boot    文件:DynamoDBStore.java   
/**
 * Retrieves the table description for the specific resource name
 * @param tableName
 * @return
 */
private TableDescription getTableSchema(String tableName){
  TableDescription tableDescription = null;
  try{
    DescribeTableRequest describeTableRequest = new DescribeTableRequest().withTableName(tableName);
    tableDescription = dynamoDBClient.describeTable(describeTableRequest).getTable();
  }
  catch(ResourceNotFoundException e){
    LOG.error("Error while getting table schema: " + tableName);
    return tableDescription;
  }
  return tableDescription;
}
项目:gora-boot    文件:GoraDynamoDBTestDriver.java   
/**
 * Checks if a resource exists or not
 * @param tableName Table name to be checked
 * @return
 */
public TableDescription checkResource(String tableName){
  TableDescription tableDescription = null;

  try{
    DescribeTableRequest describeTableRequest = new DescribeTableRequest().withTableName(tableName);
    tableDescription = dynamoDBClient.describeTable(describeTableRequest).getTable();
  }
  catch(ResourceNotFoundException e){
    tableDescription = null;
  }

  return tableDescription;
}
项目:gora-oraclenosql    文件:DynamoDBStore.java   
/**
 * Retrieves the table description for the specific resource name
 * @param tableName
 * @return
 */
private TableDescription getTableSchema(String tableName){
  TableDescription tableDescription = null;
  try{
    DescribeTableRequest describeTableRequest = new DescribeTableRequest().withTableName(tableName);
    tableDescription = dynamoDBClient.describeTable(describeTableRequest).getTable();
  }
  catch(ResourceNotFoundException e){
    LOG.error("Error while getting table schema: " + tableName);
    return tableDescription;
  }
  return tableDescription;
}
项目:gora-oraclenosql    文件:GoraDynamoDBTestDriver.java   
/**
 * Checks if a resource exists or not
 * @param tableName Table name to be checked
 * @return
 */
public TableDescription checkResource(String tableName){
  TableDescription tableDescription = null;

  try{
    DescribeTableRequest describeTableRequest = new DescribeTableRequest().withTableName(tableName);
    tableDescription = dynamoDBClient.describeTable(describeTableRequest).getTable();
  }
  catch(ResourceNotFoundException e){
    tableDescription = null;
  }

  return tableDescription;
}