@Test public void getTrackedEntityInstanceUnloaded() { final TrackedEntityInstance trackedEntityInstance = new TrackedEntityInstance(); final AbstractWritableScriptedDhisResource scriptedResource = new AbstractWritableScriptedDhisResource( DhisResourceType.TRACKED_ENTITY, "4711", scriptExecutionContext ) { }; Assert.assertNull( scriptedResource.getTrackedEntityInstance() ); }
@Nullable public ScriptedTrackedEntityInstance getTrackedEntityInstance() { return null; }
AbstractWritableScriptedDhisResource { @Nullable public ScriptedTrackedEntityInstance getTrackedEntityInstance() { return null; } }
AbstractWritableScriptedDhisResource { @Nullable public ScriptedTrackedEntityInstance getTrackedEntityInstance() { return null; } protected  AbstractWritableScriptedDhisResource( @Nonnull DhisResourceType resourceType, @Nonnull String resourceId, @Nonnull ScriptExecutionContext scriptExecutionContext ); protected  AbstractWritableScriptedDhisResource( @Nonnull DhisResource resource, @Nonnull ScriptExecutionContext scriptExecutionContext ); }
AbstractWritableScriptedDhisResource { @Nullable public ScriptedTrackedEntityInstance getTrackedEntityInstance() { return null; } protected  AbstractWritableScriptedDhisResource( @Nonnull DhisResourceType resourceType, @Nonnull String resourceId, @Nonnull ScriptExecutionContext scriptExecutionContext ); protected  AbstractWritableScriptedDhisResource( @Nonnull DhisResource resource, @Nonnull ScriptExecutionContext scriptExecutionContext ); @Nullable @ScriptMethod( description = "Returns the ID of the DHIS2 resource. Return null if the instance is new." ) String getId(); @Nonnull DhisResourceType getResourceType(); @Nullable DhisResourceId getResourceId(); @ScriptMethod( description = "Returns if the DHIS2 resource is new and has not yet been saved on DHIS2." ) boolean isNewResource(); boolean isLocal(); boolean isDeleted(); @Nullable ZonedDateTime getLastUpdated(); @Nullable String getOrganizationUnitId(); @Nullable ScriptedTrackedEntityInstance getTrackedEntityInstance(); void validate(); }
AbstractWritableScriptedDhisResource { @Nullable public ScriptedTrackedEntityInstance getTrackedEntityInstance() { return null; } protected  AbstractWritableScriptedDhisResource( @Nonnull DhisResourceType resourceType, @Nonnull String resourceId, @Nonnull ScriptExecutionContext scriptExecutionContext ); protected  AbstractWritableScriptedDhisResource( @Nonnull DhisResource resource, @Nonnull ScriptExecutionContext scriptExecutionContext ); @Nullable @ScriptMethod( description = "Returns the ID of the DHIS2 resource. Return null if the instance is new." ) String getId(); @Nonnull DhisResourceType getResourceType(); @Nullable DhisResourceId getResourceId(); @ScriptMethod( description = "Returns if the DHIS2 resource is new and has not yet been saved on DHIS2." ) boolean isNewResource(); boolean isLocal(); boolean isDeleted(); @Nullable ZonedDateTime getLastUpdated(); @Nullable String getOrganizationUnitId(); @Nullable ScriptedTrackedEntityInstance getTrackedEntityInstance(); void validate();  }