Rename resource ID property to Resource server ID

This commit is contained in:
James Agnew 2017-12-07 07:20:22 -06:00
parent bbf1151d93
commit f4bc82b300
3 changed files with 9 additions and 9 deletions

View File

@ -149,7 +149,7 @@ public abstract class BaseHapiFhirResourceDao<T extends IBaseResource> extends B
}
}
if (myDaoConfig.getResourceIdStrategy() == DaoConfig.IdStrategyEnum.UUID) {
if (myDaoConfig.getResourceServerIdStrategy() == DaoConfig.IdStrategyEnum.UUID) {
theResource.setId(UUID.randomUUID().toString());
}

View File

@ -109,7 +109,7 @@ public class DaoConfig {
private boolean myAutoCreatePlaceholderReferenceTargets;
private Integer myCacheControlNoStoreMaxResultsUpperLimit = 1000;
private Integer myCountSearchResultsUpTo = null;
private IdStrategyEnum myResourceIdStrategy = IdStrategyEnum.SEQUENTIAL_NUMERIC;
private IdStrategyEnum myResourceServerIdStrategy = IdStrategyEnum.SEQUENTIAL_NUMERIC;
/**
* Constructor
@ -474,8 +474,8 @@ public class DaoConfig {
* This setting configures the strategy to use in generating IDs for newly
* created resources on the server. The default is {@link IdStrategyEnum#SEQUENTIAL_NUMERIC}.
*/
public IdStrategyEnum getResourceIdStrategy() {
return myResourceIdStrategy;
public IdStrategyEnum getResourceServerIdStrategy() {
return myResourceServerIdStrategy;
}
/**
@ -484,9 +484,9 @@ public class DaoConfig {
*
* @param theResourceIdStrategy The strategy. Must not be null.
*/
public void setResourceIdStrategy(IdStrategyEnum theResourceIdStrategy) {
public void setResourceServerIdStrategy(IdStrategyEnum theResourceIdStrategy) {
Validate.notNull(theResourceIdStrategy, "theResourceIdStrategy must not be null");
myResourceIdStrategy = theResourceIdStrategy;
myResourceServerIdStrategy = theResourceIdStrategy;
}
/**

View File

@ -21,12 +21,12 @@ public class FhirResourceDaoR4CreateTest extends BaseJpaR4Test {
@After
public void afterResetDao() {
myDaoConfig.setResourceIdStrategy(new DaoConfig().getResourceIdStrategy());
myDaoConfig.setResourceServerIdStrategy(new DaoConfig().getResourceServerIdStrategy());
}
@Test
public void testCreateWithUuidResourceStrategy() throws Exception {
myDaoConfig.setResourceIdStrategy(DaoConfig.IdStrategyEnum.UUID);
myDaoConfig.setResourceServerIdStrategy(DaoConfig.IdStrategyEnum.UUID);
Patient p = new Patient();
p.addName().setFamily("FAM");
@ -41,7 +41,7 @@ public class FhirResourceDaoR4CreateTest extends BaseJpaR4Test {
@Test
public void testTransactionCreateWithUuidResourceStrategy() throws Exception {
myDaoConfig.setResourceIdStrategy(DaoConfig.IdStrategyEnum.UUID);
myDaoConfig.setResourceServerIdStrategy(DaoConfig.IdStrategyEnum.UUID);
Organization org = new Organization();
org.setId(IdType.newRandomUuid());