@Test public void testInternalIds() { ContentRepositoryData repository = new ContentRepositoryData(); repository.repositoryId = 1; ComponentData component = new ComponentData(); component.componentId = 2; AssetData asset = new AssetData(); asset.assetId = 3; AssetBlobData assetBlob = new AssetBlobData(); assetBlob.assetBlobId = 4; component.repositoryId = 5; asset.repositoryId = 6; asset.componentId = 7; asset.assetBlobId = 8; Component fluentComponent = new FluentComponentImpl(contentFacet, component); Asset fluentAsset = new FluentAssetImpl(contentFacet, asset); assertThat(contentRepositoryId(repository), is(1)); assertThat(contentRepositoryId(component), is(5)); assertThat(contentRepositoryId(fluentComponent), is(5)); assertThat(internalComponentId(component), is(2)); assertThat(internalComponentId(fluentComponent), is(2)); assertThat(contentRepositoryId(asset), is(6)); assertThat(contentRepositoryId(fluentAsset), is(6)); assertThat(internalAssetId(asset), is(3)); assertThat(internalAssetId(fluentAsset), is(3)); assertThat(internalAssetBlobId(assetBlob), is(4)); assertThat(internalComponentId(asset).getAsInt(), is(7)); assertThat(internalComponentId(fluentAsset).getAsInt(), is(7)); assertThat(internalAssetBlobId(asset).getAsInt(), is(8)); assertThat(internalAssetBlobId(fluentAsset).getAsInt(), is(8)); }
private InternalIds() { }
InternalIds { private InternalIds() { } }
InternalIds { private InternalIds() { } private  InternalIds(); }
InternalIds { private InternalIds() { } private  InternalIds(); static EntityId toExternalId(final int internalId); static int toInternalId(final EntityId externalId); static Optional<Integer> contentRepositoryId(final Repository repository); static int contentRepositoryId(final RepositoryContent content); static int contentRepositoryId(final ContentStoreEvent event); static int internalComponentId(final Component component); static int internalAssetBlobId(final AssetBlob assetBlob); static int internalAssetId(final Asset asset); static OptionalInt internalComponentId(final Asset asset); static OptionalInt internalAssetBlobId(final Asset asset); }
InternalIds { private InternalIds() { } private  InternalIds(); static EntityId toExternalId(final int internalId); static int toInternalId(final EntityId externalId); static Optional<Integer> contentRepositoryId(final Repository repository); static int contentRepositoryId(final RepositoryContent content); static int contentRepositoryId(final ContentStoreEvent event); static int internalComponentId(final Component component); static int internalAssetBlobId(final AssetBlob assetBlob); static int internalAssetId(final Asset asset); static OptionalInt internalComponentId(final Asset asset); static OptionalInt internalAssetBlobId(final Asset asset);  }